aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/input/appletouch.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/input/appletouch.c')
-rw-r--r--drivers/usb/input/appletouch.c7
1 files changed, 4 insertions, 3 deletions
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