Commit 3b449fe5 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

USB: input: keyspan_remote.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>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 388fd202
...@@ -267,7 +267,7 @@ static void keyspan_check_data(struct usb_keyspan *remote) ...@@ -267,7 +267,7 @@ static void keyspan_check_data(struct usb_keyspan *remote)
remote->data.tester = remote->data.tester >> 6; remote->data.tester = remote->data.tester >> 6;
remote->data.bits_left -= 6; remote->data.bits_left -= 6;
} else { } else {
dev_err(&remote->udev->dev, dev_err(&remote->input->dev,
"%s - Unknown sequence found in system data.\n", "%s - Unknown sequence found in system data.\n",
__func__); __func__);
remote->stage = 0; remote->stage = 0;
...@@ -288,7 +288,7 @@ static void keyspan_check_data(struct usb_keyspan *remote) ...@@ -288,7 +288,7 @@ static void keyspan_check_data(struct usb_keyspan *remote)
remote->data.tester = remote->data.tester >> 6; remote->data.tester = remote->data.tester >> 6;
remote->data.bits_left -= 6; remote->data.bits_left -= 6;
} else { } else {
dev_err(&remote->udev->dev, dev_err(&remote->input->dev,
"%s - Unknown sequence found in button data.\n", "%s - Unknown sequence found in button data.\n",
__func__); __func__);
remote->stage = 0; remote->stage = 0;
...@@ -306,7 +306,7 @@ static void keyspan_check_data(struct usb_keyspan *remote) ...@@ -306,7 +306,7 @@ static void keyspan_check_data(struct usb_keyspan *remote)
remote->data.tester = remote->data.tester >> 6; remote->data.tester = remote->data.tester >> 6;
remote->data.bits_left -= 6; remote->data.bits_left -= 6;
} else { } else {
dev_err(&remote->udev->dev, dev_err(&remote->input->dev,
"%s - Error in message, invalid toggle.\n", "%s - Error in message, invalid toggle.\n",
__func__); __func__);
remote->stage = 0; remote->stage = 0;
...@@ -318,7 +318,7 @@ static void keyspan_check_data(struct usb_keyspan *remote) ...@@ -318,7 +318,7 @@ static void keyspan_check_data(struct usb_keyspan *remote)
remote->data.tester = remote->data.tester >> 5; remote->data.tester = remote->data.tester >> 5;
remote->data.bits_left -= 5; remote->data.bits_left -= 5;
} else { } else {
dev_err(&remote->udev->dev, dev_err(&remote->input->dev,
"Bad message received, no stop bit found.\n"); "Bad message received, no stop bit found.\n");
} }
...@@ -404,7 +404,7 @@ static void keyspan_irq_recv(struct urb *urb) ...@@ -404,7 +404,7 @@ static void keyspan_irq_recv(struct urb *urb)
resubmit: resubmit:
retval = usb_submit_urb(urb, GFP_ATOMIC); retval = usb_submit_urb(urb, GFP_ATOMIC);
if (retval) if (retval)
dev_err(&dev->udev->dev, dev_err(&dev->input->dev,
"%s - usb_submit_urb failed with result: %d\n", "%s - usb_submit_urb failed with result: %d\n",
__func__, retval); __func__, retval);
} }
......
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