diff options
author | Dmitry Torokhov <dtor@insightbb.com> | 2007-04-12 01:34:39 -0400 |
---|---|---|
committer | Dmitry Torokhov <dtor@insightbb.com> | 2007-04-12 01:34:39 -0400 |
commit | 7791bdae71243050132ede7ea1558c828b69458f (patch) | |
tree | f6c3291deff0b7b8720405432245b6acf7cce218 /drivers/usb/input/xpad.c | |
parent | 373f9713dccc8fc8e076157001a60133455c0550 (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.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: | |||
267 | 267 | ||
268 | static int xpad_open (struct input_dev *dev) | 268 | static int xpad_open (struct input_dev *dev) |
269 | { | 269 | { |
270 | struct usb_xpad *xpad = dev->private; | 270 | struct usb_xpad *xpad = input_get_drvdata(dev); |
271 | 271 | ||
272 | xpad->irq_in->dev = xpad->udev; | 272 | xpad->irq_in->dev = xpad->udev; |
273 | if (usb_submit_urb(xpad->irq_in, GFP_KERNEL)) | 273 | if (usb_submit_urb(xpad->irq_in, GFP_KERNEL)) |
@@ -278,7 +278,7 @@ static int xpad_open (struct input_dev *dev) | |||
278 | 278 | ||
279 | static void xpad_close (struct input_dev *dev) | 279 | static void xpad_close (struct input_dev *dev) |
280 | { | 280 | { |
281 | struct usb_xpad *xpad = dev->private; | 281 | struct usb_xpad *xpad = input_get_drvdata(dev); |
282 | 282 | ||
283 | usb_kill_urb(xpad->irq_in); | 283 | usb_kill_urb(xpad->irq_in); |
284 | } | 284 | } |
@@ -346,7 +346,9 @@ static int xpad_probe(struct usb_interface *intf, const struct usb_device_id *id | |||
346 | input_dev->phys = xpad->phys; | 346 | input_dev->phys = xpad->phys; |
347 | usb_to_input_id(udev, &input_dev->id); | 347 | usb_to_input_id(udev, &input_dev->id); |
348 | input_dev->cdev.dev = &intf->dev; | 348 | input_dev->cdev.dev = &intf->dev; |
349 | input_dev->private = xpad; | 349 | |
350 | input_set_drvdata(input_dev, xpad); | ||
351 | |||
350 | input_dev->open = xpad_open; | 352 | input_dev->open = xpad_open; |
351 | input_dev->close = xpad_close; | 353 | input_dev->close = xpad_close; |
352 | 354 | ||