diff options
Diffstat (limited to 'drivers/input/tablet/aiptek.c')
-rw-r--r-- | drivers/input/tablet/aiptek.c | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/drivers/input/tablet/aiptek.c b/drivers/input/tablet/aiptek.c index 205d16aab44..755a39e4c9e 100644 --- a/drivers/input/tablet/aiptek.c +++ b/drivers/input/tablet/aiptek.c | |||
@@ -309,6 +309,7 @@ struct aiptek_settings { | |||
309 | struct aiptek { | 309 | struct 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,13 +449,13 @@ 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 | dbg("%s - urb shutting down with status: %d", | 452 | dev_dbg(&intf->dev, "%s - urb shutting down with status: %d\n", |
451 | __func__, urb->status); | 453 | __func__, urb->status); |
452 | return; | 454 | return; |
453 | 455 | ||
454 | default: | 456 | default: |
455 | dbg("%s - nonzero urb status received: %d", | 457 | dev_dbg(&intf->dev, "%s - nonzero urb status received: %d\n", |
456 | __func__, urb->status); | 458 | __func__, urb->status); |
457 | goto exit; | 459 | goto exit; |
458 | } | 460 | } |
459 | 461 | ||
@@ -785,7 +787,7 @@ static void aiptek_irq(struct urb *urb) | |||
785 | 1 | AIPTEK_REPORT_TOOL_UNKNOWN); | 787 | 1 | AIPTEK_REPORT_TOOL_UNKNOWN); |
786 | input_sync(inputdev); | 788 | input_sync(inputdev); |
787 | } else { | 789 | } else { |
788 | dbg("Unknown report %d", data[0]); | 790 | dev_dbg(&intf->dev, "Unknown report %d\n", data[0]); |
789 | } | 791 | } |
790 | 792 | ||
791 | /* 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 |
@@ -811,8 +813,9 @@ static void aiptek_irq(struct urb *urb) | |||
811 | exit: | 813 | exit: |
812 | retval = usb_submit_urb(urb, GFP_ATOMIC); | 814 | retval = usb_submit_urb(urb, GFP_ATOMIC); |
813 | if (retval != 0) { | 815 | if (retval != 0) { |
814 | err("%s - usb_submit_urb failed with result %d", | 816 | dev_err(&intf->dev, |
815 | __func__, retval); | 817 | "%s - usb_submit_urb failed with result %d\n", |
818 | __func__, retval); | ||
816 | } | 819 | } |
817 | } | 820 | } |
818 | 821 | ||
@@ -912,8 +915,9 @@ aiptek_command(struct aiptek *aiptek, unsigned char command, unsigned char data) | |||
912 | 915 | ||
913 | if ((ret = | 916 | if ((ret = |
914 | aiptek_set_report(aiptek, 3, 2, buf, sizeof_buf)) != sizeof_buf) { | 917 | aiptek_set_report(aiptek, 3, 2, buf, sizeof_buf)) != sizeof_buf) { |
915 | dbg("aiptek_program: failed, tried to send: 0x%02x 0x%02x", | 918 | dev_dbg(&aiptek->intf->dev, |
916 | command, data); | 919 | "aiptek_program: failed, tried to send: 0x%02x 0x%02x\n", |
920 | command, data); | ||
917 | } | 921 | } |
918 | kfree(buf); | 922 | kfree(buf); |
919 | return ret < 0 ? ret : 0; | 923 | return ret < 0 ? ret : 0; |
@@ -947,8 +951,9 @@ aiptek_query(struct aiptek *aiptek, unsigned char command, unsigned char data) | |||
947 | 951 | ||
948 | if ((ret = | 952 | if ((ret = |
949 | aiptek_get_report(aiptek, 3, 2, buf, sizeof_buf)) != sizeof_buf) { | 953 | aiptek_get_report(aiptek, 3, 2, buf, sizeof_buf)) != sizeof_buf) { |
950 | dbg("aiptek_query failed: returned 0x%02x 0x%02x 0x%02x", | 954 | dev_dbg(&aiptek->intf->dev, |
951 | buf[0], buf[1], buf[2]); | 955 | "aiptek_query failed: returned 0x%02x 0x%02x 0x%02x\n", |
956 | buf[0], buf[1], buf[2]); | ||
952 | ret = -EIO; | 957 | ret = -EIO; |
953 | } else { | 958 | } else { |
954 | ret = get_unaligned_le16(buf + 1); | 959 | ret = get_unaligned_le16(buf + 1); |
@@ -1726,6 +1731,7 @@ aiptek_probe(struct usb_interface *intf, const struct usb_device_id *id) | |||
1726 | 1731 | ||
1727 | aiptek->inputdev = inputdev; | 1732 | aiptek->inputdev = inputdev; |
1728 | aiptek->usbdev = usbdev; | 1733 | aiptek->usbdev = usbdev; |
1734 | aiptek->intf = intf; | ||
1729 | aiptek->ifnum = intf->altsetting[0].desc.bInterfaceNumber; | 1735 | aiptek->ifnum = intf->altsetting[0].desc.bInterfaceNumber; |
1730 | aiptek->inDelay = 0; | 1736 | aiptek->inDelay = 0; |
1731 | aiptek->endDelay = 0; | 1737 | aiptek->endDelay = 0; |