<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;"># This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#	           ChangeSet	1.653   -&gt; 1.654  
#	drivers/usb/usb-ohci.c	1.29    -&gt; 1.30   
#	   drivers/usb/usb.c	1.24    -&gt; 1.25   
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/09/12	zwane@mwaikambo.name	1.654
# [PATCH] trivial ohci fixes
# 
# This is just a trivial patch for the following, and also a
# buglet (clear_bit usb_register/derister race there?) fix
# 
# usb-uhci.c: $Revision: 1.1.1.1 $ time 21:43:25 Sep  8 2002
# usb-uhci.c: High bandwidth mode enabled
# usb-uhci.c: v1.275:USB Universal Host Controller Interface driver
# usb-ohci.c: USB OHCI at membase 0xd0012000, IRQ 11
# usb-ohci.c: usb-00:01.2, Silicon Integrated Systems [SiS] 7001
# usb-ohci.c: USB HC TakeOver failed!
# usb.c: USB bus -1 deregistered &lt;--
# --------------------------------------------
#
diff -Nru a/drivers/usb/usb-ohci.c b/drivers/usb/usb-ohci.c
--- a/drivers/usb/usb-ohci.c	Thu Sep 12 16:25:40 2002
+++ b/drivers/usb/usb-ohci.c	Thu Sep 12 16:25:40 2002
@@ -2442,8 +2442,9 @@
 	}
 	pci_set_drvdata(ohci-&gt;ohci_dev, NULL);
 	if (ohci-&gt;bus) {
-		if (ohci-&gt;bus-&gt;busnum)
+		if (ohci-&gt;bus-&gt;busnum != -1)
 			usb_deregister_bus (ohci-&gt;bus);
+
 		usb_free_bus (ohci-&gt;bus);
 	}
 
diff -Nru a/drivers/usb/usb.c b/drivers/usb/usb.c
--- a/drivers/usb/usb.c	Thu Sep 12 16:25:40 2002
+++ b/drivers/usb/usb.c	Thu Sep 12 16:25:40 2002
@@ -468,11 +468,10 @@
 	 */
 	down (&amp;usb_bus_list_lock);
 	list_del(&amp;bus-&gt;bus_list);
+	clear_bit(bus-&gt;busnum, busmap.busmap);
 	up (&amp;usb_bus_list_lock);
 
 	usbdevfs_remove_bus(bus);
-
-	clear_bit(bus-&gt;busnum, busmap.busmap);
 
 	usb_bus_put(bus);
 }
</pre></body></html>