aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/input/gtco.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/gtco.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/gtco.c')
-rw-r--r--drivers/usb/input/gtco.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/usb/input/gtco.c b/drivers/usb/input/gtco.c
index aa9c676ca79a..75cce2a97d20 100644
--- a/drivers/usb/input/gtco.c
+++ b/drivers/usb/input/gtco.c
@@ -540,8 +540,7 @@ static void parse_hid_report_descriptor(struct gtco *device, char * report,
540 */ 540 */
541static int gtco_input_open(struct input_dev *inputdev) 541static int gtco_input_open(struct input_dev *inputdev)
542{ 542{
543 struct gtco *device; 543 struct gtco *device = input_get_drvdata(inputdev);
544 device = inputdev->private;
545 544
546 device->urbinfo->dev = device->usbdev; 545 device->urbinfo->dev = device->usbdev;
547 if (usb_submit_urb(device->urbinfo, GFP_KERNEL)) 546 if (usb_submit_urb(device->urbinfo, GFP_KERNEL))
@@ -555,7 +554,7 @@ static int gtco_input_open(struct input_dev *inputdev)
555 */ 554 */
556static void gtco_input_close(struct input_dev *inputdev) 555static void gtco_input_close(struct input_dev *inputdev)
557{ 556{
558 struct gtco *device = inputdev->private; 557 struct gtco *device = input_get_drvdata(inputdev);
559 558
560 usb_kill_urb(device->urbinfo); 559 usb_kill_urb(device->urbinfo);
561} 560}
@@ -569,9 +568,9 @@ static void gtco_input_close(struct input_dev *inputdev)
569 * placed in the struct gtco structure 568 * placed in the struct gtco structure
570 * 569 *
571 */ 570 */
572static void gtco_setup_caps(struct input_dev *inputdev) 571static void gtco_setup_caps(struct input_dev *inputdev)
573{ 572{
574 struct gtco *device = inputdev->private; 573 struct gtco *device = input_get_drvdata(inputdev);
575 574
576 /* Which events */ 575 /* Which events */
577 inputdev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS) | BIT(EV_MSC); 576 inputdev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS) | BIT(EV_MSC);
@@ -945,7 +944,8 @@ static int gtco_probe(struct usb_interface *usbinterface,
945 /* Set input device information */ 944 /* Set input device information */
946 input_dev->name = "GTCO_CalComp"; 945 input_dev->name = "GTCO_CalComp";
947 input_dev->phys = gtco->usbpath; 946 input_dev->phys = gtco->usbpath;
948 input_dev->private = gtco; 947
948 input_set_drvdata(input_dev, gtco);
949 949
950 /* Now set up all the input device capabilities */ 950 /* Now set up all the input device capabilities */
951 gtco_setup_caps(input_dev); 951 gtco_setup_caps(input_dev);