summaryrefslogtreecommitdiffstats
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)
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/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
static int powermate_input_event(struct input_dev *dev, unsigned int type, unsigned int code, int _value)
{
unsigned int command = (unsigned int)_value;
- struct powermate_device *pm = dev->private;
+ struct powermate_device *pm = input_get_drvdata(dev);
if (type == EV_MSC && code == MSC_PULSELED){
/*
@@ -360,7 +360,8 @@ static int powermate_probe(struct usb_interface *intf, const struct usb_device_i
input_dev->phys = pm->phys;
usb_to_input_id(udev, &input_dev->id);
input_dev->cdev.dev = &intf->dev;
- input_dev->private = pm;
+
+ input_set_drvdata(input_dev, pm);
input_dev->event = powermate_input_event;
OpenPOWER on IntegriCloud