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/yealink.c b/drivers/usb/input/yealink.c
index 688abcd..294224e 100644
--- a/drivers/usb/input/yealink.c
+++ b/drivers/usb/input/yealink.c
@@ -502,7 +502,7 @@
static int input_open(struct input_dev *dev)
{
- struct yealink_dev *yld = dev->private;
+ struct yealink_dev *yld = input_get_drvdata(dev);
int i, ret;
dbg("%s", __FUNCTION__);
@@ -529,7 +529,7 @@
static void input_close(struct input_dev *dev)
{
- struct yealink_dev *yld = dev->private;
+ struct yealink_dev *yld = input_get_drvdata(dev);
usb_kill_urb(yld->urb_ctl);
usb_kill_urb(yld->urb_irq);
@@ -939,7 +939,8 @@
usb_to_input_id(udev, &input_dev->id);
input_dev->cdev.dev = &intf->dev;
- input_dev->private = yld;
+ input_set_drvdata(input_dev, yld);
+
input_dev->open = input_open;
input_dev->close = input_close;
/* input_dev->event = input_ev; TODO */