sidewinder.c (0a1340c185734a57fbf4775927966ad4a1347b02) sidewinder.c (8715c1cfadf8cce24e79d254f95bd4a84c7741f0)
1/*
2 * Copyright (c) 1998-2005 Vojtech Pavlik
3 */
4
5/*
6 * Microsoft SideWinder joystick family driver for Linux
7 */
8

--- 495 unchanged lines hidden (view full) ---

504
505 sw->reads++;
506 if (sw_read(sw))
507 sw->bads++;
508}
509
510static int sw_open(struct input_dev *dev)
511{
1/*
2 * Copyright (c) 1998-2005 Vojtech Pavlik
3 */
4
5/*
6 * Microsoft SideWinder joystick family driver for Linux
7 */
8

--- 495 unchanged lines hidden (view full) ---

504
505 sw->reads++;
506 if (sw_read(sw))
507 sw->bads++;
508}
509
510static int sw_open(struct input_dev *dev)
511{
512 struct sw *sw = dev->private;
512 struct sw *sw = input_get_drvdata(dev);
513
514 gameport_start_polling(sw->gameport);
515 return 0;
516}
517
518static void sw_close(struct input_dev *dev)
519{
513
514 gameport_start_polling(sw->gameport);
515 return 0;
516}
517
518static void sw_close(struct input_dev *dev)
519{
520 struct sw *sw = dev->private;
520 struct sw *sw = input_get_drvdata(dev);
521
522 gameport_stop_polling(sw->gameport);
523}
524
525/*
526 * sw_print_packet() prints the contents of a SideWinder packet.
527 */
528

--- 218 unchanged lines hidden (view full) ---

747
748 input_dev->name = sw->name;
749 input_dev->phys = sw->phys[i];
750 input_dev->id.bustype = BUS_GAMEPORT;
751 input_dev->id.vendor = GAMEPORT_ID_VENDOR_MICROSOFT;
752 input_dev->id.product = sw->type;
753 input_dev->id.version = 0x0100;
754 input_dev->cdev.dev = &gameport->dev;
521
522 gameport_stop_polling(sw->gameport);
523}
524
525/*
526 * sw_print_packet() prints the contents of a SideWinder packet.
527 */
528

--- 218 unchanged lines hidden (view full) ---

747
748 input_dev->name = sw->name;
749 input_dev->phys = sw->phys[i];
750 input_dev->id.bustype = BUS_GAMEPORT;
751 input_dev->id.vendor = GAMEPORT_ID_VENDOR_MICROSOFT;
752 input_dev->id.product = sw->type;
753 input_dev->id.version = 0x0100;
754 input_dev->cdev.dev = &gameport->dev;
755 input_dev->private = sw;
756
755
756 input_set_drvdata(input_dev, sw);
757
757 input_dev->open = sw_open;
758 input_dev->close = sw_close;
759
760 input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS);
761
762 for (j = 0; (bits = sw_bit[sw->type][j]); j++) {
763 code = sw_abs[sw->type][j];
764 set_bit(code, input_dev->absbit);

--- 66 unchanged lines hidden ---
758 input_dev->open = sw_open;
759 input_dev->close = sw_close;
760
761 input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS);
762
763 for (j = 0; (bits = sw_bit[sw->type][j]); j++) {
764 code = sw_abs[sw->type][j];
765 set_bit(code, input_dev->absbit);

--- 66 unchanged lines hidden ---