diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-04-20 19:53:51 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-04-20 19:53:51 -0400 |
commit | abd83e4bc8bd819117bc27ba75cb8e0d337ebadb (patch) | |
tree | 6e02dcf50b11d243a0b7a722daa03474e1b77d70 /drivers/usb/misc | |
parent | c41fba132e913c4696b6a87cc3c97ac0a95ce31a (diff) |
USB: usblcd.c: remove err() usage
err() was a very old USB-specific macro that I thought had
gone away. This patch removes it from being used in the
driver and uses dev_err() instead.
CC: Zack Parsons <k3bacon@gmail.com>
CC: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
CC: Sarah Sharp <sarah.a.sharp@linux.intel.com>
CC: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/misc')
-rw-r--r-- | drivers/usb/misc/usblcd.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/drivers/usb/misc/usblcd.c b/drivers/usb/misc/usblcd.c index e2b4bd31c2b6..c4ef9a1d5efd 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 | ||
@@ -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 | } |