diff options
| author | Ingo Molnar <mingo@elte.hu> | 2009-03-30 17:53:32 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2009-03-30 17:53:32 -0400 |
| commit | 65fb0d23fcddd8697c871047b700c78817bdaa43 (patch) | |
| tree | 119e6e5f276622c4c862f6c9b6d795264ba1603a /drivers/usb/class | |
| parent | 8c083f081d0014057901c68a0a3e0f8ca7ac8d23 (diff) | |
| parent | dfbbe89e197a77f2c8046a51c74e33e35f878080 (diff) | |
Merge branch 'linus' into cpumask-for-linus
Conflicts:
arch/x86/kernel/cpu/common.c
Diffstat (limited to 'drivers/usb/class')
| -rw-r--r-- | drivers/usb/class/usblp.c | 11 | ||||
| -rw-r--r-- | drivers/usb/class/usbtmc.c | 4 |
2 files changed, 10 insertions, 5 deletions
diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c index 3f3ee1351930..d2747a49b974 100644 --- a/drivers/usb/class/usblp.c +++ b/drivers/usb/class/usblp.c | |||
| @@ -880,16 +880,19 @@ static int usblp_wwait(struct usblp *usblp, int nonblock) | |||
| 880 | if (rc <= 0) | 880 | if (rc <= 0) |
| 881 | break; | 881 | break; |
| 882 | 882 | ||
| 883 | if (usblp->flags & LP_ABORT) { | 883 | if (schedule_timeout(msecs_to_jiffies(1500)) == 0) { |
| 884 | if (schedule_timeout(msecs_to_jiffies(5000)) == 0) { | 884 | if (usblp->flags & LP_ABORT) { |
| 885 | err = usblp_check_status(usblp, err); | 885 | err = usblp_check_status(usblp, err); |
| 886 | if (err == 1) { /* Paper out */ | 886 | if (err == 1) { /* Paper out */ |
| 887 | rc = -ENOSPC; | 887 | rc = -ENOSPC; |
| 888 | break; | 888 | break; |
| 889 | } | 889 | } |
| 890 | } else { | ||
| 891 | /* Prod the printer, Gentoo#251237. */ | ||
| 892 | mutex_lock(&usblp->mut); | ||
| 893 | usblp_read_status(usblp, usblp->statusbuf); | ||
| 894 | mutex_unlock(&usblp->mut); | ||
| 890 | } | 895 | } |
| 891 | } else { | ||
| 892 | schedule(); | ||
| 893 | } | 896 | } |
| 894 | } | 897 | } |
| 895 | set_current_state(TASK_RUNNING); | 898 | set_current_state(TASK_RUNNING); |
diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c index 0f5c05f6f9df..c40a9b284cc9 100644 --- a/drivers/usb/class/usbtmc.c +++ b/drivers/usb/class/usbtmc.c | |||
| @@ -50,6 +50,7 @@ | |||
| 50 | 50 | ||
| 51 | static struct usb_device_id usbtmc_devices[] = { | 51 | static struct usb_device_id usbtmc_devices[] = { |
| 52 | { USB_INTERFACE_INFO(USB_CLASS_APP_SPEC, 3, 0), }, | 52 | { USB_INTERFACE_INFO(USB_CLASS_APP_SPEC, 3, 0), }, |
| 53 | { USB_INTERFACE_INFO(USB_CLASS_APP_SPEC, 3, 1), }, | ||
| 53 | { 0, } /* terminating entry */ | 54 | { 0, } /* terminating entry */ |
| 54 | }; | 55 | }; |
| 55 | MODULE_DEVICE_TABLE(usb, usbtmc_devices); | 56 | MODULE_DEVICE_TABLE(usb, usbtmc_devices); |
| @@ -106,12 +107,13 @@ static int usbtmc_open(struct inode *inode, struct file *filp) | |||
| 106 | { | 107 | { |
| 107 | struct usb_interface *intf; | 108 | struct usb_interface *intf; |
| 108 | struct usbtmc_device_data *data; | 109 | struct usbtmc_device_data *data; |
| 109 | int retval = -ENODEV; | 110 | int retval = 0; |
| 110 | 111 | ||
| 111 | intf = usb_find_interface(&usbtmc_driver, iminor(inode)); | 112 | intf = usb_find_interface(&usbtmc_driver, iminor(inode)); |
| 112 | if (!intf) { | 113 | if (!intf) { |
| 113 | printk(KERN_ERR KBUILD_MODNAME | 114 | printk(KERN_ERR KBUILD_MODNAME |
| 114 | ": can not find device for minor %d", iminor(inode)); | 115 | ": can not find device for minor %d", iminor(inode)); |
| 116 | retval = -ENODEV; | ||
| 115 | goto exit; | 117 | goto exit; |
| 116 | } | 118 | } |
| 117 | 119 | ||
