Commit 388fd202 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

USB: input: cm109.c: fix up dev_err() usage

We should always reference the input device for dev_err(), not the USB
device.  Fix up the places where I got this wrong.
Reported-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
CC: Axel Lin <axel.lin@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 39e85a26
...@@ -327,7 +327,7 @@ static void cm109_submit_buzz_toggle(struct cm109_dev *dev) ...@@ -327,7 +327,7 @@ static void cm109_submit_buzz_toggle(struct cm109_dev *dev)
error = usb_submit_urb(dev->urb_ctl, GFP_ATOMIC); error = usb_submit_urb(dev->urb_ctl, GFP_ATOMIC);
if (error) if (error)
dev_err(&dev->intf->dev, dev_err(&dev->idev->dev,
"%s: usb_submit_urb (urb_ctl) failed %d\n", "%s: usb_submit_urb (urb_ctl) failed %d\n",
__func__, error); __func__, error);
} }
...@@ -351,7 +351,7 @@ static void cm109_urb_irq_callback(struct urb *urb) ...@@ -351,7 +351,7 @@ static void cm109_urb_irq_callback(struct urb *urb)
if (status) { if (status) {
if (status == -ESHUTDOWN) if (status == -ESHUTDOWN)
return; return;
dev_err(&dev->intf->dev, "%s: urb status %d\n", __func__, status); dev_err(&dev->idev->dev, "%s: urb status %d\n", __func__, status);
} }
/* Special keys */ /* Special keys */
...@@ -398,7 +398,7 @@ static void cm109_urb_irq_callback(struct urb *urb) ...@@ -398,7 +398,7 @@ static void cm109_urb_irq_callback(struct urb *urb)
error = usb_submit_urb(dev->urb_ctl, GFP_ATOMIC); error = usb_submit_urb(dev->urb_ctl, GFP_ATOMIC);
if (error) if (error)
dev_err(&dev->intf->dev, dev_err(&dev->idev->dev,
"%s: usb_submit_urb (urb_ctl) failed %d\n", "%s: usb_submit_urb (urb_ctl) failed %d\n",
__func__, error); __func__, error);
} }
...@@ -419,7 +419,7 @@ static void cm109_urb_ctl_callback(struct urb *urb) ...@@ -419,7 +419,7 @@ static void cm109_urb_ctl_callback(struct urb *urb)
dev->ctl_data->byte[3]); dev->ctl_data->byte[3]);
if (status) if (status)
dev_err(&dev->intf->dev, "%s: urb status %d\n", __func__, status); dev_err(&dev->idev->dev, "%s: urb status %d\n", __func__, status);
spin_lock(&dev->ctl_submit_lock); spin_lock(&dev->ctl_submit_lock);
...@@ -436,7 +436,7 @@ static void cm109_urb_ctl_callback(struct urb *urb) ...@@ -436,7 +436,7 @@ static void cm109_urb_ctl_callback(struct urb *urb)
dev->irq_urb_pending = 1; dev->irq_urb_pending = 1;
error = usb_submit_urb(dev->urb_irq, GFP_ATOMIC); error = usb_submit_urb(dev->urb_irq, GFP_ATOMIC);
if (error) if (error)
dev_err(&dev->intf->dev, dev_err(&dev->idev->dev,
"%s: usb_submit_urb (urb_irq) failed %d\n", "%s: usb_submit_urb (urb_irq) failed %d\n",
__func__, error); __func__, error);
} }
...@@ -480,7 +480,7 @@ static void cm109_toggle_buzzer_sync(struct cm109_dev *dev, int on) ...@@ -480,7 +480,7 @@ static void cm109_toggle_buzzer_sync(struct cm109_dev *dev, int on)
dev->ctl_data, dev->ctl_data,
USB_PKT_LEN, USB_CTRL_SET_TIMEOUT); USB_PKT_LEN, USB_CTRL_SET_TIMEOUT);
if (error < 0 && error != -EINTR) if (error < 0 && error != -EINTR)
dev_err(&dev->intf->dev, "%s: usb_control_msg() failed %d\n", dev_err(&dev->idev->dev, "%s: usb_control_msg() failed %d\n",
__func__, error); __func__, error);
} }
......
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