diff options
Diffstat (limited to 'drivers/usb/class')
| -rw-r--r-- | drivers/usb/class/Kconfig | 21 | ||||
| -rw-r--r-- | drivers/usb/class/audio.c | 12 | ||||
| -rw-r--r-- | drivers/usb/class/usblp.c | 9 |
3 files changed, 32 insertions, 10 deletions
diff --git a/drivers/usb/class/Kconfig b/drivers/usb/class/Kconfig index 0561d0234f23..333e39bb105f 100644 --- a/drivers/usb/class/Kconfig +++ b/drivers/usb/class/Kconfig | |||
| @@ -4,9 +4,22 @@ | |||
| 4 | comment "USB Device Class drivers" | 4 | comment "USB Device Class drivers" |
| 5 | depends on USB | 5 | depends on USB |
| 6 | 6 | ||
| 7 | config OBSOLETE_OSS_USB_DRIVER | ||
| 8 | bool "Obsolete OSS USB drivers" | ||
| 9 | depends on USB && SOUND | ||
| 10 | help | ||
| 11 | This option enables support for the obsolete USB Audio and Midi | ||
| 12 | drivers that are scheduled for removal in the near future since | ||
| 13 | there are ALSA drivers for the same hardware. | ||
| 14 | |||
| 15 | Please contact Adrian Bunk <bunk@stusta.de> if you had to | ||
| 16 | say Y here because of missing support in the ALSA drivers. | ||
| 17 | |||
| 18 | If unsure, say N. | ||
| 19 | |||
| 7 | config USB_AUDIO | 20 | config USB_AUDIO |
| 8 | tristate "USB Audio support" | 21 | tristate "USB Audio support" |
| 9 | depends on USB && SOUND | 22 | depends on USB && SOUND && OBSOLETE_OSS_USB_DRIVER |
| 10 | help | 23 | help |
| 11 | Say Y here if you want to connect USB audio equipment such as | 24 | Say Y here if you want to connect USB audio equipment such as |
| 12 | speakers to your computer's USB port. You only need this if you use | 25 | speakers to your computer's USB port. You only need this if you use |
| @@ -40,10 +53,12 @@ config USB_BLUETOOTH_TTY | |||
| 40 | 53 | ||
| 41 | config USB_MIDI | 54 | config USB_MIDI |
| 42 | tristate "USB MIDI support" | 55 | tristate "USB MIDI support" |
| 43 | depends on USB && SOUND | 56 | depends on USB && SOUND && OBSOLETE_OSS_USB_DRIVER |
| 44 | ---help--- | 57 | ---help--- |
| 45 | Say Y here if you want to connect a USB MIDI device to your | 58 | Say Y here if you want to connect a USB MIDI device to your |
| 46 | computer's USB port. This driver is for devices that comply with | 59 | computer's USB port. You only need this if you use the OSS |
| 60 | sound system; USB MIDI devices are supported by ALSA's USB | ||
| 61 | audio driver. This driver is for devices that comply with | ||
| 47 | 'Universal Serial Bus Device Class Definition for MIDI Device'. | 62 | 'Universal Serial Bus Device Class Definition for MIDI Device'. |
| 48 | 63 | ||
| 49 | The following devices are known to work: | 64 | The following devices are known to work: |
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); |
diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c index 7ce43fb8118a..e195709c9c7f 100644 --- a/drivers/usb/class/usblp.c +++ b/drivers/usb/class/usblp.c | |||
| @@ -310,8 +310,9 @@ static int usblp_check_status(struct usblp *usblp, int err) | |||
| 310 | 310 | ||
| 311 | error = usblp_read_status (usblp, usblp->statusbuf); | 311 | error = usblp_read_status (usblp, usblp->statusbuf); |
| 312 | if (error < 0) { | 312 | if (error < 0) { |
| 313 | err("usblp%d: error %d reading printer status", | 313 | if (printk_ratelimit()) |
| 314 | usblp->minor, error); | 314 | err("usblp%d: error %d reading printer status", |
| 315 | usblp->minor, error); | ||
| 315 | return 0; | 316 | return 0; |
| 316 | } | 317 | } |
| 317 | 318 | ||
| @@ -604,7 +605,9 @@ static int usblp_ioctl(struct inode *inode, struct file *file, unsigned int cmd, | |||
| 604 | 605 | ||
| 605 | case LPGETSTATUS: | 606 | case LPGETSTATUS: |
| 606 | if (usblp_read_status(usblp, usblp->statusbuf)) { | 607 | if (usblp_read_status(usblp, usblp->statusbuf)) { |
| 607 | err("usblp%d: failed reading printer status", usblp->minor); | 608 | if (printk_ratelimit()) |
| 609 | err("usblp%d: failed reading printer status", | ||
| 610 | usblp->minor); | ||
| 608 | retval = -EIO; | 611 | retval = -EIO; |
| 609 | goto done; | 612 | goto done; |
| 610 | } | 613 | } |
