Commit 334698d4 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

USB: input: acecad.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: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ab943ca8
...@@ -51,6 +51,7 @@ struct usb_acecad { ...@@ -51,6 +51,7 @@ struct usb_acecad {
char name[128]; char name[128];
char phys[64]; char phys[64];
struct usb_device *usbdev; struct usb_device *usbdev;
struct usb_interface *intf;
struct input_dev *input; struct input_dev *input;
struct urb *irq; struct urb *irq;
...@@ -63,6 +64,7 @@ static void usb_acecad_irq(struct urb *urb) ...@@ -63,6 +64,7 @@ static void usb_acecad_irq(struct urb *urb)
struct usb_acecad *acecad = urb->context; struct usb_acecad *acecad = urb->context;
unsigned char *data = acecad->data; unsigned char *data = acecad->data;
struct input_dev *dev = acecad->input; struct input_dev *dev = acecad->input;
struct usb_interface *intf = acecad->intf;
int prox, status; int prox, status;
switch (urb->status) { switch (urb->status) {
...@@ -73,11 +75,11 @@ static void usb_acecad_irq(struct urb *urb) ...@@ -73,11 +75,11 @@ static void usb_acecad_irq(struct urb *urb)
case -ENOENT: case -ENOENT:
case -ESHUTDOWN: case -ESHUTDOWN:
/* this urb is terminated, clean up */ /* 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); __func__, urb->status);
return; return;
default: 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); __func__, urb->status);
goto resubmit; goto resubmit;
} }
...@@ -107,7 +109,7 @@ static void usb_acecad_irq(struct urb *urb) ...@@ -107,7 +109,7 @@ static void usb_acecad_irq(struct urb *urb)
resubmit: resubmit:
status = usb_submit_urb(urb, GFP_ATOMIC); status = usb_submit_urb(urb, GFP_ATOMIC);
if (status) if (status)
dev_err(&dev->dev, dev_err(&intf->dev,
"can't resubmit intr, %s-%s/input0, status %d\n", "can't resubmit intr, %s-%s/input0, status %d\n",
acecad->usbdev->bus->bus_name, acecad->usbdev->bus->bus_name,
acecad->usbdev->devpath, status); acecad->usbdev->devpath, status);
...@@ -172,6 +174,7 @@ static int usb_acecad_probe(struct usb_interface *intf, const struct usb_device_ ...@@ -172,6 +174,7 @@ static int usb_acecad_probe(struct usb_interface *intf, const struct usb_device_
} }
acecad->usbdev = dev; acecad->usbdev = dev;
acecad->intf = intf;
acecad->input = input_dev; acecad->input = input_dev;
if (dev->manufacturer) if (dev->manufacturer)
......
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