Skip to content

Commit

Permalink
USB: input: acecad.c: fix up dev_* messages
Browse files Browse the repository at this point in the history
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: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Greg Kroah-Hartman committed May 4, 2012
1 parent ab943ca commit 334698d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions drivers/input/tablet/acecad.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ struct usb_acecad {
char name[128];
char phys[64];
struct usb_device *usbdev;
struct usb_interface *intf;
struct input_dev *input;
struct urb *irq;

Expand All @@ -63,6 +64,7 @@ static void usb_acecad_irq(struct urb *urb)
struct usb_acecad *acecad = urb->context;
unsigned char *data = acecad->data;
struct input_dev *dev = acecad->input;
struct usb_interface *intf = acecad->intf;
int prox, status;

switch (urb->status) {
Expand All @@ -73,11 +75,11 @@ static void usb_acecad_irq(struct urb *urb)
case -ENOENT:
case -ESHUTDOWN:
/* this urb is terminated, clean up */
dev_dbg(&dev->dev, "%s - urb shutting down with status: %d\n",
dev_dbg(&intf->dev, "%s - urb shutting down with status: %d\n",
__func__, urb->status);
return;
default:
dev_dbg(&dev->dev, "%s - nonzero urb status received: %d\n",
dev_dbg(&intf->dev, "%s - nonzero urb status received: %d\n",
__func__, urb->status);
goto resubmit;
}
Expand Down Expand Up @@ -107,7 +109,7 @@ static void usb_acecad_irq(struct urb *urb)
resubmit:
status = usb_submit_urb(urb, GFP_ATOMIC);
if (status)
dev_err(&dev->dev,
dev_err(&intf->dev,
"can't resubmit intr, %s-%s/input0, status %d\n",
acecad->usbdev->bus->bus_name,
acecad->usbdev->devpath, status);
Expand Down Expand Up @@ -172,6 +174,7 @@ static int usb_acecad_probe(struct usb_interface *intf, const struct usb_device_
}

acecad->usbdev = dev;
acecad->intf = intf;
acecad->input = input_dev;

if (dev->manufacturer)
Expand Down

0 comments on commit 334698d

Please sign in to comment.