diff options
Diffstat (limited to 'drivers/input/joystick')
-rw-r--r-- | drivers/input/joystick/a3d.c | 7 | ||||
-rw-r--r-- | drivers/input/joystick/adi.c | 7 | ||||
-rw-r--r-- | drivers/input/joystick/analog.c | 8 | ||||
-rw-r--r-- | drivers/input/joystick/cobra.c | 7 | ||||
-rw-r--r-- | drivers/input/joystick/db9.c | 7 | ||||
-rw-r--r-- | drivers/input/joystick/gamecon.c | 7 | ||||
-rw-r--r-- | drivers/input/joystick/gf2k.c | 8 | ||||
-rw-r--r-- | drivers/input/joystick/grip.c | 7 | ||||
-rw-r--r-- | drivers/input/joystick/grip_mp.c | 9 | ||||
-rw-r--r-- | drivers/input/joystick/guillemot.c | 7 | ||||
-rw-r--r-- | drivers/input/joystick/interact.c | 7 | ||||
-rw-r--r-- | drivers/input/joystick/magellan.c | 1 | ||||
-rw-r--r-- | drivers/input/joystick/sidewinder.c | 7 | ||||
-rw-r--r-- | drivers/input/joystick/spaceball.c | 1 | ||||
-rw-r--r-- | drivers/input/joystick/spaceorb.c | 1 | ||||
-rw-r--r-- | drivers/input/joystick/stinger.c | 1 | ||||
-rw-r--r-- | drivers/input/joystick/tmdc.c | 7 | ||||
-rw-r--r-- | drivers/input/joystick/turbografx.c | 7 | ||||
-rw-r--r-- | drivers/input/joystick/twidjoy.c | 1 | ||||
-rw-r--r-- | drivers/input/joystick/warrior.c | 1 |
20 files changed, 59 insertions, 49 deletions
diff --git a/drivers/input/joystick/a3d.c b/drivers/input/joystick/a3d.c index b11a4bbc84c4..4ac1a8f2169b 100644 --- a/drivers/input/joystick/a3d.c +++ b/drivers/input/joystick/a3d.c | |||
@@ -241,7 +241,7 @@ static void a3d_adc_close(struct gameport *gameport) | |||
241 | 241 | ||
242 | static int a3d_open(struct input_dev *dev) | 242 | static int a3d_open(struct input_dev *dev) |
243 | { | 243 | { |
244 | struct a3d *a3d = dev->private; | 244 | struct a3d *a3d = input_get_drvdata(dev); |
245 | 245 | ||
246 | gameport_start_polling(a3d->gameport); | 246 | gameport_start_polling(a3d->gameport); |
247 | return 0; | 247 | return 0; |
@@ -253,7 +253,7 @@ static int a3d_open(struct input_dev *dev) | |||
253 | 253 | ||
254 | static void a3d_close(struct input_dev *dev) | 254 | static void a3d_close(struct input_dev *dev) |
255 | { | 255 | { |
256 | struct a3d *a3d = dev->private; | 256 | struct a3d *a3d = input_get_drvdata(dev); |
257 | 257 | ||
258 | gameport_stop_polling(a3d->gameport); | 258 | gameport_stop_polling(a3d->gameport); |
259 | } | 259 | } |
@@ -315,10 +315,11 @@ static int a3d_connect(struct gameport *gameport, struct gameport_driver *drv) | |||
315 | input_dev->id.product = a3d->mode; | 315 | input_dev->id.product = a3d->mode; |
316 | input_dev->id.version = 0x0100; | 316 | input_dev->id.version = 0x0100; |
317 | input_dev->cdev.dev = &gameport->dev; | 317 | input_dev->cdev.dev = &gameport->dev; |
318 | input_dev->private = a3d; | ||
319 | input_dev->open = a3d_open; | 318 | input_dev->open = a3d_open; |
320 | input_dev->close = a3d_close; | 319 | input_dev->close = a3d_close; |
321 | 320 | ||
321 | input_set_drvdata(input_dev, a3d); | ||
322 | |||
322 | if (a3d->mode == A3D_MODE_PXL) { | 323 | if (a3d->mode == A3D_MODE_PXL) { |
323 | 324 | ||
324 | int axes[] = { ABS_X, ABS_Y, ABS_THROTTLE, ABS_RUDDER }; | 325 | int axes[] = { ABS_X, ABS_Y, ABS_THROTTLE, ABS_RUDDER }; |
diff --git a/drivers/input/joystick/adi.c b/drivers/input/joystick/adi.c index 6279ced8a35b..e8353526736f 100644 --- a/drivers/input/joystick/adi.c +++ b/drivers/input/joystick/adi.c | |||
@@ -290,7 +290,7 @@ static void adi_poll(struct gameport *gameport) | |||
290 | 290 | ||
291 | static int adi_open(struct input_dev *dev) | 291 | static int adi_open(struct input_dev *dev) |
292 | { | 292 | { |
293 | struct adi_port *port = dev->private; | 293 | struct adi_port *port = input_get_drvdata(dev); |
294 | 294 | ||
295 | gameport_start_polling(port->gameport); | 295 | gameport_start_polling(port->gameport); |
296 | return 0; | 296 | return 0; |
@@ -302,7 +302,7 @@ static int adi_open(struct input_dev *dev) | |||
302 | 302 | ||
303 | static void adi_close(struct input_dev *dev) | 303 | static void adi_close(struct input_dev *dev) |
304 | { | 304 | { |
305 | struct adi_port *port = dev->private; | 305 | struct adi_port *port = input_get_drvdata(dev); |
306 | 306 | ||
307 | gameport_stop_polling(port->gameport); | 307 | gameport_stop_polling(port->gameport); |
308 | } | 308 | } |
@@ -425,7 +425,8 @@ static int adi_init_input(struct adi *adi, struct adi_port *port, int half) | |||
425 | input_dev->id.product = adi->id; | 425 | input_dev->id.product = adi->id; |
426 | input_dev->id.version = 0x0100; | 426 | input_dev->id.version = 0x0100; |
427 | input_dev->cdev.dev = &port->gameport->dev; | 427 | input_dev->cdev.dev = &port->gameport->dev; |
428 | input_dev->private = port; | 428 | |
429 | input_set_drvdata(input_dev, port); | ||
429 | 430 | ||
430 | input_dev->open = adi_open; | 431 | input_dev->open = adi_open; |
431 | input_dev->close = adi_close; | 432 | input_dev->close = adi_close; |
diff --git a/drivers/input/joystick/analog.c b/drivers/input/joystick/analog.c index 51f1e4bfff3e..7244e296bb26 100644 --- a/drivers/input/joystick/analog.c +++ b/drivers/input/joystick/analog.c | |||
@@ -343,7 +343,7 @@ static void analog_poll(struct gameport *gameport) | |||
343 | 343 | ||
344 | static int analog_open(struct input_dev *dev) | 344 | static int analog_open(struct input_dev *dev) |
345 | { | 345 | { |
346 | struct analog_port *port = dev->private; | 346 | struct analog_port *port = input_get_drvdata(dev); |
347 | 347 | ||
348 | gameport_start_polling(port->gameport); | 348 | gameport_start_polling(port->gameport); |
349 | return 0; | 349 | return 0; |
@@ -355,7 +355,7 @@ static int analog_open(struct input_dev *dev) | |||
355 | 355 | ||
356 | static void analog_close(struct input_dev *dev) | 356 | static void analog_close(struct input_dev *dev) |
357 | { | 357 | { |
358 | struct analog_port *port = dev->private; | 358 | struct analog_port *port = input_get_drvdata(dev); |
359 | 359 | ||
360 | gameport_stop_polling(port->gameport); | 360 | gameport_stop_polling(port->gameport); |
361 | } | 361 | } |
@@ -450,9 +450,11 @@ static int analog_init_device(struct analog_port *port, struct analog *analog, i | |||
450 | input_dev->id.product = analog->mask >> 4; | 450 | input_dev->id.product = analog->mask >> 4; |
451 | input_dev->id.version = 0x0100; | 451 | input_dev->id.version = 0x0100; |
452 | 452 | ||
453 | input_set_drvdata(input_dev, port); | ||
454 | |||
453 | input_dev->open = analog_open; | 455 | input_dev->open = analog_open; |
454 | input_dev->close = analog_close; | 456 | input_dev->close = analog_close; |
455 | input_dev->private = port; | 457 | |
456 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); | 458 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); |
457 | 459 | ||
458 | for (i = j = 0; i < 4; i++) | 460 | for (i = j = 0; i < 4; i++) |
diff --git a/drivers/input/joystick/cobra.c b/drivers/input/joystick/cobra.c index 034ec39c251d..207536377fa8 100644 --- a/drivers/input/joystick/cobra.c +++ b/drivers/input/joystick/cobra.c | |||
@@ -142,7 +142,7 @@ static void cobra_poll(struct gameport *gameport) | |||
142 | 142 | ||
143 | static int cobra_open(struct input_dev *dev) | 143 | static int cobra_open(struct input_dev *dev) |
144 | { | 144 | { |
145 | struct cobra *cobra = dev->private; | 145 | struct cobra *cobra = input_get_drvdata(dev); |
146 | 146 | ||
147 | gameport_start_polling(cobra->gameport); | 147 | gameport_start_polling(cobra->gameport); |
148 | return 0; | 148 | return 0; |
@@ -150,7 +150,7 @@ static int cobra_open(struct input_dev *dev) | |||
150 | 150 | ||
151 | static void cobra_close(struct input_dev *dev) | 151 | static void cobra_close(struct input_dev *dev) |
152 | { | 152 | { |
153 | struct cobra *cobra = dev->private; | 153 | struct cobra *cobra = input_get_drvdata(dev); |
154 | 154 | ||
155 | gameport_stop_polling(cobra->gameport); | 155 | gameport_stop_polling(cobra->gameport); |
156 | } | 156 | } |
@@ -212,7 +212,8 @@ static int cobra_connect(struct gameport *gameport, struct gameport_driver *drv) | |||
212 | input_dev->id.product = 0x0008; | 212 | input_dev->id.product = 0x0008; |
213 | input_dev->id.version = 0x0100; | 213 | input_dev->id.version = 0x0100; |
214 | input_dev->cdev.dev = &gameport->dev; | 214 | input_dev->cdev.dev = &gameport->dev; |
215 | input_dev->private = cobra; | 215 | |
216 | input_set_drvdata(input_dev, cobra); | ||
216 | 217 | ||
217 | input_dev->open = cobra_open; | 218 | input_dev->open = cobra_open; |
218 | input_dev->close = cobra_close; | 219 | input_dev->close = cobra_close; |
diff --git a/drivers/input/joystick/db9.c b/drivers/input/joystick/db9.c index b41bd2eb37dd..c27593bf9978 100644 --- a/drivers/input/joystick/db9.c +++ b/drivers/input/joystick/db9.c | |||
@@ -518,7 +518,7 @@ static void db9_timer(unsigned long private) | |||
518 | 518 | ||
519 | static int db9_open(struct input_dev *dev) | 519 | static int db9_open(struct input_dev *dev) |
520 | { | 520 | { |
521 | struct db9 *db9 = dev->private; | 521 | struct db9 *db9 = input_get_drvdata(dev); |
522 | struct parport *port = db9->pd->port; | 522 | struct parport *port = db9->pd->port; |
523 | int err; | 523 | int err; |
524 | 524 | ||
@@ -542,7 +542,7 @@ static int db9_open(struct input_dev *dev) | |||
542 | 542 | ||
543 | static void db9_close(struct input_dev *dev) | 543 | static void db9_close(struct input_dev *dev) |
544 | { | 544 | { |
545 | struct db9 *db9 = dev->private; | 545 | struct db9 *db9 = input_get_drvdata(dev); |
546 | struct parport *port = db9->pd->port; | 546 | struct parport *port = db9->pd->port; |
547 | 547 | ||
548 | mutex_lock(&db9->mutex); | 548 | mutex_lock(&db9->mutex); |
@@ -625,7 +625,8 @@ static struct db9 __init *db9_probe(int parport, int mode) | |||
625 | input_dev->id.vendor = 0x0002; | 625 | input_dev->id.vendor = 0x0002; |
626 | input_dev->id.product = mode; | 626 | input_dev->id.product = mode; |
627 | input_dev->id.version = 0x0100; | 627 | input_dev->id.version = 0x0100; |
628 | input_dev->private = db9; | 628 | |
629 | input_set_drvdata(input_dev, db9); | ||
629 | 630 | ||
630 | input_dev->open = db9_open; | 631 | input_dev->open = db9_open; |
631 | input_dev->close = db9_close; | 632 | input_dev->close = db9_close; |
diff --git a/drivers/input/joystick/gamecon.c b/drivers/input/joystick/gamecon.c index 711e4b3e9e61..c71b58fe225d 100644 --- a/drivers/input/joystick/gamecon.c +++ b/drivers/input/joystick/gamecon.c | |||
@@ -591,7 +591,7 @@ static void gc_timer(unsigned long private) | |||
591 | 591 | ||
592 | static int gc_open(struct input_dev *dev) | 592 | static int gc_open(struct input_dev *dev) |
593 | { | 593 | { |
594 | struct gc *gc = dev->private; | 594 | struct gc *gc = input_get_drvdata(dev); |
595 | int err; | 595 | int err; |
596 | 596 | ||
597 | err = mutex_lock_interruptible(&gc->mutex); | 597 | err = mutex_lock_interruptible(&gc->mutex); |
@@ -610,7 +610,7 @@ static int gc_open(struct input_dev *dev) | |||
610 | 610 | ||
611 | static void gc_close(struct input_dev *dev) | 611 | static void gc_close(struct input_dev *dev) |
612 | { | 612 | { |
613 | struct gc *gc = dev->private; | 613 | struct gc *gc = input_get_drvdata(dev); |
614 | 614 | ||
615 | mutex_lock(&gc->mutex); | 615 | mutex_lock(&gc->mutex); |
616 | if (!--gc->used) { | 616 | if (!--gc->used) { |
@@ -646,7 +646,8 @@ static int __init gc_setup_pad(struct gc *gc, int idx, int pad_type) | |||
646 | input_dev->id.vendor = 0x0001; | 646 | input_dev->id.vendor = 0x0001; |
647 | input_dev->id.product = pad_type; | 647 | input_dev->id.product = pad_type; |
648 | input_dev->id.version = 0x0100; | 648 | input_dev->id.version = 0x0100; |
649 | input_dev->private = gc; | 649 | |
650 | input_set_drvdata(input_dev, gc); | ||
650 | 651 | ||
651 | input_dev->open = gc_open; | 652 | input_dev->open = gc_open; |
652 | input_dev->close = gc_close; | 653 | input_dev->close = gc_close; |
diff --git a/drivers/input/joystick/gf2k.c b/drivers/input/joystick/gf2k.c index bacbab5d1b6f..ac7db7a1f8db 100644 --- a/drivers/input/joystick/gf2k.c +++ b/drivers/input/joystick/gf2k.c | |||
@@ -220,7 +220,7 @@ static void gf2k_poll(struct gameport *gameport) | |||
220 | 220 | ||
221 | static int gf2k_open(struct input_dev *dev) | 221 | static int gf2k_open(struct input_dev *dev) |
222 | { | 222 | { |
223 | struct gf2k *gf2k = dev->private; | 223 | struct gf2k *gf2k = input_get_drvdata(dev); |
224 | 224 | ||
225 | gameport_start_polling(gf2k->gameport); | 225 | gameport_start_polling(gf2k->gameport); |
226 | return 0; | 226 | return 0; |
@@ -228,7 +228,7 @@ static int gf2k_open(struct input_dev *dev) | |||
228 | 228 | ||
229 | static void gf2k_close(struct input_dev *dev) | 229 | static void gf2k_close(struct input_dev *dev) |
230 | { | 230 | { |
231 | struct gf2k *gf2k = dev->private; | 231 | struct gf2k *gf2k = input_get_drvdata(dev); |
232 | 232 | ||
233 | gameport_stop_polling(gf2k->gameport); | 233 | gameport_stop_polling(gf2k->gameport); |
234 | } | 234 | } |
@@ -309,10 +309,12 @@ static int gf2k_connect(struct gameport *gameport, struct gameport_driver *drv) | |||
309 | input_dev->id.product = gf2k->id; | 309 | input_dev->id.product = gf2k->id; |
310 | input_dev->id.version = 0x0100; | 310 | input_dev->id.version = 0x0100; |
311 | input_dev->cdev.dev = &gameport->dev; | 311 | input_dev->cdev.dev = &gameport->dev; |
312 | input_dev->private = gf2k; | 312 | |
313 | input_set_drvdata(input_dev, gf2k); | ||
313 | 314 | ||
314 | input_dev->open = gf2k_open; | 315 | input_dev->open = gf2k_open; |
315 | input_dev->close = gf2k_close; | 316 | input_dev->close = gf2k_close; |
317 | |||
316 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); | 318 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); |
317 | 319 | ||
318 | for (i = 0; i < gf2k_axes[gf2k->id]; i++) | 320 | for (i = 0; i < gf2k_axes[gf2k->id]; i++) |
diff --git a/drivers/input/joystick/grip.c b/drivers/input/joystick/grip.c index 17a90c436de8..41da7f17d6ee 100644 --- a/drivers/input/joystick/grip.c +++ b/drivers/input/joystick/grip.c | |||
@@ -285,7 +285,7 @@ static void grip_poll(struct gameport *gameport) | |||
285 | 285 | ||
286 | static int grip_open(struct input_dev *dev) | 286 | static int grip_open(struct input_dev *dev) |
287 | { | 287 | { |
288 | struct grip *grip = dev->private; | 288 | struct grip *grip = input_get_drvdata(dev); |
289 | 289 | ||
290 | gameport_start_polling(grip->gameport); | 290 | gameport_start_polling(grip->gameport); |
291 | return 0; | 291 | return 0; |
@@ -293,7 +293,7 @@ static int grip_open(struct input_dev *dev) | |||
293 | 293 | ||
294 | static void grip_close(struct input_dev *dev) | 294 | static void grip_close(struct input_dev *dev) |
295 | { | 295 | { |
296 | struct grip *grip = dev->private; | 296 | struct grip *grip = input_get_drvdata(dev); |
297 | 297 | ||
298 | gameport_stop_polling(grip->gameport); | 298 | gameport_stop_polling(grip->gameport); |
299 | } | 299 | } |
@@ -364,7 +364,8 @@ static int grip_connect(struct gameport *gameport, struct gameport_driver *drv) | |||
364 | input_dev->id.product = grip->mode[i]; | 364 | input_dev->id.product = grip->mode[i]; |
365 | input_dev->id.version = 0x0100; | 365 | input_dev->id.version = 0x0100; |
366 | input_dev->cdev.dev = &gameport->dev; | 366 | input_dev->cdev.dev = &gameport->dev; |
367 | input_dev->private = grip; | 367 | |
368 | input_set_drvdata(input_dev, grip); | ||
368 | 369 | ||
369 | input_dev->open = grip_open; | 370 | input_dev->open = grip_open; |
370 | input_dev->close = grip_close; | 371 | input_dev->close = grip_close; |
diff --git a/drivers/input/joystick/grip_mp.c b/drivers/input/joystick/grip_mp.c index 8120a9c40773..1771d5d86790 100644 --- a/drivers/input/joystick/grip_mp.c +++ b/drivers/input/joystick/grip_mp.c | |||
@@ -562,7 +562,7 @@ static void grip_poll(struct gameport *gameport) | |||
562 | 562 | ||
563 | static int grip_open(struct input_dev *dev) | 563 | static int grip_open(struct input_dev *dev) |
564 | { | 564 | { |
565 | struct grip_mp *grip = dev->private; | 565 | struct grip_mp *grip = input_get_drvdata(dev); |
566 | 566 | ||
567 | gameport_start_polling(grip->gameport); | 567 | gameport_start_polling(grip->gameport); |
568 | return 0; | 568 | return 0; |
@@ -574,9 +574,9 @@ static int grip_open(struct input_dev *dev) | |||
574 | 574 | ||
575 | static void grip_close(struct input_dev *dev) | 575 | static void grip_close(struct input_dev *dev) |
576 | { | 576 | { |
577 | struct grip_mp *grip = dev->private; | 577 | struct grip_mp *grip = input_get_drvdata(dev); |
578 | 578 | ||
579 | gameport_start_polling(grip->gameport); | 579 | gameport_stop_polling(grip->gameport); |
580 | } | 580 | } |
581 | 581 | ||
582 | /* | 582 | /* |
@@ -600,7 +600,8 @@ static int register_slot(int slot, struct grip_mp *grip) | |||
600 | input_dev->id.product = 0x0100 + port->mode; | 600 | input_dev->id.product = 0x0100 + port->mode; |
601 | input_dev->id.version = 0x0100; | 601 | input_dev->id.version = 0x0100; |
602 | input_dev->cdev.dev = &grip->gameport->dev; | 602 | input_dev->cdev.dev = &grip->gameport->dev; |
603 | input_dev->private = grip; | 603 | |
604 | input_set_drvdata(input_dev, grip); | ||
604 | 605 | ||
605 | input_dev->open = grip_open; | 606 | input_dev->open = grip_open; |
606 | input_dev->close = grip_close; | 607 | input_dev->close = grip_close; |
diff --git a/drivers/input/joystick/guillemot.c b/drivers/input/joystick/guillemot.c index dbc5d92858b8..3e022dc83941 100644 --- a/drivers/input/joystick/guillemot.c +++ b/drivers/input/joystick/guillemot.c | |||
@@ -156,7 +156,7 @@ static void guillemot_poll(struct gameport *gameport) | |||
156 | 156 | ||
157 | static int guillemot_open(struct input_dev *dev) | 157 | static int guillemot_open(struct input_dev *dev) |
158 | { | 158 | { |
159 | struct guillemot *guillemot = dev->private; | 159 | struct guillemot *guillemot = input_get_drvdata(dev); |
160 | 160 | ||
161 | gameport_start_polling(guillemot->gameport); | 161 | gameport_start_polling(guillemot->gameport); |
162 | return 0; | 162 | return 0; |
@@ -168,7 +168,7 @@ static int guillemot_open(struct input_dev *dev) | |||
168 | 168 | ||
169 | static void guillemot_close(struct input_dev *dev) | 169 | static void guillemot_close(struct input_dev *dev) |
170 | { | 170 | { |
171 | struct guillemot *guillemot = dev->private; | 171 | struct guillemot *guillemot = input_get_drvdata(dev); |
172 | 172 | ||
173 | gameport_stop_polling(guillemot->gameport); | 173 | gameport_stop_polling(guillemot->gameport); |
174 | } | 174 | } |
@@ -232,7 +232,8 @@ static int guillemot_connect(struct gameport *gameport, struct gameport_driver * | |||
232 | input_dev->id.product = guillemot_type[i].id; | 232 | input_dev->id.product = guillemot_type[i].id; |
233 | input_dev->id.version = (int)data[14] << 8 | data[15]; | 233 | input_dev->id.version = (int)data[14] << 8 | data[15]; |
234 | input_dev->cdev.dev = &gameport->dev; | 234 | input_dev->cdev.dev = &gameport->dev; |
235 | input_dev->private = guillemot; | 235 | |
236 | input_set_drvdata(input_dev, guillemot); | ||
236 | 237 | ||
237 | input_dev->open = guillemot_open; | 238 | input_dev->open = guillemot_open; |
238 | input_dev->close = guillemot_close; | 239 | input_dev->close = guillemot_close; |
diff --git a/drivers/input/joystick/interact.c b/drivers/input/joystick/interact.c index fec8b3d0967d..f0ff78384cbe 100644 --- a/drivers/input/joystick/interact.c +++ b/drivers/input/joystick/interact.c | |||
@@ -185,7 +185,7 @@ static void interact_poll(struct gameport *gameport) | |||
185 | 185 | ||
186 | static int interact_open(struct input_dev *dev) | 186 | static int interact_open(struct input_dev *dev) |
187 | { | 187 | { |
188 | struct interact *interact = dev->private; | 188 | struct interact *interact = input_get_drvdata(dev); |
189 | 189 | ||
190 | gameport_start_polling(interact->gameport); | 190 | gameport_start_polling(interact->gameport); |
191 | return 0; | 191 | return 0; |
@@ -197,7 +197,7 @@ static int interact_open(struct input_dev *dev) | |||
197 | 197 | ||
198 | static void interact_close(struct input_dev *dev) | 198 | static void interact_close(struct input_dev *dev) |
199 | { | 199 | { |
200 | struct interact *interact = dev->private; | 200 | struct interact *interact = input_get_drvdata(dev); |
201 | 201 | ||
202 | gameport_stop_polling(interact->gameport); | 202 | gameport_stop_polling(interact->gameport); |
203 | } | 203 | } |
@@ -262,7 +262,8 @@ static int interact_connect(struct gameport *gameport, struct gameport_driver *d | |||
262 | input_dev->id.vendor = GAMEPORT_ID_VENDOR_INTERACT; | 262 | input_dev->id.vendor = GAMEPORT_ID_VENDOR_INTERACT; |
263 | input_dev->id.product = interact_type[i].id; | 263 | input_dev->id.product = interact_type[i].id; |
264 | input_dev->id.version = 0x0100; | 264 | input_dev->id.version = 0x0100; |
265 | input_dev->private = interact; | 265 | |
266 | input_set_drvdata(input_dev, interact); | ||
266 | 267 | ||
267 | input_dev->open = interact_open; | 268 | input_dev->open = interact_open; |
268 | input_dev->close = interact_close; | 269 | input_dev->close = interact_close; |
diff --git a/drivers/input/joystick/magellan.c b/drivers/input/joystick/magellan.c index 4112789f1196..31f6866a2efe 100644 --- a/drivers/input/joystick/magellan.c +++ b/drivers/input/joystick/magellan.c | |||
@@ -169,7 +169,6 @@ static int magellan_connect(struct serio *serio, struct serio_driver *drv) | |||
169 | input_dev->id.product = 0x0001; | 169 | input_dev->id.product = 0x0001; |
170 | input_dev->id.version = 0x0100; | 170 | input_dev->id.version = 0x0100; |
171 | input_dev->cdev.dev = &serio->dev; | 171 | input_dev->cdev.dev = &serio->dev; |
172 | input_dev->private = magellan; | ||
173 | 172 | ||
174 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); | 173 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); |
175 | 174 | ||
diff --git a/drivers/input/joystick/sidewinder.c b/drivers/input/joystick/sidewinder.c index e58b22c018e4..f800c39475b3 100644 --- a/drivers/input/joystick/sidewinder.c +++ b/drivers/input/joystick/sidewinder.c | |||
@@ -509,7 +509,7 @@ static void sw_poll(struct gameport *gameport) | |||
509 | 509 | ||
510 | static int sw_open(struct input_dev *dev) | 510 | static int sw_open(struct input_dev *dev) |
511 | { | 511 | { |
512 | struct sw *sw = dev->private; | 512 | struct sw *sw = input_get_drvdata(dev); |
513 | 513 | ||
514 | gameport_start_polling(sw->gameport); | 514 | gameport_start_polling(sw->gameport); |
515 | return 0; | 515 | return 0; |
@@ -517,7 +517,7 @@ static int sw_open(struct input_dev *dev) | |||
517 | 517 | ||
518 | static void sw_close(struct input_dev *dev) | 518 | static void sw_close(struct input_dev *dev) |
519 | { | 519 | { |
520 | struct sw *sw = dev->private; | 520 | struct sw *sw = input_get_drvdata(dev); |
521 | 521 | ||
522 | gameport_stop_polling(sw->gameport); | 522 | gameport_stop_polling(sw->gameport); |
523 | } | 523 | } |
@@ -752,7 +752,8 @@ static int sw_connect(struct gameport *gameport, struct gameport_driver *drv) | |||
752 | input_dev->id.product = sw->type; | 752 | input_dev->id.product = sw->type; |
753 | input_dev->id.version = 0x0100; | 753 | input_dev->id.version = 0x0100; |
754 | input_dev->cdev.dev = &gameport->dev; | 754 | input_dev->cdev.dev = &gameport->dev; |
755 | input_dev->private = sw; | 755 | |
756 | input_set_drvdata(input_dev, sw); | ||
756 | 757 | ||
757 | input_dev->open = sw_open; | 758 | input_dev->open = sw_open; |
758 | input_dev->close = sw_close; | 759 | input_dev->close = sw_close; |
diff --git a/drivers/input/joystick/spaceball.c b/drivers/input/joystick/spaceball.c index 08bf113e62eb..dd611deecb0e 100644 --- a/drivers/input/joystick/spaceball.c +++ b/drivers/input/joystick/spaceball.c | |||
@@ -227,7 +227,6 @@ static int spaceball_connect(struct serio *serio, struct serio_driver *drv) | |||
227 | input_dev->id.product = id; | 227 | input_dev->id.product = id; |
228 | input_dev->id.version = 0x0100; | 228 | input_dev->id.version = 0x0100; |
229 | input_dev->cdev.dev = &serio->dev; | 229 | input_dev->cdev.dev = &serio->dev; |
230 | input_dev->private = spaceball; | ||
231 | 230 | ||
232 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); | 231 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); |
233 | 232 | ||
diff --git a/drivers/input/joystick/spaceorb.c b/drivers/input/joystick/spaceorb.c index c9c79211af71..f5e496679e2b 100644 --- a/drivers/input/joystick/spaceorb.c +++ b/drivers/input/joystick/spaceorb.c | |||
@@ -184,7 +184,6 @@ static int spaceorb_connect(struct serio *serio, struct serio_driver *drv) | |||
184 | input_dev->id.product = 0x0001; | 184 | input_dev->id.product = 0x0001; |
185 | input_dev->id.version = 0x0100; | 185 | input_dev->id.version = 0x0100; |
186 | input_dev->cdev.dev = &serio->dev; | 186 | input_dev->cdev.dev = &serio->dev; |
187 | input_dev->private = spaceorb; | ||
188 | 187 | ||
189 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); | 188 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); |
190 | 189 | ||
diff --git a/drivers/input/joystick/stinger.c b/drivers/input/joystick/stinger.c index ecb0916215fa..b6a6f21cc921 100644 --- a/drivers/input/joystick/stinger.c +++ b/drivers/input/joystick/stinger.c | |||
@@ -155,7 +155,6 @@ static int stinger_connect(struct serio *serio, struct serio_driver *drv) | |||
155 | input_dev->id.product = 0x0001; | 155 | input_dev->id.product = 0x0001; |
156 | input_dev->id.version = 0x0100; | 156 | input_dev->id.version = 0x0100; |
157 | input_dev->cdev.dev = &serio->dev; | 157 | input_dev->cdev.dev = &serio->dev; |
158 | input_dev->private = stinger; | ||
159 | 158 | ||
160 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); | 159 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); |
161 | input_dev->keybit[LONG(BTN_A)] = BIT(BTN_A) | BIT(BTN_B) | BIT(BTN_C) | BIT(BTN_X) | | 160 | input_dev->keybit[LONG(BTN_A)] = BIT(BTN_A) | BIT(BTN_B) | BIT(BTN_C) | BIT(BTN_X) | |
diff --git a/drivers/input/joystick/tmdc.c b/drivers/input/joystick/tmdc.c index bb23ed2a04a6..53260d11fd67 100644 --- a/drivers/input/joystick/tmdc.c +++ b/drivers/input/joystick/tmdc.c | |||
@@ -265,7 +265,7 @@ static void tmdc_poll(struct gameport *gameport) | |||
265 | 265 | ||
266 | static int tmdc_open(struct input_dev *dev) | 266 | static int tmdc_open(struct input_dev *dev) |
267 | { | 267 | { |
268 | struct tmdc *tmdc = dev->private; | 268 | struct tmdc *tmdc = input_get_drvdata(dev); |
269 | 269 | ||
270 | gameport_start_polling(tmdc->gameport); | 270 | gameport_start_polling(tmdc->gameport); |
271 | return 0; | 271 | return 0; |
@@ -273,7 +273,7 @@ static int tmdc_open(struct input_dev *dev) | |||
273 | 273 | ||
274 | static void tmdc_close(struct input_dev *dev) | 274 | static void tmdc_close(struct input_dev *dev) |
275 | { | 275 | { |
276 | struct tmdc *tmdc = dev->private; | 276 | struct tmdc *tmdc = input_get_drvdata(dev); |
277 | 277 | ||
278 | gameport_stop_polling(tmdc->gameport); | 278 | gameport_stop_polling(tmdc->gameport); |
279 | } | 279 | } |
@@ -327,7 +327,8 @@ static int tmdc_setup_port(struct tmdc *tmdc, int idx, unsigned char *data) | |||
327 | input_dev->id.product = model->id; | 327 | input_dev->id.product = model->id; |
328 | input_dev->id.version = 0x0100; | 328 | input_dev->id.version = 0x0100; |
329 | input_dev->cdev.dev = &tmdc->gameport->dev; | 329 | input_dev->cdev.dev = &tmdc->gameport->dev; |
330 | input_dev->private = tmdc; | 330 | |
331 | input_set_drvdata(input_dev, tmdc); | ||
331 | 332 | ||
332 | input_dev->open = tmdc_open; | 333 | input_dev->open = tmdc_open; |
333 | input_dev->close = tmdc_close; | 334 | input_dev->close = tmdc_close; |
diff --git a/drivers/input/joystick/turbografx.c b/drivers/input/joystick/turbografx.c index 037d3487fcc7..0f2c60823b0b 100644 --- a/drivers/input/joystick/turbografx.c +++ b/drivers/input/joystick/turbografx.c | |||
@@ -122,7 +122,7 @@ static void tgfx_timer(unsigned long private) | |||
122 | 122 | ||
123 | static int tgfx_open(struct input_dev *dev) | 123 | static int tgfx_open(struct input_dev *dev) |
124 | { | 124 | { |
125 | struct tgfx *tgfx = dev->private; | 125 | struct tgfx *tgfx = input_get_drvdata(dev); |
126 | int err; | 126 | int err; |
127 | 127 | ||
128 | err = mutex_lock_interruptible(&tgfx->sem); | 128 | err = mutex_lock_interruptible(&tgfx->sem); |
@@ -141,7 +141,7 @@ static int tgfx_open(struct input_dev *dev) | |||
141 | 141 | ||
142 | static void tgfx_close(struct input_dev *dev) | 142 | static void tgfx_close(struct input_dev *dev) |
143 | { | 143 | { |
144 | struct tgfx *tgfx = dev->private; | 144 | struct tgfx *tgfx = input_get_drvdata(dev); |
145 | 145 | ||
146 | mutex_lock(&tgfx->sem); | 146 | mutex_lock(&tgfx->sem); |
147 | if (!--tgfx->used) { | 147 | if (!--tgfx->used) { |
@@ -224,7 +224,8 @@ static struct tgfx __init *tgfx_probe(int parport, int *n_buttons, int n_devs) | |||
224 | input_dev->id.product = n_buttons[i]; | 224 | input_dev->id.product = n_buttons[i]; |
225 | input_dev->id.version = 0x0100; | 225 | input_dev->id.version = 0x0100; |
226 | 226 | ||
227 | input_dev->private = tgfx; | 227 | input_set_drvdata(input_dev, tgfx); |
228 | |||
228 | input_dev->open = tgfx_open; | 229 | input_dev->open = tgfx_open; |
229 | input_dev->close = tgfx_close; | 230 | input_dev->close = tgfx_close; |
230 | 231 | ||
diff --git a/drivers/input/joystick/twidjoy.c b/drivers/input/joystick/twidjoy.c index 9cf17d6ced82..458a129b4b22 100644 --- a/drivers/input/joystick/twidjoy.c +++ b/drivers/input/joystick/twidjoy.c | |||
@@ -206,7 +206,6 @@ static int twidjoy_connect(struct serio *serio, struct serio_driver *drv) | |||
206 | input_dev->id.product = 0x0001; | 206 | input_dev->id.product = 0x0001; |
207 | input_dev->id.version = 0x0100; | 207 | input_dev->id.version = 0x0100; |
208 | input_dev->cdev.dev = &serio->dev; | 208 | input_dev->cdev.dev = &serio->dev; |
209 | input_dev->private = twidjoy; | ||
210 | 209 | ||
211 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); | 210 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); |
212 | input_dev->absbit[0] = BIT(ABS_X) | BIT(ABS_Y); | 211 | input_dev->absbit[0] = BIT(ABS_X) | BIT(ABS_Y); |
diff --git a/drivers/input/joystick/warrior.c b/drivers/input/joystick/warrior.c index 29d339acf430..e0927a562905 100644 --- a/drivers/input/joystick/warrior.c +++ b/drivers/input/joystick/warrior.c | |||
@@ -161,7 +161,6 @@ static int warrior_connect(struct serio *serio, struct serio_driver *drv) | |||
161 | input_dev->id.product = 0x0001; | 161 | input_dev->id.product = 0x0001; |
162 | input_dev->id.version = 0x0100; | 162 | input_dev->id.version = 0x0100; |
163 | input_dev->cdev.dev = &serio->dev; | 163 | input_dev->cdev.dev = &serio->dev; |
164 | input_dev->private = warrior; | ||
165 | 164 | ||
166 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REL) | BIT(EV_ABS); | 165 | input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REL) | BIT(EV_ABS); |
167 | input_dev->keybit[LONG(BTN_TRIGGER)] = BIT(BTN_TRIGGER) | BIT(BTN_THUMB) | BIT(BTN_TOP) | BIT(BTN_TOP2); | 166 | input_dev->keybit[LONG(BTN_TRIGGER)] = BIT(BTN_TRIGGER) | BIT(BTN_THUMB) | BIT(BTN_TOP) | BIT(BTN_TOP2); |