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/kbtab.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/kbtab.c')
-rw-r--r-- | drivers/usb/input/kbtab.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/usb/input/kbtab.c b/drivers/usb/input/kbtab.c index 64da9876fe56..7ec999adb882 100644 --- a/drivers/usb/input/kbtab.c +++ b/drivers/usb/input/kbtab.c | |||
@@ -100,7 +100,7 @@ MODULE_DEVICE_TABLE(usb, kbtab_ids); | |||
100 | 100 | ||
101 | static int kbtab_open(struct input_dev *dev) | 101 | static int kbtab_open(struct input_dev *dev) |
102 | { | 102 | { |
103 | struct kbtab *kbtab = dev->private; | 103 | struct kbtab *kbtab = input_get_drvdata(dev); |
104 | 104 | ||
105 | kbtab->irq->dev = kbtab->usbdev; | 105 | kbtab->irq->dev = kbtab->usbdev; |
106 | if (usb_submit_urb(kbtab->irq, GFP_KERNEL)) | 106 | if (usb_submit_urb(kbtab->irq, GFP_KERNEL)) |
@@ -111,7 +111,7 @@ static int kbtab_open(struct input_dev *dev) | |||
111 | 111 | ||
112 | static void kbtab_close(struct input_dev *dev) | 112 | static void kbtab_close(struct input_dev *dev) |
113 | { | 113 | { |
114 | struct kbtab *kbtab = dev->private; | 114 | struct kbtab *kbtab = input_get_drvdata(dev); |
115 | 115 | ||
116 | usb_kill_urb(kbtab->irq); | 116 | usb_kill_urb(kbtab->irq); |
117 | } | 117 | } |
@@ -147,7 +147,8 @@ static int kbtab_probe(struct usb_interface *intf, const struct usb_device_id *i | |||
147 | input_dev->phys = kbtab->phys; | 147 | input_dev->phys = kbtab->phys; |
148 | usb_to_input_id(dev, &input_dev->id); | 148 | usb_to_input_id(dev, &input_dev->id); |
149 | input_dev->cdev.dev = &intf->dev; | 149 | input_dev->cdev.dev = &intf->dev; |
150 | input_dev->private = kbtab; | 150 | |
151 | input_set_drvdata(input_dev, kbtab); | ||
151 | 152 | ||
152 | input_dev->open = kbtab_open; | 153 | input_dev->open = kbtab_open; |
153 | input_dev->close = kbtab_close; | 154 | input_dev->close = kbtab_close; |