aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/input/aiptek.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor@insightbb.com>2007-04-12 01:34:39 -0400
committerDmitry Torokhov <dtor@insightbb.com>2007-04-12 01:34:39 -0400
commit7791bdae71243050132ede7ea1558c828b69458f (patch)
treef6c3291deff0b7b8720405432245b6acf7cce218 /drivers/usb/input/aiptek.c
parent373f9713dccc8fc8e076157001a60133455c0550 (diff)
Input: drivers/usb/input - don't access dev->private directly
Use input_get_drvdata() and input_set_drvdata() instead. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
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