aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/input/ati_remote2.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/input/ati_remote2.c')
-rw-r--r--drivers/usb/input/ati_remote2.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/usb/input/ati_remote2.c b/drivers/usb/input/ati_remote2.c
index 6459be90599c..a9032aa3465f 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]);
@@ -337,14 +337,14 @@ static void ati_remote2_complete_key(struct urb *urb)
337static int ati_remote2_input_init(struct ati_remote2 *ar2) 337static int ati_remote2_input_init(struct ati_remote2 *ar2)
338{ 338{
339 struct input_dev *idev; 339 struct input_dev *idev;
340 int i; 340 int i, retval;
341 341
342 idev = input_allocate_device(); 342 idev = input_allocate_device();
343 if (!idev) 343 if (!idev)
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);
@@ -362,13 +362,13 @@ static int ati_remote2_input_init(struct ati_remote2 *ar2)
362 idev->phys = ar2->phys; 362 idev->phys = ar2->phys;
363 363
364 usb_to_input_id(ar2->udev, &idev->id); 364 usb_to_input_id(ar2->udev, &idev->id);
365 idev->cdev.dev = &ar2->udev->dev; 365 idev->dev.parent = &ar2->udev->dev;
366 366
367 i = input_register_device(idev); 367 retval = input_register_device(idev);
368 if (i) 368 if (retval)
369 input_free_device(idev); 369 input_free_device(idev);
370 370
371 return i; 371 return retval;
372} 372}
373 373
374static int ati_remote2_urb_init(struct ati_remote2 *ar2) 374static int ati_remote2_urb_init(struct ati_remote2 *ar2)