aboutsummaryrefslogtreecommitdiff
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 aa9c676ca79..75cce2a97d2 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,
*/
static int gtco_input_open(struct input_dev *inputdev)
{
- struct gtco *device;
- device = inputdev->private;
+ struct gtco *device = input_get_drvdata(inputdev);
device->urbinfo->dev = device->usbdev;
if (usb_submit_urb(device->urbinfo, GFP_KERNEL))
@@ -555,7 +554,7 @@ static int gtco_input_open(struct input_dev *inputdev)
*/
static void gtco_input_close(struct input_dev *inputdev)
{
- struct gtco *device = inputdev->private;
+ struct gtco *device = input_get_drvdata(inputdev);
usb_kill_urb(device->urbinfo);
}
@@ -569,9 +568,9 @@ static void gtco_input_close(struct input_dev *inputdev)
* placed in the struct gtco structure
*
*/
-static void gtco_setup_caps(struct input_dev *inputdev)
+static void gtco_setup_caps(struct input_dev *inputdev)
{
- struct gtco *device = inputdev->private;
+ struct gtco *device = input_get_drvdata(inputdev);
/* Which events */
inputdev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS) | BIT(EV_MSC);
@@ -945,7 +944,8 @@ static int gtco_probe(struct usb_interface *usbinterface,
/* Set input device information */
input_dev->name = "GTCO_CalComp";
input_dev->phys = gtco->usbpath;
- input_dev->private = gtco;
+
+ input_set_drvdata(input_dev, gtco);
/* Now set up all the input device capabilities */
gtco_setup_caps(input_dev);