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/yealink.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/yealink.c')
-rw-r--r-- | drivers/usb/input/yealink.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/usb/input/yealink.c b/drivers/usb/input/yealink.c index 688abcdf1f0f..294224e20f49 100644 --- a/drivers/usb/input/yealink.c +++ b/drivers/usb/input/yealink.c | |||
@@ -502,7 +502,7 @@ static int input_ev(struct input_dev *dev, unsigned int type, | |||
502 | 502 | ||
503 | static int input_open(struct input_dev *dev) | 503 | static int input_open(struct input_dev *dev) |
504 | { | 504 | { |
505 | struct yealink_dev *yld = dev->private; | 505 | struct yealink_dev *yld = input_get_drvdata(dev); |
506 | int i, ret; | 506 | int i, ret; |
507 | 507 | ||
508 | dbg("%s", __FUNCTION__); | 508 | dbg("%s", __FUNCTION__); |
@@ -529,7 +529,7 @@ static int input_open(struct input_dev *dev) | |||
529 | 529 | ||
530 | static void input_close(struct input_dev *dev) | 530 | static void input_close(struct input_dev *dev) |
531 | { | 531 | { |
532 | struct yealink_dev *yld = dev->private; | 532 | struct yealink_dev *yld = input_get_drvdata(dev); |
533 | 533 | ||
534 | usb_kill_urb(yld->urb_ctl); | 534 | usb_kill_urb(yld->urb_ctl); |
535 | usb_kill_urb(yld->urb_irq); | 535 | usb_kill_urb(yld->urb_irq); |
@@ -939,7 +939,8 @@ static int usb_probe(struct usb_interface *intf, const struct usb_device_id *id) | |||
939 | usb_to_input_id(udev, &input_dev->id); | 939 | usb_to_input_id(udev, &input_dev->id); |
940 | input_dev->cdev.dev = &intf->dev; | 940 | input_dev->cdev.dev = &intf->dev; |
941 | 941 | ||
942 | input_dev->private = yld; | 942 | input_set_drvdata(input_dev, yld); |
943 | |||
943 | input_dev->open = input_open; | 944 | input_dev->open = input_open; |
944 | input_dev->close = input_close; | 945 | input_dev->close = input_close; |
945 | /* input_dev->event = input_ev; TODO */ | 946 | /* input_dev->event = input_ev; TODO */ |