diff options
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 | ||