tmdc.c (b05005772f34497eb2b7415a651fe785cbe70e16) | tmdc.c (8715c1cfadf8cce24e79d254f95bd4a84c7741f0) |
---|---|
1/* 2 * $Id: tmdc.c,v 1.31 2002/01/22 20:29:52 vojtech Exp $ 3 * 4 * Copyright (c) 1998-2001 Vojtech Pavlik 5 * 6 * Based on the work of: 7 * Trystan Larey-Williams 8 */ --- 251 unchanged lines hidden (view full) --- 260 } 261 } 262 263 tmdc->bads += bad; 264} 265 266static int tmdc_open(struct input_dev *dev) 267{ | 1/* 2 * $Id: tmdc.c,v 1.31 2002/01/22 20:29:52 vojtech Exp $ 3 * 4 * Copyright (c) 1998-2001 Vojtech Pavlik 5 * 6 * Based on the work of: 7 * Trystan Larey-Williams 8 */ --- 251 unchanged lines hidden (view full) --- 260 } 261 } 262 263 tmdc->bads += bad; 264} 265 266static int tmdc_open(struct input_dev *dev) 267{ |
268 struct tmdc *tmdc = dev->private; | 268 struct tmdc *tmdc = input_get_drvdata(dev); |
269 270 gameport_start_polling(tmdc->gameport); 271 return 0; 272} 273 274static void tmdc_close(struct input_dev *dev) 275{ | 269 270 gameport_start_polling(tmdc->gameport); 271 return 0; 272} 273 274static void tmdc_close(struct input_dev *dev) 275{ |
276 struct tmdc *tmdc = dev->private; | 276 struct tmdc *tmdc = input_get_drvdata(dev); |
277 278 gameport_stop_polling(tmdc->gameport); 279} 280 281static int tmdc_setup_port(struct tmdc *tmdc, int idx, unsigned char *data) 282{ 283 const struct tmdc_model *model; 284 struct tmdc_port *port; --- 37 unchanged lines hidden (view full) --- 322 323 input_dev->name = port->name; 324 input_dev->phys = port->phys; 325 input_dev->id.bustype = BUS_GAMEPORT; 326 input_dev->id.vendor = GAMEPORT_ID_VENDOR_THRUSTMASTER; 327 input_dev->id.product = model->id; 328 input_dev->id.version = 0x0100; 329 input_dev->cdev.dev = &tmdc->gameport->dev; | 277 278 gameport_stop_polling(tmdc->gameport); 279} 280 281static int tmdc_setup_port(struct tmdc *tmdc, int idx, unsigned char *data) 282{ 283 const struct tmdc_model *model; 284 struct tmdc_port *port; --- 37 unchanged lines hidden (view full) --- 322 323 input_dev->name = port->name; 324 input_dev->phys = port->phys; 325 input_dev->id.bustype = BUS_GAMEPORT; 326 input_dev->id.vendor = GAMEPORT_ID_VENDOR_THRUSTMASTER; 327 input_dev->id.product = model->id; 328 input_dev->id.version = 0x0100; 329 input_dev->cdev.dev = &tmdc->gameport->dev; |
330 input_dev->private = tmdc; | |
331 | 330 |
331 input_set_drvdata(input_dev, tmdc); 332 |
|
332 input_dev->open = tmdc_open; 333 input_dev->close = tmdc_close; 334 335 input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); 336 337 for (i = 0; i < port->absc && i < TMDC_ABS; i++) 338 if (port->abs[i] >= 0) 339 input_set_abs_params(input_dev, port->abs[i], 8, 248, 2, 4); --- 113 unchanged lines hidden --- | 333 input_dev->open = tmdc_open; 334 input_dev->close = tmdc_close; 335 336 input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); 337 338 for (i = 0; i < port->absc && i < TMDC_ABS; i++) 339 if (port->abs[i] >= 0) 340 input_set_abs_params(input_dev, port->abs[i], 8, 248, 2, 4); --- 113 unchanged lines hidden --- |