diff options
author | Dmitry Torokhov <dtor@insightbb.com> | 2007-04-12 07:34:39 +0200 |
---|---|---|
committer | Dmitry Torokhov <dtor@insightbb.com> | 2007-04-12 07:34:39 +0200 |
commit | 7791bdae71243050132ede7ea1558c828b69458f (patch) | |
tree | f6c3291deff0b7b8720405432245b6acf7cce218 /drivers/usb/input/xpad.c | |
parent | Input: drivers/input/misc - don't access dev->private directly (diff) | |
download | linux-7791bdae71243050132ede7ea1558c828b69458f.tar.xz 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/xpad.c')
-rw-r--r-- | drivers/usb/input/xpad.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/usb/input/xpad.c b/drivers/usb/input/xpad.c index ca03d1fc233f..b00179626bee 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; |