USB: input: aiptek.c: fix up dev_* messages
[deliverable/linux.git] / drivers / input / tablet / aiptek.c
index 37dba769bf0f09ee3235f9683bd82522ac7a80cd..755a39e4c9e9b6c599dd52d8e97f1a5b264d0e31 100644 (file)
@@ -309,6 +309,7 @@ struct aiptek_settings {
 struct aiptek {
        struct input_dev *inputdev;             /* input device struct           */
        struct usb_device *usbdev;              /* usb device struct             */
+       struct usb_interface *intf;             /* usb interface struct          */
        struct urb *urb;                        /* urb for incoming reports      */
        dma_addr_t data_dma;                    /* our dma stuffage              */
        struct aiptek_features features;        /* tablet's array of features    */
@@ -435,6 +436,7 @@ static void aiptek_irq(struct urb *urb)
        struct aiptek *aiptek = urb->context;
        unsigned char *data = aiptek->data;
        struct input_dev *inputdev = aiptek->inputdev;
+       struct usb_interface *intf = aiptek->intf;
        int jitterable = 0;
        int retval, macro, x, y, z, left, right, middle, p, dv, tip, bs, pck;
 
@@ -447,14 +449,12 @@ static void aiptek_irq(struct urb *urb)
        case -ENOENT:
        case -ESHUTDOWN:
                /* This urb is terminated, clean up */
-               dev_dbg(&inputdev->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(&inputdev->dev,
-                       "%s - nonzero urb status received: %d\n",
+               dev_dbg(&intf->dev, "%s - nonzero urb status received: %d\n",
                        __func__, urb->status);
                goto exit;
        }
@@ -787,7 +787,7 @@ static void aiptek_irq(struct urb *urb)
                                 1 | AIPTEK_REPORT_TOOL_UNKNOWN);
                input_sync(inputdev);
        } else {
-               dev_dbg(&inputdev->dev, "Unknown report %d\n", data[0]);
+               dev_dbg(&intf->dev, "Unknown report %d\n", data[0]);
        }
 
        /* Jitter may occur when the user presses a button on the stlyus
@@ -813,7 +813,7 @@ static void aiptek_irq(struct urb *urb)
 exit:
        retval = usb_submit_urb(urb, GFP_ATOMIC);
        if (retval != 0) {
-               dev_err(&inputdev->dev,
+               dev_err(&intf->dev,
                        "%s - usb_submit_urb failed with result %d\n",
                        __func__, retval);
        }
@@ -915,7 +915,7 @@ aiptek_command(struct aiptek *aiptek, unsigned char command, unsigned char data)
 
        if ((ret =
             aiptek_set_report(aiptek, 3, 2, buf, sizeof_buf)) != sizeof_buf) {
-               dev_dbg(&aiptek->inputdev->dev,
+               dev_dbg(&aiptek->intf->dev,
                        "aiptek_program: failed, tried to send: 0x%02x 0x%02x\n",
                        command, data);
        }
@@ -951,7 +951,7 @@ aiptek_query(struct aiptek *aiptek, unsigned char command, unsigned char data)
 
        if ((ret =
             aiptek_get_report(aiptek, 3, 2, buf, sizeof_buf)) != sizeof_buf) {
-               dev_dbg(&aiptek->inputdev->dev,
+               dev_dbg(&aiptek->intf->dev,
                        "aiptek_query failed: returned 0x%02x 0x%02x 0x%02x\n",
                        buf[0], buf[1], buf[2]);
                ret = -EIO;
@@ -1731,6 +1731,7 @@ aiptek_probe(struct usb_interface *intf, const struct usb_device_id *id)
 
        aiptek->inputdev = inputdev;
        aiptek->usbdev = usbdev;
+       aiptek->intf = intf;
        aiptek->ifnum = intf->altsetting[0].desc.bInterfaceNumber;
        aiptek->inDelay = 0;
        aiptek->endDelay = 0;
This page took 0.034701 seconds and 5 git commands to generate.