summaryrefslogtreecommitdiff
path: root/drivers/usb/input/xpad.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/xpad.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/xpad.c')
-rw-r--r--drivers/usb/input/xpad.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/usb/input/xpad.c b/drivers/usb/input/xpad.c
index ca03d1fc233..b00179626be 100644
--- a/drivers/usb/input/xpad.c
+++ b/drivers/usb/input/xpad.c
@@ -267,7 +267,7 @@ exit:
static int xpad_open (struct input_dev *dev)
{
- struct usb_xpad *xpad = dev->private;
+ struct usb_xpad *xpad = input_get_drvdata(dev);
xpad->irq_in->dev = xpad->udev;
if (usb_submit_urb(xpad->irq_in, GFP_KERNEL))
@@ -278,7 +278,7 @@ static int xpad_open (struct input_dev *dev)
static void xpad_close (struct input_dev *dev)
{
- struct usb_xpad *xpad = dev->private;
+ struct usb_xpad *xpad = input_get_drvdata(dev);
usb_kill_urb(xpad->irq_in);
}
@@ -346,7 +346,9 @@ static int xpad_probe(struct usb_interface *intf, const struct usb_device_id *id
input_dev->phys = xpad->phys;
usb_to_input_id(udev, &input_dev->id);
input_dev->cdev.dev = &intf->dev;
- input_dev->private = xpad;
+
+ input_set_drvdata(input_dev, xpad);
+
input_dev->open = xpad_open;
input_dev->close = xpad_close;