aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/tablet
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-05-04 18:33:09 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-05-04 18:33:09 -0400
commit27c2597d455a24507f1d0be6991a0a84b5c1b035 (patch)
tree9040577fcaf0232a6d786ed71b499a273bdcfc75 /drivers/input/tablet
parent871ba51c130d4f2e7d33b8c57e834df701357102 (diff)
USB: input: gtco.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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/input/tablet')
-rw-r--r--drivers/input/tablet/gtco.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/input/tablet/gtco.c b/drivers/input/tablet/gtco.c
index 422b1a2ef309..29e01ab6859f 100644
--- a/drivers/input/tablet/gtco.c
+++ b/drivers/input/tablet/gtco.c
@@ -106,6 +106,7 @@ struct gtco {
106 106
107 struct input_dev *inputdevice; /* input device struct pointer */ 107 struct input_dev *inputdevice; /* input device struct pointer */
108 struct usb_device *usbdev; /* the usb device for this device */ 108 struct usb_device *usbdev; /* the usb device for this device */
109 struct usb_interface *intf; /* the usb interface for this device */
109 struct urb *urbinfo; /* urb for incoming reports */ 110 struct urb *urbinfo; /* urb for incoming reports */
110 dma_addr_t buf_dma; /* dma addr of the data buffer*/ 111 dma_addr_t buf_dma; /* dma addr of the data buffer*/
111 unsigned char * buffer; /* databuffer for reports */ 112 unsigned char * buffer; /* databuffer for reports */
@@ -200,7 +201,7 @@ struct hid_descriptor
200static void parse_hid_report_descriptor(struct gtco *device, char * report, 201static void parse_hid_report_descriptor(struct gtco *device, char * report,
201 int length) 202 int length)
202{ 203{
203 struct device *ddev = &device->inputdevice->dev; 204 struct device *ddev = &device->intf->dev;
204 int x, i = 0; 205 int x, i = 0;
205 206
206 /* Tag primitive vars */ 207 /* Tag primitive vars */
@@ -713,7 +714,7 @@ static void gtco_urb_callback(struct urb *urbinfo)
713 * the rest as 0 714 * the rest as 0
714 */ 715 */
715 val = device->buffer[5] & MASK_BUTTON; 716 val = device->buffer[5] & MASK_BUTTON;
716 dev_dbg(&inputdev->dev, 717 dev_dbg(&device->intf->dev,
717 "======>>>>>>REPORT 1: val 0x%X(%d)\n", 718 "======>>>>>>REPORT 1: val 0x%X(%d)\n",
718 val, val); 719 val, val);
719 720
@@ -808,7 +809,7 @@ static void gtco_urb_callback(struct urb *urbinfo)
808 resubmit: 809 resubmit:
809 rc = usb_submit_urb(urbinfo, GFP_ATOMIC); 810 rc = usb_submit_urb(urbinfo, GFP_ATOMIC);
810 if (rc != 0) 811 if (rc != 0)
811 dev_err(&inputdev->dev, 812 dev_err(&device->intf->dev,
812 "usb_submit_urb failed rc=0x%x\n", rc); 813 "usb_submit_urb failed rc=0x%x\n", rc);
813} 814}
814 815
@@ -849,6 +850,7 @@ static int gtco_probe(struct usb_interface *usbinterface,
849 850
850 /* Save interface information */ 851 /* Save interface information */
851 gtco->usbdev = usb_get_dev(interface_to_usbdev(usbinterface)); 852 gtco->usbdev = usb_get_dev(interface_to_usbdev(usbinterface));
853 gtco->intf = usbinterface;
852 854
853 /* Allocate some data for incoming reports */ 855 /* Allocate some data for incoming reports */
854 gtco->buffer = usb_alloc_coherent(gtco->usbdev, REPORT_MAX_SIZE, 856 gtco->buffer = usb_alloc_coherent(gtco->usbdev, REPORT_MAX_SIZE,