aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/input/powermate.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/powermate.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/powermate.c')
-rw-r--r--drivers/usb/input/powermate.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/input/powermate.c b/drivers/usb/input/powermate.c
index ce27449dd693..f951a4482ef4 100644
--- a/drivers/usb/input/powermate.c
+++ b/drivers/usb/input/powermate.c
@@ -252,7 +252,7 @@ static void powermate_pulse_led(struct powermate_device *pm, int static_brightne
252static int powermate_input_event(struct input_dev *dev, unsigned int type, unsigned int code, int _value) 252static int powermate_input_event(struct input_dev *dev, unsigned int type, unsigned int code, int _value)
253{ 253{
254 unsigned int command = (unsigned int)_value; 254 unsigned int command = (unsigned int)_value;
255 struct powermate_device *pm = dev->private; 255 struct powermate_device *pm = input_get_drvdata(dev);
256 256
257 if (type == EV_MSC && code == MSC_PULSELED){ 257 if (type == EV_MSC && code == MSC_PULSELED){
258 /* 258 /*
@@ -360,7 +360,8 @@ static int powermate_probe(struct usb_interface *intf, const struct usb_device_i
360 input_dev->phys = pm->phys; 360 input_dev->phys = pm->phys;
361 usb_to_input_id(udev, &input_dev->id); 361 usb_to_input_id(udev, &input_dev->id);
362 input_dev->cdev.dev = &intf->dev; 362 input_dev->cdev.dev = &intf->dev;
363 input_dev->private = pm; 363
364 input_set_drvdata(input_dev, pm);
364 365
365 input_dev->event = powermate_input_event; 366 input_dev->event = powermate_input_event;
366 367