summaryrefslogtreecommitdiffstats
path: root/drivers/usb/class
diff options
context:
space:
mode:
authorNishanth Aravamudan <nacc@us.ibm.com>2005-08-15 11:30:11 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2005-09-12 12:23:44 -0700
commit22c438632850c0d6257b45c90afed0cea6953afc (patch)
treeeb70da121b1fab2a2626167575aa38ed3013fc65 /drivers/usb/class
parentdd16525b698528172899f10c14a3eb6ddb888a53 (diff)
downloadop-kernel-dev-22c438632850c0d6257b45c90afed0cea6953afc.zip
op-kernel-dev-22c438632850c0d6257b45c90afed0cea6953afc.tar.gz
[PATCH] drivers/usb: fix-up schedule_timeout() usage
Description: Use schedule_timeout_{,un}interruptible() instead of set_current_state()/schedule_timeout() to reduce kernel size. Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/class')
-rw-r--r--drivers/usb/class/audio.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/usb/class/audio.c b/drivers/usb/class/audio.c
index f8f2156..5085827 100644
--- a/drivers/usb/class/audio.c
+++ b/drivers/usb/class/audio.c
@@ -631,8 +631,10 @@ static void usbin_stop(struct usb_audiodev *as)
i = u->flags;
spin_unlock_irqrestore(&as->lock, flags);
while (i & (FLG_URB0RUNNING|FLG_URB1RUNNING|FLG_SYNC0RUNNING|FLG_SYNC1RUNNING)) {
- set_current_state(notkilled ? TASK_INTERRUPTIBLE : TASK_UNINTERRUPTIBLE);
- schedule_timeout(1);
+ if (notkilled)
+ schedule_timeout_interruptible(1);
+ else
+ schedule_timeout_uninterruptible(1);
spin_lock_irqsave(&as->lock, flags);
i = u->flags;
spin_unlock_irqrestore(&as->lock, flags);
@@ -1102,8 +1104,10 @@ static void usbout_stop(struct usb_audiodev *as)
i = u->flags;
spin_unlock_irqrestore(&as->lock, flags);
while (i & (FLG_URB0RUNNING|FLG_URB1RUNNING|FLG_SYNC0RUNNING|FLG_SYNC1RUNNING)) {
- set_current_state(notkilled ? TASK_INTERRUPTIBLE : TASK_UNINTERRUPTIBLE);
- schedule_timeout(1);
+ if (notkilled)
+ schedule_timeout_interruptible(1);
+ else
+ schedule_timeout_uninterruptible(1);
spin_lock_irqsave(&as->lock, flags);
i = u->flags;
spin_unlock_irqrestore(&as->lock, flags);
OpenPOWER on IntegriCloud