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/turbografx.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/turbografx.c')
-rw-r--r-- | drivers/input/joystick/turbografx.c | 7 |
1 files changed, 4 insertions, 3 deletions
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 | ||