aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/misc/usblcd.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-05-22 18:50:46 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-05-22 18:50:46 -0400
commita481991467d38afb43c3921d5b5b59ccb61b04ba (patch)
treea4b0b9a14da6fd5ef7b9b512bb32dbfcfcf2cd71 /drivers/usb/misc/usblcd.c
parentf6a26ae7699416d86bea8cb68ce413571e9cab3c (diff)
parentcda4db53e9c28061c100400e1a4d273ea61dfba9 (diff)
Merge tag 'usb-3.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB 3.5-rc1 changes from Greg Kroah-Hartman: "Here is the big USB 3.5-rc1 pull request for the 3.5-rc1 merge window. It's touches a lot of different parts of the kernel, all USB drivers, due to some API cleanups (getting rid of the ancient err() macro) and some changes that are needed for USB 3.0 power management updates. There are also lots of new drivers, pimarily gadget, but others as well. We deleted a staging driver, which was nice, and finally dropped the obsolete usbfs code, which will make Al happy to never have to touch that again. There were some build errors in the tree that linux-next found a few days ago, but those were fixed by the most recent changes (all were due to us not building with CONFIG_PM disabled.) Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>" * tag 'usb-3.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (477 commits) xhci: Fix DIV_ROUND_UP compile error. xhci: Fix compile with CONFIG_USB_SUSPEND=n USB: Fix core compile with CONFIG_USB_SUSPEND=n brcm80211: Fix compile error for .disable_hub_initiated_lpm. Revert "USB: EHCI: work around bug in the Philips ISP1562 controller" MAINTAINERS: Add myself as maintainer to the USB PHY Layer USB: EHCI: fix command register configuration lost problem USB: Remove races in devio.c USB: ehci-platform: remove update_device USB: Disable hub-initiated LPM for comms devices. xhci: Add Intel U1/U2 timeout policy. xhci: Add infrastructure for host-specific LPM policies. USB: Add macros for interrupt endpoint types. xhci: Reserve one command for USB3 LPM disable. xhci: Some Evaluate Context commands must succeed. USB: Disable USB 3.0 LPM in critical sections. USB: Add support to enable/disable USB3 link states. USB: Allow drivers to disable hub-initiated LPM. USB: Calculate USB 3.0 exit latencies for LPM. USB: Refactor code to set LPM support flag. ... Conflicts: arch/arm/mach-exynos/mach-nuri.c arch/arm/mach-exynos/mach-universal_c210.c drivers/net/wireless/ath/ath6kl/usb.c
Diffstat (limited to 'drivers/usb/misc/usblcd.c')
-rw-r--r--drivers/usb/misc/usblcd.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/drivers/usb/misc/usblcd.c b/drivers/usb/misc/usblcd.c
index e2b4bd31c2b..89927bcff97 100644
--- a/drivers/usb/misc/usblcd.c
+++ b/drivers/usb/misc/usblcd.c
@@ -87,8 +87,8 @@ static int lcd_open(struct inode *inode, struct file *file)
87 interface = usb_find_interface(&lcd_driver, subminor); 87 interface = usb_find_interface(&lcd_driver, subminor);
88 if (!interface) { 88 if (!interface) {
89 mutex_unlock(&lcd_mutex); 89 mutex_unlock(&lcd_mutex);
90 err("USBLCD: %s - error, can't find device for minor %d", 90 printk(KERN_ERR "USBLCD: %s - error, can't find device for minor %d\n",
91 __func__, subminor); 91 __func__, subminor);
92 return -ENODEV; 92 return -ENODEV;
93 } 93 }
94 94
@@ -209,8 +209,8 @@ static void lcd_write_bulk_callback(struct urb *urb)
209 !(status == -ENOENT || 209 !(status == -ENOENT ||
210 status == -ECONNRESET || 210 status == -ECONNRESET ||
211 status == -ESHUTDOWN)) { 211 status == -ESHUTDOWN)) {
212 dbg("USBLCD: %s - nonzero write bulk status received: %d", 212 dev_dbg(&dev->interface->dev,
213 __func__, status); 213 "nonzero write bulk status received: %d\n", status);
214 } 214 }
215 215
216 /* free up our allocated buffer */ 216 /* free up our allocated buffer */
@@ -268,8 +268,9 @@ static ssize_t lcd_write(struct file *file, const char __user * user_buffer,
268 /* send the data out the bulk port */ 268 /* send the data out the bulk port */
269 retval = usb_submit_urb(urb, GFP_KERNEL); 269 retval = usb_submit_urb(urb, GFP_KERNEL);
270 if (retval) { 270 if (retval) {
271 err("USBLCD: %s - failed submitting write urb, error %d", 271 dev_err(&dev->udev->dev,
272 __func__, retval); 272 "%s - failed submitting write urb, error %d\n",
273 __func__, retval);
273 goto error_unanchor; 274 goto error_unanchor;
274 } 275 }
275 276
@@ -322,7 +323,7 @@ static int lcd_probe(struct usb_interface *interface,
322 /* allocate memory for our device state and initialize it */ 323 /* allocate memory for our device state and initialize it */
323 dev = kzalloc(sizeof(*dev), GFP_KERNEL); 324 dev = kzalloc(sizeof(*dev), GFP_KERNEL);
324 if (dev == NULL) { 325 if (dev == NULL) {
325 err("Out of memory"); 326 dev_err(&interface->dev, "Out of memory\n");
326 goto error; 327 goto error;
327 } 328 }
328 kref_init(&dev->kref); 329 kref_init(&dev->kref);
@@ -352,7 +353,8 @@ static int lcd_probe(struct usb_interface *interface,
352 dev->bulk_in_endpointAddr = endpoint->bEndpointAddress; 353 dev->bulk_in_endpointAddr = endpoint->bEndpointAddress;
353 dev->bulk_in_buffer = kmalloc(buffer_size, GFP_KERNEL); 354 dev->bulk_in_buffer = kmalloc(buffer_size, GFP_KERNEL);
354 if (!dev->bulk_in_buffer) { 355 if (!dev->bulk_in_buffer) {
355 err("Could not allocate bulk_in_buffer"); 356 dev_err(&interface->dev,
357 "Could not allocate bulk_in_buffer\n");
356 goto error; 358 goto error;
357 } 359 }
358 } 360 }
@@ -364,7 +366,8 @@ static int lcd_probe(struct usb_interface *interface,
364 } 366 }
365 } 367 }
366 if (!(dev->bulk_in_endpointAddr && dev->bulk_out_endpointAddr)) { 368 if (!(dev->bulk_in_endpointAddr && dev->bulk_out_endpointAddr)) {
367 err("Could not find both bulk-in and bulk-out endpoints"); 369 dev_err(&interface->dev,
370 "Could not find both bulk-in and bulk-out endpoints\n");
368 goto error; 371 goto error;
369 } 372 }
370 373
@@ -375,7 +378,8 @@ static int lcd_probe(struct usb_interface *interface,
375 retval = usb_register_dev(interface, &lcd_class); 378 retval = usb_register_dev(interface, &lcd_class);
376 if (retval) { 379 if (retval) {
377 /* something prevented us from registering this driver */ 380 /* something prevented us from registering this driver */
378 err("Not able to get a minor for this device."); 381 dev_err(&interface->dev,
382 "Not able to get a minor for this device.\n");
379 usb_set_intfdata(interface, NULL); 383 usb_set_intfdata(interface, NULL);
380 goto error; 384 goto error;
381 } 385 }