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>
diff --git a/drivers/usb/input/kbtab.c b/drivers/usb/input/kbtab.c
index 64da987..7ec999a 100644
--- a/drivers/usb/input/kbtab.c
+++ b/drivers/usb/input/kbtab.c
@@ -100,7 +100,7 @@
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 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 @@
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;