summaryrefslogtreecommitdiffstats
path: root/drivers/usb/input/powermate.c
diff options
context:
space:
mode:
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 ce27449dd69..f951a4482ef 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;