Commit 08813d35 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

USB: yealink.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: Henk Vergonet <Henk.Vergonet@gmail.com>
CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2385f3c3
...@@ -428,7 +428,8 @@ static void urb_irq_callback(struct urb *urb) ...@@ -428,7 +428,8 @@ static void urb_irq_callback(struct urb *urb)
int ret, status = urb->status; int ret, status = urb->status;
if (status) if (status)
err("%s - urb status %d", __func__, status); dev_err(&yld->udev->dev, "%s - urb status %d\n",
__func__, status);
switch (yld->irq_data->cmd) { switch (yld->irq_data->cmd) {
case CMD_KEYPRESS: case CMD_KEYPRESS:
...@@ -443,7 +444,8 @@ static void urb_irq_callback(struct urb *urb) ...@@ -443,7 +444,8 @@ static void urb_irq_callback(struct urb *urb)
break; break;
default: default:
err("unexpected response %x", yld->irq_data->cmd); dev_err(&yld->udev->dev, "unexpected response %x\n",
yld->irq_data->cmd);
} }
yealink_do_idle_tasks(yld); yealink_do_idle_tasks(yld);
...@@ -451,7 +453,9 @@ static void urb_irq_callback(struct urb *urb) ...@@ -451,7 +453,9 @@ static void urb_irq_callback(struct urb *urb)
if (!yld->shutdown) { if (!yld->shutdown) {
ret = usb_submit_urb(yld->urb_ctl, GFP_ATOMIC); ret = usb_submit_urb(yld->urb_ctl, GFP_ATOMIC);
if (ret && ret != -EPERM) if (ret && ret != -EPERM)
err("%s - usb_submit_urb failed %d", __func__, ret); dev_err(&yld->udev->dev,
"%s - usb_submit_urb failed %d\n",
__func__, ret);
} }
} }
...@@ -461,7 +465,8 @@ static void urb_ctl_callback(struct urb *urb) ...@@ -461,7 +465,8 @@ static void urb_ctl_callback(struct urb *urb)
int ret = 0, status = urb->status; int ret = 0, status = urb->status;
if (status) if (status)
err("%s - urb status %d", __func__, status); dev_err(&yld->udev->dev, "%s - urb status %d\n",
__func__, status);
switch (yld->ctl_data->cmd) { switch (yld->ctl_data->cmd) {
case CMD_KEYPRESS: case CMD_KEYPRESS:
...@@ -479,7 +484,8 @@ static void urb_ctl_callback(struct urb *urb) ...@@ -479,7 +484,8 @@ static void urb_ctl_callback(struct urb *urb)
} }
if (ret && ret != -EPERM) if (ret && ret != -EPERM)
err("%s - usb_submit_urb failed %d", __func__, ret); dev_err(&yld->udev->dev, "%s - usb_submit_urb failed %d\n",
__func__, ret);
} }
/******************************************************************************* /*******************************************************************************
...@@ -909,7 +915,8 @@ static int usb_probe(struct usb_interface *intf, const struct usb_device_id *id) ...@@ -909,7 +915,8 @@ static int usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
pipe = usb_rcvintpipe(udev, endpoint->bEndpointAddress); pipe = usb_rcvintpipe(udev, endpoint->bEndpointAddress);
ret = usb_maxpacket(udev, pipe, usb_pipeout(pipe)); ret = usb_maxpacket(udev, pipe, usb_pipeout(pipe));
if (ret != USB_PKT_LEN) if (ret != USB_PKT_LEN)
err("invalid payload size %d, expected %zd", ret, USB_PKT_LEN); dev_err(&intf->dev, "invalid payload size %d, expected %zd\n",
ret, USB_PKT_LEN);
/* initialise irq urb */ /* initialise irq urb */
usb_fill_int_urb(yld->urb_irq, udev, pipe, yld->irq_data, usb_fill_int_urb(yld->urb_irq, udev, pipe, yld->irq_data,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment