diff options
Diffstat (limited to 'drivers/usb/input/acecad.c')
-rw-r--r-- | drivers/usb/input/acecad.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/usb/input/acecad.c b/drivers/usb/input/acecad.c index 270bb050879..75972b7d4c8 100644 --- a/drivers/usb/input/acecad.c +++ b/drivers/usb/input/acecad.c | |||
@@ -111,7 +111,7 @@ resubmit: | |||
111 | 111 | ||
112 | static int usb_acecad_open(struct input_dev *dev) | 112 | static int usb_acecad_open(struct input_dev *dev) |
113 | { | 113 | { |
114 | struct usb_acecad *acecad = dev->private; | 114 | struct usb_acecad *acecad = input_get_drvdata(dev); |
115 | 115 | ||
116 | acecad->irq->dev = acecad->usbdev; | 116 | acecad->irq->dev = acecad->usbdev; |
117 | if (usb_submit_urb(acecad->irq, GFP_KERNEL)) | 117 | if (usb_submit_urb(acecad->irq, GFP_KERNEL)) |
@@ -122,7 +122,7 @@ static int usb_acecad_open(struct input_dev *dev) | |||
122 | 122 | ||
123 | static void usb_acecad_close(struct input_dev *dev) | 123 | static void usb_acecad_close(struct input_dev *dev) |
124 | { | 124 | { |
125 | struct usb_acecad *acecad = dev->private; | 125 | struct usb_acecad *acecad = input_get_drvdata(dev); |
126 | 126 | ||
127 | usb_kill_urb(acecad->irq); | 127 | usb_kill_urb(acecad->irq); |
128 | } | 128 | } |
@@ -186,7 +186,8 @@ static int usb_acecad_probe(struct usb_interface *intf, const struct usb_device_ | |||
186 | input_dev->phys = acecad->phys; | 186 | input_dev->phys = acecad->phys; |
187 | usb_to_input_id(dev, &input_dev->id); | 187 | usb_to_input_id(dev, &input_dev->id); |
188 | input_dev->cdev.dev = &intf->dev; | 188 | input_dev->cdev.dev = &intf->dev; |
189 | input_dev->private = acecad; | 189 | |
190 | input_set_drvdata(input_dev, acecad); | ||
190 | 191 | ||
191 | input_dev->open = usb_acecad_open; | 192 | input_dev->open = usb_acecad_open; |
192 | input_dev->close = usb_acecad_close; | 193 | input_dev->close = usb_acecad_close; |