From: Greg KH To: torvalds@transmeta.com Cc: linux-usb-devel@lists.sourceforge.net Subject: [PATCH 8 of 9] USB vicam driver update Hi, Here's a patch against 2.5.3 for the USB vicam driver that removes the use of interruptible_sleep_on() in the driver. This patch was done by Oliver Neukum. thanks, greg k-h diff -Nru a/drivers/usb/vicam.c b/drivers/usb/vicam.c --- a/drivers/usb/vicam.c Sun Feb 3 00:53:04 2002 +++ b/drivers/usb/vicam.c Sun Feb 3 00:53:04 2002 @@ -79,7 +79,7 @@ static struct usb_driver vicam_driver; static char *buf, *buf2; -static int change_pending = 0; +static volatile int change_pending = 0; static int vicam_parameters(struct usb_vicam *vicam); @@ -330,8 +330,14 @@ static void synchronize(struct usb_vicam *vicam) { + DECLARE_WAITQUEUE(wait, current); change_pending = 1; - interruptible_sleep_on(&vicam->wait); + set_current_state(TASK_INTERRUPTIBLE); + add_wait_queue(&vicam->wait, &wait); + if (change_pending) + schedule(); + remove_wait_queue(&vicam->wait, &wait); + set_current_state(TASK_RUNNING); vicam_sndctrl(1, vicam, VICAM_REQ_CAMERA_POWER, 0x00, NULL, 0); mdelay(10); vicam_sndctrl(1, vicam, VICAM_REQ_LED_CONTROL, 0x00, NULL, 0);