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/keyspan_remote.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/keyspan_remote.c')
-rw-r--r-- | drivers/usb/input/keyspan_remote.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/usb/input/keyspan_remote.c b/drivers/usb/input/keyspan_remote.c index d32a7684de94..daf8f218a1f4 100644 --- a/drivers/usb/input/keyspan_remote.c +++ b/drivers/usb/input/keyspan_remote.c | |||
@@ -394,7 +394,7 @@ resubmit: | |||
394 | 394 | ||
395 | static int keyspan_open(struct input_dev *dev) | 395 | static int keyspan_open(struct input_dev *dev) |
396 | { | 396 | { |
397 | struct usb_keyspan *remote = dev->private; | 397 | struct usb_keyspan *remote = input_get_drvdata(dev); |
398 | 398 | ||
399 | remote->irq_urb->dev = remote->udev; | 399 | remote->irq_urb->dev = remote->udev; |
400 | if (usb_submit_urb(remote->irq_urb, GFP_KERNEL)) | 400 | if (usb_submit_urb(remote->irq_urb, GFP_KERNEL)) |
@@ -405,7 +405,7 @@ static int keyspan_open(struct input_dev *dev) | |||
405 | 405 | ||
406 | static void keyspan_close(struct input_dev *dev) | 406 | static void keyspan_close(struct input_dev *dev) |
407 | { | 407 | { |
408 | struct usb_keyspan *remote = dev->private; | 408 | struct usb_keyspan *remote = input_get_drvdata(dev); |
409 | 409 | ||
410 | usb_kill_urb(remote->irq_urb); | 410 | usb_kill_urb(remote->irq_urb); |
411 | } | 411 | } |
@@ -502,7 +502,8 @@ static int keyspan_probe(struct usb_interface *interface, const struct usb_devic | |||
502 | if (keyspan_key_table[i] != KEY_RESERVED) | 502 | if (keyspan_key_table[i] != KEY_RESERVED) |
503 | set_bit(keyspan_key_table[i], input_dev->keybit); | 503 | set_bit(keyspan_key_table[i], input_dev->keybit); |
504 | 504 | ||
505 | input_dev->private = remote; | 505 | input_set_drvdata(input_dev, remote); |
506 | |||
506 | input_dev->open = keyspan_open; | 507 | input_dev->open = keyspan_open; |
507 | input_dev->close = keyspan_close; | 508 | input_dev->close = keyspan_close; |
508 | 509 | ||