Commit 140b1230 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

USB: input: bcm5974.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: Henrik Rydberg <rydberg@euromail.se>
CC: Alessandro Rubini <rubini@ipvvis.unipv.it>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 80f8594f
...@@ -584,7 +584,7 @@ static int bcm5974_wellspring_mode(struct bcm5974 *dev, bool on) ...@@ -584,7 +584,7 @@ static int bcm5974_wellspring_mode(struct bcm5974 *dev, bool on)
int retval = 0, size; int retval = 0, size;
if (!data) { if (!data) {
dev_err(&dev->intf->dev, "out of memory\n"); dev_err(&dev->input->dev, "out of memory\n");
retval = -ENOMEM; retval = -ENOMEM;
goto out; goto out;
} }
...@@ -597,7 +597,7 @@ static int bcm5974_wellspring_mode(struct bcm5974 *dev, bool on) ...@@ -597,7 +597,7 @@ static int bcm5974_wellspring_mode(struct bcm5974 *dev, bool on)
BCM5974_WELLSPRING_MODE_REQUEST_INDEX, data, 8, 5000); BCM5974_WELLSPRING_MODE_REQUEST_INDEX, data, 8, 5000);
if (size != 8) { if (size != 8) {
dev_err(&dev->intf->dev, "could not read from device\n"); dev_err(&dev->input->dev, "could not read from device\n");
retval = -EIO; retval = -EIO;
goto out; goto out;
} }
...@@ -615,7 +615,7 @@ static int bcm5974_wellspring_mode(struct bcm5974 *dev, bool on) ...@@ -615,7 +615,7 @@ static int bcm5974_wellspring_mode(struct bcm5974 *dev, bool on)
BCM5974_WELLSPRING_MODE_REQUEST_INDEX, data, 8, 5000); BCM5974_WELLSPRING_MODE_REQUEST_INDEX, data, 8, 5000);
if (size != 8) { if (size != 8) {
dev_err(&dev->intf->dev, "could not write to device\n"); dev_err(&dev->input->dev, "could not write to device\n");
retval = -EIO; retval = -EIO;
goto out; goto out;
} }
...@@ -654,7 +654,7 @@ static void bcm5974_irq_button(struct urb *urb) ...@@ -654,7 +654,7 @@ static void bcm5974_irq_button(struct urb *urb)
exit: exit:
error = usb_submit_urb(dev->bt_urb, GFP_ATOMIC); error = usb_submit_urb(dev->bt_urb, GFP_ATOMIC);
if (error) if (error)
dev_err(&dev->intf->dev, "button urb failed: %d\n", error); dev_err(&dev->input->dev, "button urb failed: %d\n", error);
} }
static void bcm5974_irq_trackpad(struct urb *urb) static void bcm5974_irq_trackpad(struct urb *urb)
...@@ -687,7 +687,7 @@ static void bcm5974_irq_trackpad(struct urb *urb) ...@@ -687,7 +687,7 @@ static void bcm5974_irq_trackpad(struct urb *urb)
exit: exit:
error = usb_submit_urb(dev->tp_urb, GFP_ATOMIC); error = usb_submit_urb(dev->tp_urb, GFP_ATOMIC);
if (error) if (error)
dev_err(&dev->intf->dev, "trackpad urb failed: %d\n", error); dev_err(&dev->input->dev, "trackpad urb failed: %d\n", 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