aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/tablet/aiptek.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-05-22 18:50:46 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-05-22 18:50:46 -0400
commita481991467d38afb43c3921d5b5b59ccb61b04ba (patch)
treea4b0b9a14da6fd5ef7b9b512bb32dbfcfcf2cd71 /drivers/input/tablet/aiptek.c
parentf6a26ae7699416d86bea8cb68ce413571e9cab3c (diff)
parentcda4db53e9c28061c100400e1a4d273ea61dfba9 (diff)
Merge tag 'usb-3.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB 3.5-rc1 changes from Greg Kroah-Hartman: "Here is the big USB 3.5-rc1 pull request for the 3.5-rc1 merge window. It's touches a lot of different parts of the kernel, all USB drivers, due to some API cleanups (getting rid of the ancient err() macro) and some changes that are needed for USB 3.0 power management updates. There are also lots of new drivers, pimarily gadget, but others as well. We deleted a staging driver, which was nice, and finally dropped the obsolete usbfs code, which will make Al happy to never have to touch that again. There were some build errors in the tree that linux-next found a few days ago, but those were fixed by the most recent changes (all were due to us not building with CONFIG_PM disabled.) Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>" * tag 'usb-3.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (477 commits) xhci: Fix DIV_ROUND_UP compile error. xhci: Fix compile with CONFIG_USB_SUSPEND=n USB: Fix core compile with CONFIG_USB_SUSPEND=n brcm80211: Fix compile error for .disable_hub_initiated_lpm. Revert "USB: EHCI: work around bug in the Philips ISP1562 controller" MAINTAINERS: Add myself as maintainer to the USB PHY Layer USB: EHCI: fix command register configuration lost problem USB: Remove races in devio.c USB: ehci-platform: remove update_device USB: Disable hub-initiated LPM for comms devices. xhci: Add Intel U1/U2 timeout policy. xhci: Add infrastructure for host-specific LPM policies. USB: Add macros for interrupt endpoint types. xhci: Reserve one command for USB3 LPM disable. xhci: Some Evaluate Context commands must succeed. USB: Disable USB 3.0 LPM in critical sections. USB: Add support to enable/disable USB3 link states. USB: Allow drivers to disable hub-initiated LPM. USB: Calculate USB 3.0 exit latencies for LPM. USB: Refactor code to set LPM support flag. ... Conflicts: arch/arm/mach-exynos/mach-nuri.c arch/arm/mach-exynos/mach-universal_c210.c drivers/net/wireless/ath/ath6kl/usb.c
Diffstat (limited to 'drivers/input/tablet/aiptek.c')
-rw-r--r--drivers/input/tablet/aiptek.c28
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 {
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,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)
811exit: 813exit:
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;