summaryrefslogtreecommitdiffstats
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)
downloadblackbird-op-linux-7791bdae71243050132ede7ea1558c828b69458f.tar.gz
blackbird-op-linux-7791bdae71243050132ede7ea1558c828b69458f.zip
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);
*/
static int aiptek_open(struct input_dev *inputdev)
{
- struct aiptek *aiptek = inputdev->private;
+ struct aiptek *aiptek = input_get_drvdata(inputdev);
aiptek->urb->dev = aiptek->usbdev;
if (usb_submit_urb(aiptek->urb, GFP_KERNEL) != 0)
@@ -812,7 +812,7 @@ static int aiptek_open(struct input_dev *inputdev)
*/
static void aiptek_close(struct input_dev *inputdev)
{
- struct aiptek *aiptek = inputdev->private;
+ struct aiptek *aiptek = input_get_drvdata(inputdev);
usb_kill_urb(aiptek->urb);
}
@@ -2045,7 +2045,9 @@ aiptek_probe(struct usb_interface *intf, const struct usb_device_id *id)
inputdev->phys = aiptek->features.usbPath;
usb_to_input_id(usbdev, &inputdev->id);
inputdev->cdev.dev = &intf->dev;
- inputdev->private = aiptek;
+
+ input_set_drvdata(inputdev, aiptek);
+
inputdev->open = aiptek_open;
inputdev->close = aiptek_close;
OpenPOWER on IntegriCloud