aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/input/acecad.c7
-rw-r--r--drivers/usb/input/aiptek.c8
-rw-r--r--drivers/usb/input/appletouch.c7
-rw-r--r--drivers/usb/input/ati_remote.c7
-rw-r--r--drivers/usb/input/ati_remote2.c6
-rw-r--r--drivers/usb/input/gtco.c12
-rw-r--r--drivers/usb/input/kbtab.c7
-rw-r--r--drivers/usb/input/keyspan_remote.c7
-rw-r--r--drivers/usb/input/powermate.c5
-rw-r--r--drivers/usb/input/usbtouchscreen.c8
-rw-r--r--drivers/usb/input/wacom_sys.c8
-rw-r--r--drivers/usb/input/xpad.c8
-rw-r--r--drivers/usb/input/yealink.c7
13 files changed, 56 insertions, 41 deletions
diff --git a/drivers/usb/input/acecad.c b/drivers/usb/input/acecad.c
index 270bb050879a..75972b7d4c83 100644
--- a/drivers/usb/input/acecad.c
+++ b/drivers/usb/input/acecad.c
@@ -111,7 +111,7 @@ resubmit:
111 111
112static int usb_acecad_open(struct input_dev *dev) 112static 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
123static void usb_acecad_close(struct input_dev *dev) 123static 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;
diff --git a/drivers/usb/input/aiptek.c b/drivers/usb/input/aiptek.c
index 8c1ab1cbd233..8b33a8eae8a1 100644
--- a/drivers/usb/input/aiptek.c
+++ b/drivers/usb/input/aiptek.c
@@ -798,7 +798,7 @@ MODULE_DEVICE_TABLE(usb, aiptek_ids);
798 */ 798 */
799static int aiptek_open(struct input_dev *inputdev) 799static int aiptek_open(struct input_dev *inputdev)
800{ 800{
801 struct aiptek *aiptek = inputdev->private; 801 struct aiptek *aiptek = input_get_drvdata(inputdev);
802 802
803 aiptek->urb->dev = aiptek->usbdev; 803 aiptek->urb->dev = aiptek->usbdev;
804 if (usb_submit_urb(aiptek->urb, GFP_KERNEL) != 0) 804 if (usb_submit_urb(aiptek->urb, GFP_KERNEL) != 0)
@@ -812,7 +812,7 @@ static int aiptek_open(struct input_dev *inputdev)
812 */ 812 */
813static void aiptek_close(struct input_dev *inputdev) 813static void aiptek_close(struct input_dev *inputdev)
814{ 814{
815 struct aiptek *aiptek = inputdev->private; 815 struct aiptek *aiptek = input_get_drvdata(inputdev);
816 816
817 usb_kill_urb(aiptek->urb); 817 usb_kill_urb(aiptek->urb);
818} 818}
@@ -2045,7 +2045,9 @@ aiptek_probe(struct usb_interface *intf, const struct usb_device_id *id)
2045 inputdev->phys = aiptek->features.usbPath; 2045 inputdev->phys = aiptek->features.usbPath;
2046 usb_to_input_id(usbdev, &inputdev->id); 2046 usb_to_input_id(usbdev, &inputdev->id);
2047 inputdev->cdev.dev = &intf->dev; 2047 inputdev->cdev.dev = &intf->dev;
2048 inputdev->private = aiptek; 2048
2049 input_set_drvdata(inputdev, aiptek);
2050
2049 inputdev->open = aiptek_open; 2051 inputdev->open = aiptek_open;
2050 inputdev->close = aiptek_close; 2052 inputdev->close = aiptek_close;
2051 2053
diff --git a/drivers/usb/input/appletouch.c b/drivers/usb/input/appletouch.c
index 36221329a4ef..ef6166ab8fe7 100644
--- a/drivers/usb/input/appletouch.c
+++ b/drivers/usb/input/appletouch.c
@@ -466,7 +466,7 @@ exit:
466 466
467static int atp_open(struct input_dev *input) 467static int atp_open(struct input_dev *input)
468{ 468{
469 struct atp *dev = input->private; 469 struct atp *dev = input_get_drvdata(input);
470 470
471 if (usb_submit_urb(dev->urb, GFP_ATOMIC)) 471 if (usb_submit_urb(dev->urb, GFP_ATOMIC))
472 return -EIO; 472 return -EIO;
@@ -477,7 +477,7 @@ static int atp_open(struct input_dev *input)
477 477
478static void atp_close(struct input_dev *input) 478static void atp_close(struct input_dev *input)
479{ 479{
480 struct atp *dev = input->private; 480 struct atp *dev = input_get_drvdata(input);
481 481
482 usb_kill_urb(dev->urb); 482 usb_kill_urb(dev->urb);
483 dev->open = 0; 483 dev->open = 0;
@@ -586,7 +586,8 @@ static int atp_probe(struct usb_interface *iface, const struct usb_device_id *id
586 usb_to_input_id(dev->udev, &input_dev->id); 586 usb_to_input_id(dev->udev, &input_dev->id);
587 input_dev->cdev.dev = &iface->dev; 587 input_dev->cdev.dev = &iface->dev;
588 588
589 input_dev->private = dev; 589 input_set_drvdata(input_dev, dev);
590
590 input_dev->open = atp_open; 591 input_dev->open = atp_open;
591 input_dev->close = atp_close; 592 input_dev->close = atp_close;
592 593
diff --git a/drivers/usb/input/ati_remote.c b/drivers/usb/input/ati_remote.c
index a1ae9eea5741..876b2725609d 100644
--- a/drivers/usb/input/ati_remote.c
+++ b/drivers/usb/input/ati_remote.c
@@ -318,7 +318,7 @@ static void ati_remote_dump(unsigned char *data, unsigned int len)
318 */ 318 */
319static int ati_remote_open(struct input_dev *inputdev) 319static int ati_remote_open(struct input_dev *inputdev)
320{ 320{
321 struct ati_remote *ati_remote = inputdev->private; 321 struct ati_remote *ati_remote = input_get_drvdata(inputdev);
322 322
323 /* On first open, submit the read urb which was set up previously. */ 323 /* On first open, submit the read urb which was set up previously. */
324 ati_remote->irq_urb->dev = ati_remote->udev; 324 ati_remote->irq_urb->dev = ati_remote->udev;
@@ -336,7 +336,7 @@ static int ati_remote_open(struct input_dev *inputdev)
336 */ 336 */
337static void ati_remote_close(struct input_dev *inputdev) 337static void ati_remote_close(struct input_dev *inputdev)
338{ 338{
339 struct ati_remote *ati_remote = inputdev->private; 339 struct ati_remote *ati_remote = input_get_drvdata(inputdev);
340 340
341 usb_kill_urb(ati_remote->irq_urb); 341 usb_kill_urb(ati_remote->irq_urb);
342} 342}
@@ -653,7 +653,8 @@ static void ati_remote_input_init(struct ati_remote *ati_remote)
653 if (ati_remote_tbl[i].type == EV_KEY) 653 if (ati_remote_tbl[i].type == EV_KEY)
654 set_bit(ati_remote_tbl[i].code, idev->keybit); 654 set_bit(ati_remote_tbl[i].code, idev->keybit);
655 655
656 idev->private = ati_remote; 656 input_set_drvdata(idev, ati_remote);
657
657 idev->open = ati_remote_open; 658 idev->open = ati_remote_open;
658 idev->close = ati_remote_close; 659 idev->close = ati_remote_close;
659 660
diff --git a/drivers/usb/input/ati_remote2.c b/drivers/usb/input/ati_remote2.c
index 5656278d7965..3c38ac649d2e 100644
--- a/drivers/usb/input/ati_remote2.c
+++ b/drivers/usb/input/ati_remote2.c
@@ -131,7 +131,7 @@ static struct usb_driver ati_remote2_driver = {
131 131
132static int ati_remote2_open(struct input_dev *idev) 132static int ati_remote2_open(struct input_dev *idev)
133{ 133{
134 struct ati_remote2 *ar2 = idev->private; 134 struct ati_remote2 *ar2 = input_get_drvdata(idev);
135 int r; 135 int r;
136 136
137 r = usb_submit_urb(ar2->urb[0], GFP_KERNEL); 137 r = usb_submit_urb(ar2->urb[0], GFP_KERNEL);
@@ -153,7 +153,7 @@ static int ati_remote2_open(struct input_dev *idev)
153 153
154static void ati_remote2_close(struct input_dev *idev) 154static void ati_remote2_close(struct input_dev *idev)
155{ 155{
156 struct ati_remote2 *ar2 = idev->private; 156 struct ati_remote2 *ar2 = input_get_drvdata(idev);
157 157
158 usb_kill_urb(ar2->urb[0]); 158 usb_kill_urb(ar2->urb[0]);
159 usb_kill_urb(ar2->urb[1]); 159 usb_kill_urb(ar2->urb[1]);
@@ -344,7 +344,7 @@ static int ati_remote2_input_init(struct ati_remote2 *ar2)
344 return -ENOMEM; 344 return -ENOMEM;
345 345
346 ar2->idev = idev; 346 ar2->idev = idev;
347 idev->private = ar2; 347 input_set_drvdata(idev, ar2);
348 348
349 idev->evbit[0] = BIT(EV_KEY) | BIT(EV_REP) | BIT(EV_REL); 349 idev->evbit[0] = BIT(EV_KEY) | BIT(EV_REP) | BIT(EV_REL);
350 idev->keybit[LONG(BTN_MOUSE)] = BIT(BTN_LEFT) | BIT(BTN_RIGHT); 350 idev->keybit[LONG(BTN_MOUSE)] = BIT(BTN_LEFT) | BIT(BTN_RIGHT);
diff --git a/drivers/usb/input/gtco.c b/drivers/usb/input/gtco.c
index aa9c676ca79a..75cce2a97d20 100644
--- a/drivers/usb/input/gtco.c
+++ b/drivers/usb/input/gtco.c
@@ -540,8 +540,7 @@ static void parse_hid_report_descriptor(struct gtco *device, char * report,
540 */ 540 */
541static int gtco_input_open(struct input_dev *inputdev) 541static int gtco_input_open(struct input_dev *inputdev)
542{ 542{
543 struct gtco *device; 543 struct gtco *device = input_get_drvdata(inputdev);
544 device = inputdev->private;
545 544
546 device->urbinfo->dev = device->usbdev; 545 device->urbinfo->dev = device->usbdev;
547 if (usb_submit_urb(device->urbinfo, GFP_KERNEL)) 546 if (usb_submit_urb(device->urbinfo, GFP_KERNEL))
@@ -555,7 +554,7 @@ static int gtco_input_open(struct input_dev *inputdev)
555 */ 554 */
556static void gtco_input_close(struct input_dev *inputdev) 555static void gtco_input_close(struct input_dev *inputdev)
557{ 556{
558 struct gtco *device = inputdev->private; 557 struct gtco *device = input_get_drvdata(inputdev);
559 558
560 usb_kill_urb(device->urbinfo); 559 usb_kill_urb(device->urbinfo);
561} 560}
@@ -569,9 +568,9 @@ static void gtco_input_close(struct input_dev *inputdev)
569 * placed in the struct gtco structure 568 * placed in the struct gtco structure
570 * 569 *
571 */ 570 */
572static void gtco_setup_caps(struct input_dev *inputdev) 571static void gtco_setup_caps(struct input_dev *inputdev)
573{ 572{
574 struct gtco *device = inputdev->private; 573 struct gtco *device = input_get_drvdata(inputdev);
575 574
576 /* Which events */ 575 /* Which events */
577 inputdev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS) | BIT(EV_MSC); 576 inputdev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS) | BIT(EV_MSC);
@@ -945,7 +944,8 @@ static int gtco_probe(struct usb_interface *usbinterface,
945 /* Set input device information */ 944 /* Set input device information */
946 input_dev->name = "GTCO_CalComp"; 945 input_dev->name = "GTCO_CalComp";
947 input_dev->phys = gtco->usbpath; 946 input_dev->phys = gtco->usbpath;
948 input_dev->private = gtco; 947
948 input_set_drvdata(input_dev, gtco);
949 949
950 /* Now set up all the input device capabilities */ 950 /* Now set up all the input device capabilities */
951 gtco_setup_caps(input_dev); 951 gtco_setup_caps(input_dev);
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
101static int kbtab_open(struct input_dev *dev) 101static 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
112static void kbtab_close(struct input_dev *dev) 112static 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;
diff --git a/drivers/usb/input/keyspan_remote.c b/drivers/usb/input/keyspan_remote.c
index d32a7684de94..daf8f218a1f4 100644
--- a/drivers/usb/input/keyspan_remote.c
+++ b/drivers/usb/input/keyspan_remote.c
@@ -394,7 +394,7 @@ resubmit:
394 394
395static int keyspan_open(struct input_dev *dev) 395static int keyspan_open(struct input_dev *dev)
396{ 396{
397 struct usb_keyspan *remote = dev->private; 397 struct usb_keyspan *remote = input_get_drvdata(dev);
398 398
399 remote->irq_urb->dev = remote->udev; 399 remote->irq_urb->dev = remote->udev;
400 if (usb_submit_urb(remote->irq_urb, GFP_KERNEL)) 400 if (usb_submit_urb(remote->irq_urb, GFP_KERNEL))
@@ -405,7 +405,7 @@ static int keyspan_open(struct input_dev *dev)
405 405
406static void keyspan_close(struct input_dev *dev) 406static void keyspan_close(struct input_dev *dev)
407{ 407{
408 struct usb_keyspan *remote = dev->private; 408 struct usb_keyspan *remote = input_get_drvdata(dev);
409 409
410 usb_kill_urb(remote->irq_urb); 410 usb_kill_urb(remote->irq_urb);
411} 411}
@@ -502,7 +502,8 @@ static int keyspan_probe(struct usb_interface *interface, const struct usb_devic
502 if (keyspan_key_table[i] != KEY_RESERVED) 502 if (keyspan_key_table[i] != KEY_RESERVED)
503 set_bit(keyspan_key_table[i], input_dev->keybit); 503 set_bit(keyspan_key_table[i], input_dev->keybit);
504 504
505 input_dev->private = remote; 505 input_set_drvdata(input_dev, remote);
506
506 input_dev->open = keyspan_open; 507 input_dev->open = keyspan_open;
507 input_dev->close = keyspan_close; 508 input_dev->close = keyspan_close;
508 509
diff --git a/drivers/usb/input/powermate.c b/drivers/usb/input/powermate.c
index ce27449dd693..f951a4482ef4 100644
--- a/drivers/usb/input/powermate.c
+++ b/drivers/usb/input/powermate.c
@@ -252,7 +252,7 @@ static void powermate_pulse_led(struct powermate_device *pm, int static_brightne
252static int powermate_input_event(struct input_dev *dev, unsigned int type, unsigned int code, int _value) 252static int powermate_input_event(struct input_dev *dev, unsigned int type, unsigned int code, int _value)
253{ 253{
254 unsigned int command = (unsigned int)_value; 254 unsigned int command = (unsigned int)_value;
255 struct powermate_device *pm = dev->private; 255 struct powermate_device *pm = input_get_drvdata(dev);
256 256
257 if (type == EV_MSC && code == MSC_PULSELED){ 257 if (type == EV_MSC && code == MSC_PULSELED){
258 /* 258 /*
@@ -360,7 +360,8 @@ static int powermate_probe(struct usb_interface *intf, const struct usb_device_i
360 input_dev->phys = pm->phys; 360 input_dev->phys = pm->phys;
361 usb_to_input_id(udev, &input_dev->id); 361 usb_to_input_id(udev, &input_dev->id);
362 input_dev->cdev.dev = &intf->dev; 362 input_dev->cdev.dev = &intf->dev;
363 input_dev->private = pm; 363
364 input_set_drvdata(input_dev, pm);
364 365
365 input_dev->event = powermate_input_event; 366 input_dev->event = powermate_input_event;
366 367
diff --git a/drivers/usb/input/usbtouchscreen.c b/drivers/usb/input/usbtouchscreen.c
index 86e37a20f8e5..169692729b80 100644
--- a/drivers/usb/input/usbtouchscreen.c
+++ b/drivers/usb/input/usbtouchscreen.c
@@ -647,7 +647,7 @@ exit:
647 647
648static int usbtouch_open(struct input_dev *input) 648static int usbtouch_open(struct input_dev *input)
649{ 649{
650 struct usbtouch_usb *usbtouch = input->private; 650 struct usbtouch_usb *usbtouch = input_get_drvdata(input);
651 651
652 usbtouch->irq->dev = usbtouch->udev; 652 usbtouch->irq->dev = usbtouch->udev;
653 653
@@ -659,7 +659,7 @@ static int usbtouch_open(struct input_dev *input)
659 659
660static void usbtouch_close(struct input_dev *input) 660static void usbtouch_close(struct input_dev *input)
661{ 661{
662 struct usbtouch_usb *usbtouch = input->private; 662 struct usbtouch_usb *usbtouch = input_get_drvdata(input);
663 663
664 usb_kill_urb(usbtouch->irq); 664 usb_kill_urb(usbtouch->irq);
665} 665}
@@ -741,7 +741,9 @@ static int usbtouch_probe(struct usb_interface *intf,
741 input_dev->phys = usbtouch->phys; 741 input_dev->phys = usbtouch->phys;
742 usb_to_input_id(udev, &input_dev->id); 742 usb_to_input_id(udev, &input_dev->id);
743 input_dev->cdev.dev = &intf->dev; 743 input_dev->cdev.dev = &intf->dev;
744 input_dev->private = usbtouch; 744
745 input_set_drvdata(input_dev, usbtouch);
746
745 input_dev->open = usbtouch_open; 747 input_dev->open = usbtouch_open;
746 input_dev->close = usbtouch_close; 748 input_dev->close = usbtouch_close;
747 749
diff --git a/drivers/usb/input/wacom_sys.c b/drivers/usb/input/wacom_sys.c
index 48988e63ebec..7793ffbf5256 100644
--- a/drivers/usb/input/wacom_sys.c
+++ b/drivers/usb/input/wacom_sys.c
@@ -122,7 +122,7 @@ void wacom_input_sync(void *wcombo)
122 122
123static int wacom_open(struct input_dev *dev) 123static int wacom_open(struct input_dev *dev)
124{ 124{
125 struct wacom *wacom = dev->private; 125 struct wacom *wacom = input_get_drvdata(dev);
126 126
127 wacom->irq->dev = wacom->usbdev; 127 wacom->irq->dev = wacom->usbdev;
128 if (usb_submit_urb(wacom->irq, GFP_KERNEL)) 128 if (usb_submit_urb(wacom->irq, GFP_KERNEL))
@@ -133,7 +133,7 @@ static int wacom_open(struct input_dev *dev)
133 133
134static void wacom_close(struct input_dev *dev) 134static void wacom_close(struct input_dev *dev)
135{ 135{
136 struct wacom *wacom = dev->private; 136 struct wacom *wacom = input_get_drvdata(dev);
137 137
138 usb_kill_urb(wacom->irq); 138 usb_kill_urb(wacom->irq);
139} 139}
@@ -231,7 +231,9 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
231 usb_to_input_id(dev, &input_dev->id); 231 usb_to_input_id(dev, &input_dev->id);
232 232
233 input_dev->cdev.dev = &intf->dev; 233 input_dev->cdev.dev = &intf->dev;
234 input_dev->private = wacom; 234
235 input_set_drvdata(input_dev, wacom);
236
235 input_dev->open = wacom_open; 237 input_dev->open = wacom_open;
236 input_dev->close = wacom_close; 238 input_dev->close = wacom_close;
237 239
diff --git a/drivers/usb/input/xpad.c b/drivers/usb/input/xpad.c
index ca03d1fc233f..b00179626bee 100644
--- a/drivers/usb/input/xpad.c
+++ b/drivers/usb/input/xpad.c
@@ -267,7 +267,7 @@ exit:
267 267
268static int xpad_open (struct input_dev *dev) 268static int xpad_open (struct input_dev *dev)
269{ 269{
270 struct usb_xpad *xpad = dev->private; 270 struct usb_xpad *xpad = input_get_drvdata(dev);
271 271
272 xpad->irq_in->dev = xpad->udev; 272 xpad->irq_in->dev = xpad->udev;
273 if (usb_submit_urb(xpad->irq_in, GFP_KERNEL)) 273 if (usb_submit_urb(xpad->irq_in, GFP_KERNEL))
@@ -278,7 +278,7 @@ static int xpad_open (struct input_dev *dev)
278 278
279static void xpad_close (struct input_dev *dev) 279static void xpad_close (struct input_dev *dev)
280{ 280{
281 struct usb_xpad *xpad = dev->private; 281 struct usb_xpad *xpad = input_get_drvdata(dev);
282 282
283 usb_kill_urb(xpad->irq_in); 283 usb_kill_urb(xpad->irq_in);
284} 284}
@@ -346,7 +346,9 @@ static int xpad_probe(struct usb_interface *intf, const struct usb_device_id *id
346 input_dev->phys = xpad->phys; 346 input_dev->phys = xpad->phys;
347 usb_to_input_id(udev, &input_dev->id); 347 usb_to_input_id(udev, &input_dev->id);
348 input_dev->cdev.dev = &intf->dev; 348 input_dev->cdev.dev = &intf->dev;
349 input_dev->private = xpad; 349
350 input_set_drvdata(input_dev, xpad);
351
350 input_dev->open = xpad_open; 352 input_dev->open = xpad_open;
351 input_dev->close = xpad_close; 353 input_dev->close = xpad_close;
352 354
diff --git a/drivers/usb/input/yealink.c b/drivers/usb/input/yealink.c
index 688abcdf1f0f..294224e20f49 100644
--- a/drivers/usb/input/yealink.c
+++ b/drivers/usb/input/yealink.c
@@ -502,7 +502,7 @@ static int input_ev(struct input_dev *dev, unsigned int type,
502 502
503static int input_open(struct input_dev *dev) 503static int input_open(struct input_dev *dev)
504{ 504{
505 struct yealink_dev *yld = dev->private; 505 struct yealink_dev *yld = input_get_drvdata(dev);
506 int i, ret; 506 int i, ret;
507 507
508 dbg("%s", __FUNCTION__); 508 dbg("%s", __FUNCTION__);
@@ -529,7 +529,7 @@ static int input_open(struct input_dev *dev)
529 529
530static void input_close(struct input_dev *dev) 530static void input_close(struct input_dev *dev)
531{ 531{
532 struct yealink_dev *yld = dev->private; 532 struct yealink_dev *yld = input_get_drvdata(dev);
533 533
534 usb_kill_urb(yld->urb_ctl); 534 usb_kill_urb(yld->urb_ctl);
535 usb_kill_urb(yld->urb_irq); 535 usb_kill_urb(yld->urb_irq);
@@ -939,7 +939,8 @@ static int usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
939 usb_to_input_id(udev, &input_dev->id); 939 usb_to_input_id(udev, &input_dev->id);
940 input_dev->cdev.dev = &intf->dev; 940 input_dev->cdev.dev = &intf->dev;
941 941
942 input_dev->private = yld; 942 input_set_drvdata(input_dev, yld);
943
943 input_dev->open = input_open; 944 input_dev->open = input_open;
944 input_dev->close = input_close; 945 input_dev->close = input_close;
945 /* input_dev->event = input_ev; TODO */ 946 /* input_dev->event = input_ev; TODO */