aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/joystick/turbografx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/joystick/turbografx.c')
-rw-r--r--drivers/input/joystick/turbografx.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/input/joystick/turbografx.c b/drivers/input/joystick/turbografx.c
index dd88b9cb49fa..316c4bebfed2 100644
--- a/drivers/input/joystick/turbografx.c
+++ b/drivers/input/joystick/turbografx.c
@@ -99,7 +99,7 @@ static void tgfx_timer(unsigned long private)
99 for (i = 0; i < 7; i++) 99 for (i = 0; i < 7; i++)
100 if (tgfx->sticks & (1 << i)) { 100 if (tgfx->sticks & (1 << i)) {
101 101
102 dev = tgfx->dev + i; 102 dev = tgfx->dev + i;
103 103
104 parport_write_data(tgfx->pd->port, ~(1 << i)); 104 parport_write_data(tgfx->pd->port, ~(1 << i));
105 data1 = parport_read_status(tgfx->pd->port) ^ 0x7f; 105 data1 = parport_read_status(tgfx->pd->port) ^ 0x7f;
@@ -122,22 +122,22 @@ static void tgfx_timer(unsigned long private)
122 122
123static int tgfx_open(struct input_dev *dev) 123static int tgfx_open(struct input_dev *dev)
124{ 124{
125 struct tgfx *tgfx = dev->private; 125 struct tgfx *tgfx = dev->private;
126 if (!tgfx->used++) { 126 if (!tgfx->used++) {
127 parport_claim(tgfx->pd); 127 parport_claim(tgfx->pd);
128 parport_write_control(tgfx->pd->port, 0x04); 128 parport_write_control(tgfx->pd->port, 0x04);
129 mod_timer(&tgfx->timer, jiffies + TGFX_REFRESH_TIME); 129 mod_timer(&tgfx->timer, jiffies + TGFX_REFRESH_TIME);
130 } 130 }
131 return 0; 131 return 0;
132} 132}
133 133
134static void tgfx_close(struct input_dev *dev) 134static void tgfx_close(struct input_dev *dev)
135{ 135{
136 struct tgfx *tgfx = dev->private; 136 struct tgfx *tgfx = dev->private;
137 if (!--tgfx->used) { 137 if (!--tgfx->used) {
138 del_timer(&tgfx->timer); 138 del_timer(&tgfx->timer);
139 parport_write_control(tgfx->pd->port, 0x00); 139 parport_write_control(tgfx->pd->port, 0x00);
140 parport_release(tgfx->pd); 140 parport_release(tgfx->pd);
141 } 141 }
142} 142}
143 143