summaryrefslogtreecommitdiffstats
path: root/drivers/usb/input/kbtab.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor@insightbb.com>2007-04-12 07:34:39 +0200
committerDmitry Torokhov <dtor@insightbb.com>2007-04-12 07:34:39 +0200
commit7791bdae71243050132ede7ea1558c828b69458f (patch)
treef6c3291deff0b7b8720405432245b6acf7cce218 /drivers/usb/input/kbtab.c
parentInput: drivers/input/misc - don't access dev->private directly (diff)
downloadlinux-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/kbtab.c')
-rw-r--r--drivers/usb/input/kbtab.c7
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);
static int kbtab_open(struct input_dev *dev)
{
- struct kbtab *kbtab = dev->private;
+ struct kbtab *kbtab = input_get_drvdata(dev);
kbtab->irq->dev = kbtab->usbdev;
if (usb_submit_urb(kbtab->irq, GFP_KERNEL))
@@ -111,7 +111,7 @@ static int kbtab_open(struct input_dev *dev)
static void kbtab_close(struct input_dev *dev)
{
- struct kbtab *kbtab = dev->private;
+ struct kbtab *kbtab = input_get_drvdata(dev);
usb_kill_urb(kbtab->irq);
}
@@ -147,7 +147,8 @@ static int kbtab_probe(struct usb_interface *intf, const struct usb_device_id *i
input_dev->phys = kbtab->phys;
usb_to_input_id(dev, &input_dev->id);
input_dev->cdev.dev = &intf->dev;
- input_dev->private = kbtab;
+
+ input_set_drvdata(input_dev, kbtab);
input_dev->open = kbtab_open;
input_dev->close = kbtab_close;