diff options
author | Dmitry Torokhov <dtor@insightbb.com> | 2007-04-12 01:34:14 -0400 |
---|---|---|
committer | Dmitry Torokhov <dtor@insightbb.com> | 2007-04-12 01:34:14 -0400 |
commit | 8715c1cfadf8cce24e79d254f95bd4a84c7741f0 (patch) | |
tree | 08d68f40f09b49c0bbb2c7185d879a8a8121950b /drivers/input/joystick/db9.c | |
parent | 40b9b0b82e664bfdf26fd33014d52e23ff80b9f4 (diff) |
Input: drivers/input/joystick - don't access dev->private directly
Use input_get_drvdata() and input_set_drvdata() instead.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/joystick/db9.c')
-rw-r--r-- | drivers/input/joystick/db9.c | 7 |
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 | ||
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; |