# 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.456.2.1 -> 1.456.2.2 # drivers/usb/core/hub.c 1.23 -> 1.24 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 02/04/10 johannes@erdfelt.com 1.456.2.2 # [PATCH] Re: removing sleep_on in hub.c # # On Mon, Apr 08, 2002, Oliver Neukum wrote: # > using sleep_on is a race. The attached patch replaces it with the # > new wait_event macro from sched.h. The patch is against the 2.5 # > from Greg. # # Greg, I've tested this against 2.4.19-pre6 as well and the attached # patch is relative to that. # # Please apply. # # Thank Oliver! # -------------------------------------------- # diff -Nru a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c --- a/drivers/usb/core/hub.c Tue Apr 16 11:35:58 2002 +++ b/drivers/usb/core/hub.c Tue Apr 16 11:35:58 2002 @@ -964,7 +964,7 @@ /* Send me a signal to get me die (for debugging) */ do { usb_hub_events(); - interruptible_sleep_on(&khubd_wait); + wait_event_interruptible(khubd_wait, !list_empty(&hub_event_list)); } while (!signal_pending(current)); dbg("usb_hub_thread exiting");