diff options
author | Nishanth Aravamudan <nacc@us.ibm.com> | 2005-08-15 14:30:11 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-09-12 15:23:44 -0400 |
commit | 22c438632850c0d6257b45c90afed0cea6953afc (patch) | |
tree | eb70da121b1fab2a2626167575aa38ed3013fc65 /drivers/usb/class | |
parent | dd16525b698528172899f10c14a3eb6ddb888a53 (diff) |
[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.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/usb/class/audio.c b/drivers/usb/class/audio.c index f8f21567cc22..50858273f8d3 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) | |||
631 | i = u->flags; | 631 | i = u->flags; |
632 | spin_unlock_irqrestore(&as->lock, flags); | 632 | spin_unlock_irqrestore(&as->lock, flags); |
633 | while (i & (FLG_URB0RUNNING|FLG_URB1RUNNING|FLG_SYNC0RUNNING|FLG_SYNC1RUNNING)) { | 633 | while (i & (FLG_URB0RUNNING|FLG_URB1RUNNING|FLG_SYNC0RUNNING|FLG_SYNC1RUNNING)) { |
634 | set_current_state(notkilled ? TASK_INTERRUPTIBLE : TASK_UNINTERRUPTIBLE); | 634 | if (notkilled) |
635 | schedule_timeout(1); | 635 | schedule_timeout_interruptible(1); |
636 | else | ||
637 | schedule_timeout_uninterruptible(1); | ||
636 | spin_lock_irqsave(&as->lock, flags); | 638 | spin_lock_irqsave(&as->lock, flags); |
637 | i = u->flags; | 639 | i = u->flags; |
638 | spin_unlock_irqrestore(&as->lock, flags); | 640 | spin_unlock_irqrestore(&as->lock, flags); |
@@ -1102,8 +1104,10 @@ static void usbout_stop(struct usb_audiodev *as) | |||
1102 | i = u->flags; | 1104 | i = u->flags; |
1103 | spin_unlock_irqrestore(&as->lock, flags); | 1105 | spin_unlock_irqrestore(&as->lock, flags); |
1104 | while (i & (FLG_URB0RUNNING|FLG_URB1RUNNING|FLG_SYNC0RUNNING|FLG_SYNC1RUNNING)) { | 1106 | while (i & (FLG_URB0RUNNING|FLG_URB1RUNNING|FLG_SYNC0RUNNING|FLG_SYNC1RUNNING)) { |
1105 | set_current_state(notkilled ? TASK_INTERRUPTIBLE : TASK_UNINTERRUPTIBLE); | 1107 | if (notkilled) |
1106 | schedule_timeout(1); | 1108 | schedule_timeout_interruptible(1); |
1109 | else | ||
1110 | schedule_timeout_uninterruptible(1); | ||
1107 | spin_lock_irqsave(&as->lock, flags); | 1111 | spin_lock_irqsave(&as->lock, flags); |
1108 | i = u->flags; | 1112 | i = u->flags; |
1109 | spin_unlock_irqrestore(&as->lock, flags); | 1113 | spin_unlock_irqrestore(&as->lock, flags); |