aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/input/aiptek.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/input/aiptek.c')
-rw-r--r--drivers/usb/input/aiptek.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/usb/input/aiptek.c b/drivers/usb/input/aiptek.c
index 8c1ab1cbd233..8b33a8eae8a1 100644
--- a/drivers/usb/input/aiptek.c
+++ b/drivers/usb/input/aiptek.c
@@ -798,7 +798,7 @@ MODULE_DEVICE_TABLE(usb, aiptek_ids);
798 */ 798 */
799static int aiptek_open(struct input_dev *inputdev) 799static int aiptek_open(struct input_dev *inputdev)
800{ 800{
801 struct aiptek *aiptek = inputdev->private; 801 struct aiptek *aiptek = input_get_drvdata(inputdev);
802 802
803 aiptek->urb->dev = aiptek->usbdev; 803 aiptek->urb->dev = aiptek->usbdev;
804 if (usb_submit_urb(aiptek->urb, GFP_KERNEL) != 0) 804 if (usb_submit_urb(aiptek->urb, GFP_KERNEL) != 0)
@@ -812,7 +812,7 @@ static int aiptek_open(struct input_dev *inputdev)
812 */ 812 */
813static void aiptek_close(struct input_dev *inputdev) 813static void aiptek_close(struct input_dev *inputdev)
814{ 814{
815 struct aiptek *aiptek = inputdev->private; 815 struct aiptek *aiptek = input_get_drvdata(inputdev);
816 816
817 usb_kill_urb(aiptek->urb); 817 usb_kill_urb(aiptek->urb);
818} 818}
@@ -2045,7 +2045,9 @@ aiptek_probe(struct usb_interface *intf, const struct usb_device_id *id)
2045 inputdev->phys = aiptek->features.usbPath; 2045 inputdev->phys = aiptek->features.usbPath;
2046 usb_to_input_id(usbdev, &inputdev->id); 2046 usb_to_input_id(usbdev, &inputdev->id);
2047 inputdev->cdev.dev = &intf->dev; 2047 inputdev->cdev.dev = &intf->dev;
2048 inputdev->private = aiptek; 2048
2049 input_set_drvdata(inputdev, aiptek);
2050
2049 inputdev->open = aiptek_open; 2051 inputdev->open = aiptek_open;
2050 inputdev->close = aiptek_close; 2052 inputdev->close = aiptek_close;
2051 2053