interact.c (9cdf083f981b8d37b3212400a359368661385099) | interact.c (8715c1cfadf8cce24e79d254f95bd4a84c7741f0) |
---|---|
1/* 2 * $Id: interact.c,v 1.16 2002/01/22 20:28:25 vojtech Exp $ 3 * 4 * Copyright (c) 2001 Vojtech Pavlik 5 * 6 * Based on the work of: 7 * Toby Deshane 8 */ --- 171 unchanged lines hidden (view full) --- 180} 181 182/* 183 * interact_open() is a callback from the input open routine. 184 */ 185 186static int interact_open(struct input_dev *dev) 187{ | 1/* 2 * $Id: interact.c,v 1.16 2002/01/22 20:28:25 vojtech Exp $ 3 * 4 * Copyright (c) 2001 Vojtech Pavlik 5 * 6 * Based on the work of: 7 * Toby Deshane 8 */ --- 171 unchanged lines hidden (view full) --- 180} 181 182/* 183 * interact_open() is a callback from the input open routine. 184 */ 185 186static int interact_open(struct input_dev *dev) 187{ |
188 struct interact *interact = dev->private; | 188 struct interact *interact = input_get_drvdata(dev); |
189 190 gameport_start_polling(interact->gameport); 191 return 0; 192} 193 194/* 195 * interact_close() is a callback from the input close routine. 196 */ 197 198static void interact_close(struct input_dev *dev) 199{ | 189 190 gameport_start_polling(interact->gameport); 191 return 0; 192} 193 194/* 195 * interact_close() is a callback from the input close routine. 196 */ 197 198static void interact_close(struct input_dev *dev) 199{ |
200 struct interact *interact = dev->private; | 200 struct interact *interact = input_get_drvdata(dev); |
201 202 gameport_stop_polling(interact->gameport); 203} 204 205/* 206 * interact_connect() probes for InterAct joysticks. 207 */ 208 --- 48 unchanged lines hidden (view full) --- 257 interact->length = interact_type[i].length; 258 259 input_dev->name = interact_type[i].name; 260 input_dev->phys = interact->phys; 261 input_dev->id.bustype = BUS_GAMEPORT; 262 input_dev->id.vendor = GAMEPORT_ID_VENDOR_INTERACT; 263 input_dev->id.product = interact_type[i].id; 264 input_dev->id.version = 0x0100; | 201 202 gameport_stop_polling(interact->gameport); 203} 204 205/* 206 * interact_connect() probes for InterAct joysticks. 207 */ 208 --- 48 unchanged lines hidden (view full) --- 257 interact->length = interact_type[i].length; 258 259 input_dev->name = interact_type[i].name; 260 input_dev->phys = interact->phys; 261 input_dev->id.bustype = BUS_GAMEPORT; 262 input_dev->id.vendor = GAMEPORT_ID_VENDOR_INTERACT; 263 input_dev->id.product = interact_type[i].id; 264 input_dev->id.version = 0x0100; |
265 input_dev->private = interact; | |
266 | 265 |
266 input_set_drvdata(input_dev, interact); 267 |
|
267 input_dev->open = interact_open; 268 input_dev->close = interact_close; 269 270 input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); 271 272 for (i = 0; (t = interact_type[interact->type].abs[i]) >= 0; i++) { 273 set_bit(t, input_dev->absbit); 274 if (i < interact_type[interact->type].b8) { --- 56 unchanged lines hidden --- | 268 input_dev->open = interact_open; 269 input_dev->close = interact_close; 270 271 input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); 272 273 for (i = 0; (t = interact_type[interact->type].abs[i]) >= 0; i++) { 274 set_bit(t, input_dev->absbit); 275 if (i < interact_type[interact->type].b8) { --- 56 unchanged lines hidden --- |