aboutsummaryrefslogtreecommitdiff
path: root/drivers/input/misc/uinput.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor@insightbb.com>2007-04-12 01:34:33 -0400
committerDmitry Torokhov <dtor@insightbb.com>2007-04-12 01:34:33 -0400
commit373f9713dccc8fc8e076157001a60133455c0550 (patch)
tree509c52d79867b6614a750bba582e067db03d4419 /drivers/input/misc/uinput.c
parentb356872fa48a3f6b6f187444b0ea55e6e21c3575 (diff)
Input: drivers/input/misc - 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/input/misc/uinput.c')
-rw-r--r--drivers/input/misc/uinput.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/input/misc/uinput.c b/drivers/input/misc/uinput.c
index 42556232c52..031467eadd3 100644
--- a/drivers/input/misc/uinput.c
+++ b/drivers/input/misc/uinput.c
@@ -41,9 +41,7 @@
static int uinput_dev_event(struct input_dev *dev, unsigned int type, unsigned int code, int value)
{
- struct uinput_device *udev;
-
- udev = dev->private;
+ struct uinput_device *udev = input_get_drvdata(dev);
udev->buff[udev->head].type = type;
udev->buff[udev->head].code = code;
@@ -136,7 +134,7 @@ static int uinput_dev_upload_effect(struct input_dev *dev, struct ff_effect *eff
request.u.upload.effect = effect;
request.u.upload.old = old;
- retval = uinput_request_reserve_slot(dev->private, &request);
+ retval = uinput_request_reserve_slot(input_get_drvdata(dev), &request);
if (!retval)
retval = uinput_request_submit(dev, &request);
@@ -156,7 +154,7 @@ static int uinput_dev_erase_effect(struct input_dev *dev, int effect_id)
request.code = UI_FF_ERASE;
request.u.effect_id = effect_id;
- retval = uinput_request_reserve_slot(dev->private, &request);
+ retval = uinput_request_reserve_slot(input_get_drvdata(dev), &request);
if (!retval)
retval = uinput_request_submit(dev, &request);
@@ -274,7 +272,7 @@ static int uinput_allocate_device(struct uinput_device *udev)
return -ENOMEM;
udev->dev->event = uinput_dev_event;
- udev->dev->private = udev;
+ input_set_drvdata(udev->dev, udev);
return 0;
}