aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/joystick/db9.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/joystick/db9.c')
-rw-r--r--drivers/input/joystick/db9.c7
1 files changed, 4 insertions, 3 deletions
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
519static int db9_open(struct input_dev *dev) 519static 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
543static void db9_close(struct input_dev *dev) 543static 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;