aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/input/usbtouchscreen.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/usbtouchscreen.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/usbtouchscreen.c')
-rw-r--r--drivers/usb/input/usbtouchscreen.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/usb/input/usbtouchscreen.c b/drivers/usb/input/usbtouchscreen.c
index 86e37a20f8e..169692729b8 100644
--- a/drivers/usb/input/usbtouchscreen.c
+++ b/drivers/usb/input/usbtouchscreen.c
@@ -647,7 +647,7 @@ exit:
647 647
648static int usbtouch_open(struct input_dev *input) 648static int usbtouch_open(struct input_dev *input)
649{ 649{
650 struct usbtouch_usb *usbtouch = input->private; 650 struct usbtouch_usb *usbtouch = input_get_drvdata(input);
651 651
652 usbtouch->irq->dev = usbtouch->udev; 652 usbtouch->irq->dev = usbtouch->udev;
653 653
@@ -659,7 +659,7 @@ static int usbtouch_open(struct input_dev *input)
659 659
660static void usbtouch_close(struct input_dev *input) 660static void usbtouch_close(struct input_dev *input)
661{ 661{
662 struct usbtouch_usb *usbtouch = input->private; 662 struct usbtouch_usb *usbtouch = input_get_drvdata(input);
663 663
664 usb_kill_urb(usbtouch->irq); 664 usb_kill_urb(usbtouch->irq);
665} 665}
@@ -741,7 +741,9 @@ static int usbtouch_probe(struct usb_interface *intf,
741 input_dev->phys = usbtouch->phys; 741 input_dev->phys = usbtouch->phys;
742 usb_to_input_id(udev, &input_dev->id); 742 usb_to_input_id(udev, &input_dev->id);
743 input_dev->cdev.dev = &intf->dev; 743 input_dev->cdev.dev = &intf->dev;
744 input_dev->private = usbtouch; 744
745 input_set_drvdata(input_dev, usbtouch);
746
745 input_dev->open = usbtouch_open; 747 input_dev->open = usbtouch_open;
746 input_dev->close = usbtouch_close; 748 input_dev->close = usbtouch_close;
747 749