Commit ab943ca8 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

USB: input: bcm5974.c: fix up dev_* messages

Previously I had made the struct device point to the input device, but
after talking with Dmitry, he said that the USB device would make more
sense for this driver to point to.  So converted it to use that instead.

CC: Henrik Rydberg <rydberg@euromail.se>
CC: Alessandro Rubini <rubini@ipvvis.unipv.it>
CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2d744b09
...@@ -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->input->dev, "out of memory\n"); dev_err(&dev->intf->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->input->dev, "could not read from device\n"); dev_err(&dev->intf->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->input->dev, "could not write to device\n"); dev_err(&dev->intf->dev, "could not write to device\n");
retval = -EIO; retval = -EIO;
goto out; goto out;
} }
...@@ -631,7 +631,7 @@ static int bcm5974_wellspring_mode(struct bcm5974 *dev, bool on) ...@@ -631,7 +631,7 @@ static int bcm5974_wellspring_mode(struct bcm5974 *dev, bool on)
static void bcm5974_irq_button(struct urb *urb) static void bcm5974_irq_button(struct urb *urb)
{ {
struct bcm5974 *dev = urb->context; struct bcm5974 *dev = urb->context;
struct input_dev *idev = dev->input; struct usb_interface *intf = dev->intf;
int error; int error;
switch (urb->status) { switch (urb->status) {
...@@ -641,11 +641,11 @@ static void bcm5974_irq_button(struct urb *urb) ...@@ -641,11 +641,11 @@ static void bcm5974_irq_button(struct urb *urb)
case -ECONNRESET: case -ECONNRESET:
case -ENOENT: case -ENOENT:
case -ESHUTDOWN: case -ESHUTDOWN:
dev_dbg(&idev->dev, "button urb shutting down: %d\n", dev_dbg(&intf->dev, "button urb shutting down: %d\n",
urb->status); urb->status);
return; return;
default: default:
dev_dbg(&idev->dev, "button urb status: %d\n", urb->status); dev_dbg(&intf->dev, "button urb status: %d\n", urb->status);
goto exit; goto exit;
} }
...@@ -656,13 +656,13 @@ static void bcm5974_irq_button(struct urb *urb) ...@@ -656,13 +656,13 @@ 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(&idev->dev, "button urb failed: %d\n", error); dev_err(&intf->dev, "button urb failed: %d\n", error);
} }
static void bcm5974_irq_trackpad(struct urb *urb) static void bcm5974_irq_trackpad(struct urb *urb)
{ {
struct bcm5974 *dev = urb->context; struct bcm5974 *dev = urb->context;
struct input_dev *idev = dev->input; struct usb_interface *intf = dev->intf;
int error; int error;
switch (urb->status) { switch (urb->status) {
...@@ -672,11 +672,11 @@ static void bcm5974_irq_trackpad(struct urb *urb) ...@@ -672,11 +672,11 @@ static void bcm5974_irq_trackpad(struct urb *urb)
case -ECONNRESET: case -ECONNRESET:
case -ENOENT: case -ENOENT:
case -ESHUTDOWN: case -ESHUTDOWN:
dev_dbg(&idev->dev, "trackpad urb shutting down: %d\n", dev_dbg(&intf->dev, "trackpad urb shutting down: %d\n",
urb->status); urb->status);
return; return;
default: default:
dev_dbg(&idev->dev, "trackpad urb status: %d\n", urb->status); dev_dbg(&intf->dev, "trackpad urb status: %d\n", urb->status);
goto exit; goto exit;
} }
...@@ -691,7 +691,7 @@ static void bcm5974_irq_trackpad(struct urb *urb) ...@@ -691,7 +691,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(&idev->dev, "trackpad urb failed: %d\n", error); dev_err(&intf->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