Staging: media: lirc: lirc_ttusbir: 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: Jarod Wilson <jarod@wilsonet.com>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Greg Kroah-Hartman 2012-04-24 09:03:48 -07:00
parent 437c06cb46
commit 9b33da165b

View File

@ -113,8 +113,9 @@ static int set_use_inc(void *data)
for (i = 0; i < num_urbs; i++) { for (i = 0; i < num_urbs; i++) {
retval = usb_submit_urb(ttusbir->urb[i], GFP_KERNEL); retval = usb_submit_urb(ttusbir->urb[i], GFP_KERNEL);
if (retval) { if (retval) {
err("%s: usb_submit_urb failed on urb %d", dev_err(&ttusbir->interf->dev,
__func__, i); "%s: usb_submit_urb failed on urb %d\n",
__func__, i);
return retval; return retval;
} }
} }
@ -278,7 +279,7 @@ static int probe(struct usb_interface *intf, const struct usb_device_id *id)
if (ttusbir->alt_setting != -1) if (ttusbir->alt_setting != -1)
DPRINTK("alt setting: %d\n", ttusbir->alt_setting); DPRINTK("alt setting: %d\n", ttusbir->alt_setting);
else { else {
err("Could not find alternate setting\n"); dev_err(&intf->dev, "Could not find alternate setting\n");
kfree(ttusbir); kfree(ttusbir);
return -EINVAL; return -EINVAL;
} }
@ -291,7 +292,7 @@ static int probe(struct usb_interface *intf, const struct usb_device_id *id)
/* Register as a LIRC driver */ /* Register as a LIRC driver */
if (lirc_buffer_init(&ttusbir->rbuf, sizeof(int), 256) < 0) { if (lirc_buffer_init(&ttusbir->rbuf, sizeof(int), 256) < 0) {
err("Could not get memory for LIRC data buffer\n"); dev_err(&intf->dev, "Could not get memory for LIRC data buffer\n");
usb_set_intfdata(intf, NULL); usb_set_intfdata(intf, NULL);
kfree(ttusbir); kfree(ttusbir);
return -ENOMEM; return -ENOMEM;
@ -310,7 +311,7 @@ static int probe(struct usb_interface *intf, const struct usb_device_id *id)
ttusbir->driver.features = LIRC_CAN_REC_MODE2; ttusbir->driver.features = LIRC_CAN_REC_MODE2;
ttusbir->minor = lirc_register_driver(&ttusbir->driver); ttusbir->minor = lirc_register_driver(&ttusbir->driver);
if (ttusbir->minor < 0) { if (ttusbir->minor < 0) {
err("Error registering as LIRC driver\n"); dev_err(&intf->dev, "Error registering as LIRC driver\n");
usb_set_intfdata(intf, NULL); usb_set_intfdata(intf, NULL);
lirc_buffer_free(&ttusbir->rbuf); lirc_buffer_free(&ttusbir->rbuf);
kfree(ttusbir); kfree(ttusbir);
@ -321,7 +322,7 @@ static int probe(struct usb_interface *intf, const struct usb_device_id *id)
for (i = 0; i < num_urbs; i++) { for (i = 0; i < num_urbs; i++) {
ttusbir->urb[i] = usb_alloc_urb(8, GFP_KERNEL); ttusbir->urb[i] = usb_alloc_urb(8, GFP_KERNEL);
if (!ttusbir->urb[i]) { if (!ttusbir->urb[i]) {
err("Could not allocate memory for the URB\n"); dev_err(&intf->dev, "Could not allocate memory for the URB\n");
for (j = i - 1; j >= 0; j--) for (j = i - 1; j >= 0; j--)
kfree(ttusbir->urb[j]); kfree(ttusbir->urb[j]);
lirc_buffer_free(&ttusbir->rbuf); lirc_buffer_free(&ttusbir->rbuf);