aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/tablet
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-05-04 18:33:06 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-05-04 18:33:06 -0400
commit871ba51c130d4f2e7d33b8c57e834df701357102 (patch)
tree49e75fedb1e2248c10c882601328921db4b240a3 /drivers/input/tablet
parent334698d435b4446d796a2059284256b9d28a0d19 (diff)
USB: input: aiptek.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> CC: Jesper Juhl <jj@chaosbits.net> CC: JJ Ding <dgdunix@gmail.com> CC: Edwin van Vliet <edwin@cheatah.nl> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/input/tablet')
-rw-r--r--drivers/input/tablet/aiptek.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/input/tablet/aiptek.c b/drivers/input/tablet/aiptek.c
index 37dba769bf0..755a39e4c9e 100644
--- a/drivers/input/tablet/aiptek.c
+++ b/drivers/input/tablet/aiptek.c
@@ -309,6 +309,7 @@ struct aiptek_settings {
309struct aiptek { 309struct aiptek {
310 struct input_dev *inputdev; /* input device struct */ 310 struct input_dev *inputdev; /* input device struct */
311 struct usb_device *usbdev; /* usb device struct */ 311 struct usb_device *usbdev; /* usb device struct */
312 struct usb_interface *intf; /* usb interface struct */
312 struct urb *urb; /* urb for incoming reports */ 313 struct urb *urb; /* urb for incoming reports */
313 dma_addr_t data_dma; /* our dma stuffage */ 314 dma_addr_t data_dma; /* our dma stuffage */
314 struct aiptek_features features; /* tablet's array of features */ 315 struct aiptek_features features; /* tablet's array of features */
@@ -435,6 +436,7 @@ static void aiptek_irq(struct urb *urb)
435 struct aiptek *aiptek = urb->context; 436 struct aiptek *aiptek = urb->context;
436 unsigned char *data = aiptek->data; 437 unsigned char *data = aiptek->data;
437 struct input_dev *inputdev = aiptek->inputdev; 438 struct input_dev *inputdev = aiptek->inputdev;
439 struct usb_interface *intf = aiptek->intf;
438 int jitterable = 0; 440 int jitterable = 0;
439 int retval, macro, x, y, z, left, right, middle, p, dv, tip, bs, pck; 441 int retval, macro, x, y, z, left, right, middle, p, dv, tip, bs, pck;
440 442
@@ -447,14 +449,12 @@ static void aiptek_irq(struct urb *urb)
447 case -ENOENT: 449 case -ENOENT:
448 case -ESHUTDOWN: 450 case -ESHUTDOWN:
449 /* This urb is terminated, clean up */ 451 /* This urb is terminated, clean up */
450 dev_dbg(&inputdev->dev, 452 dev_dbg(&intf->dev, "%s - urb shutting down with status: %d\n",
451 "%s - urb shutting down with status: %d\n",
452 __func__, urb->status); 453 __func__, urb->status);
453 return; 454 return;
454 455
455 default: 456 default:
456 dev_dbg(&inputdev->dev, 457 dev_dbg(&intf->dev, "%s - nonzero urb status received: %d\n",
457 "%s - nonzero urb status received: %d\n",
458 __func__, urb->status); 458 __func__, urb->status);
459 goto exit; 459 goto exit;
460 } 460 }
@@ -787,7 +787,7 @@ static void aiptek_irq(struct urb *urb)
787 1 | AIPTEK_REPORT_TOOL_UNKNOWN); 787 1 | AIPTEK_REPORT_TOOL_UNKNOWN);
788 input_sync(inputdev); 788 input_sync(inputdev);
789 } else { 789 } else {
790 dev_dbg(&inputdev->dev, "Unknown report %d\n", data[0]); 790 dev_dbg(&intf->dev, "Unknown report %d\n", data[0]);
791 } 791 }
792 792
793 /* Jitter may occur when the user presses a button on the stlyus 793 /* Jitter may occur when the user presses a button on the stlyus
@@ -813,7 +813,7 @@ static void aiptek_irq(struct urb *urb)
813exit: 813exit:
814 retval = usb_submit_urb(urb, GFP_ATOMIC); 814 retval = usb_submit_urb(urb, GFP_ATOMIC);
815 if (retval != 0) { 815 if (retval != 0) {
816 dev_err(&inputdev->dev, 816 dev_err(&intf->dev,
817 "%s - usb_submit_urb failed with result %d\n", 817 "%s - usb_submit_urb failed with result %d\n",
818 __func__, retval); 818 __func__, retval);
819 } 819 }
@@ -915,7 +915,7 @@ aiptek_command(struct aiptek *aiptek, unsigned char command, unsigned char data)
915 915
916 if ((ret = 916 if ((ret =
917 aiptek_set_report(aiptek, 3, 2, buf, sizeof_buf)) != sizeof_buf) { 917 aiptek_set_report(aiptek, 3, 2, buf, sizeof_buf)) != sizeof_buf) {
918 dev_dbg(&aiptek->inputdev->dev, 918 dev_dbg(&aiptek->intf->dev,
919 "aiptek_program: failed, tried to send: 0x%02x 0x%02x\n", 919 "aiptek_program: failed, tried to send: 0x%02x 0x%02x\n",
920 command, data); 920 command, data);
921 } 921 }
@@ -951,7 +951,7 @@ aiptek_query(struct aiptek *aiptek, unsigned char command, unsigned char data)
951 951
952 if ((ret = 952 if ((ret =
953 aiptek_get_report(aiptek, 3, 2, buf, sizeof_buf)) != sizeof_buf) { 953 aiptek_get_report(aiptek, 3, 2, buf, sizeof_buf)) != sizeof_buf) {
954 dev_dbg(&aiptek->inputdev->dev, 954 dev_dbg(&aiptek->intf->dev,
955 "aiptek_query failed: returned 0x%02x 0x%02x 0x%02x\n", 955 "aiptek_query failed: returned 0x%02x 0x%02x 0x%02x\n",
956 buf[0], buf[1], buf[2]); 956 buf[0], buf[1], buf[2]);
957 ret = -EIO; 957 ret = -EIO;
@@ -1731,6 +1731,7 @@ aiptek_probe(struct usb_interface *intf, const struct usb_device_id *id)
1731 1731
1732 aiptek->inputdev = inputdev; 1732 aiptek->inputdev = inputdev;
1733 aiptek->usbdev = usbdev; 1733 aiptek->usbdev = usbdev;
1734 aiptek->intf = intf;
1734 aiptek->ifnum = intf->altsetting[0].desc.bInterfaceNumber; 1735 aiptek->ifnum = intf->altsetting[0].desc.bInterfaceNumber;
1735 aiptek->inDelay = 0; 1736 aiptek->inDelay = 0;
1736 aiptek->endDelay = 0; 1737 aiptek->endDelay = 0;