From 334698d435b4446d796a2059284256b9d28a0d19 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 4 May 2012 15:33:04 -0700 Subject: [PATCH] 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 Signed-off-by: Greg Kroah-Hartman --- drivers/input/tablet/acecad.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/input/tablet/acecad.c b/drivers/input/tablet/acecad.c index baa9d4ad0d0..e062ec899ca 100644 --- a/drivers/input/tablet/acecad.c +++ b/drivers/input/tablet/acecad.c @@ -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; @@ -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) { @@ -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; } @@ -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); @@ -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) -- 2.20.1