Use input_get_drvdata() and input_set_drvdata() instead.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
static int a3d_open(struct input_dev *dev)
{
- struct a3d *a3d = dev->private;
+ struct a3d *a3d = input_get_drvdata(dev);
gameport_start_polling(a3d->gameport);
return 0;
static void a3d_close(struct input_dev *dev)
{
- struct a3d *a3d = dev->private;
+ struct a3d *a3d = input_get_drvdata(dev);
gameport_stop_polling(a3d->gameport);
}
input_dev->id.product = a3d->mode;
input_dev->id.version = 0x0100;
input_dev->cdev.dev = &gameport->dev;
- input_dev->private = a3d;
input_dev->open = a3d_open;
input_dev->close = a3d_close;
+ input_set_drvdata(input_dev, a3d);
+
if (a3d->mode == A3D_MODE_PXL) {
int axes[] = { ABS_X, ABS_Y, ABS_THROTTLE, ABS_RUDDER };
static int adi_open(struct input_dev *dev)
{
- struct adi_port *port = dev->private;
+ struct adi_port *port = input_get_drvdata(dev);
gameport_start_polling(port->gameport);
return 0;
static void adi_close(struct input_dev *dev)
{
- struct adi_port *port = dev->private;
+ struct adi_port *port = input_get_drvdata(dev);
gameport_stop_polling(port->gameport);
}
input_dev->id.product = adi->id;
input_dev->id.version = 0x0100;
input_dev->cdev.dev = &port->gameport->dev;
- input_dev->private = port;
+
+ input_set_drvdata(input_dev, port);
input_dev->open = adi_open;
input_dev->close = adi_close;
static int analog_open(struct input_dev *dev)
{
- struct analog_port *port = dev->private;
+ struct analog_port *port = input_get_drvdata(dev);
gameport_start_polling(port->gameport);
return 0;
static void analog_close(struct input_dev *dev)
{
- struct analog_port *port = dev->private;
+ struct analog_port *port = input_get_drvdata(dev);
gameport_stop_polling(port->gameport);
}
input_dev->id.product = analog->mask >> 4;
input_dev->id.version = 0x0100;
+ input_set_drvdata(input_dev, port);
+
input_dev->open = analog_open;
input_dev->close = analog_close;
- input_dev->private = port;
+
input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS);
for (i = j = 0; i < 4; i++)
static int cobra_open(struct input_dev *dev)
{
- struct cobra *cobra = dev->private;
+ struct cobra *cobra = input_get_drvdata(dev);
gameport_start_polling(cobra->gameport);
return 0;
static void cobra_close(struct input_dev *dev)
{
- struct cobra *cobra = dev->private;
+ struct cobra *cobra = input_get_drvdata(dev);
gameport_stop_polling(cobra->gameport);
}
input_dev->id.product = 0x0008;
input_dev->id.version = 0x0100;
input_dev->cdev.dev = &gameport->dev;
- input_dev->private = cobra;
+
+ input_set_drvdata(input_dev, cobra);
input_dev->open = cobra_open;
input_dev->close = cobra_close;
static int db9_open(struct input_dev *dev)
{
- struct db9 *db9 = dev->private;
+ struct db9 *db9 = input_get_drvdata(dev);
struct parport *port = db9->pd->port;
int err;
static void db9_close(struct input_dev *dev)
{
- struct db9 *db9 = dev->private;
+ struct db9 *db9 = input_get_drvdata(dev);
struct parport *port = db9->pd->port;
mutex_lock(&db9->mutex);
input_dev->id.vendor = 0x0002;
input_dev->id.product = mode;
input_dev->id.version = 0x0100;
- input_dev->private = db9;
+
+ input_set_drvdata(input_dev, db9);
input_dev->open = db9_open;
input_dev->close = db9_close;
static int gc_open(struct input_dev *dev)
{
- struct gc *gc = dev->private;
+ struct gc *gc = input_get_drvdata(dev);
int err;
err = mutex_lock_interruptible(&gc->mutex);
static void gc_close(struct input_dev *dev)
{
- struct gc *gc = dev->private;
+ struct gc *gc = input_get_drvdata(dev);
mutex_lock(&gc->mutex);
if (!--gc->used) {
input_dev->id.vendor = 0x0001;
input_dev->id.product = pad_type;
input_dev->id.version = 0x0100;
- input_dev->private = gc;
+
+ input_set_drvdata(input_dev, gc);
input_dev->open = gc_open;
input_dev->close = gc_close;
static int gf2k_open(struct input_dev *dev)
{
- struct gf2k *gf2k = dev->private;
+ struct gf2k *gf2k = input_get_drvdata(dev);
gameport_start_polling(gf2k->gameport);
return 0;
static void gf2k_close(struct input_dev *dev)
{
- struct gf2k *gf2k = dev->private;
+ struct gf2k *gf2k = input_get_drvdata(dev);
gameport_stop_polling(gf2k->gameport);
}
input_dev->id.product = gf2k->id;
input_dev->id.version = 0x0100;
input_dev->cdev.dev = &gameport->dev;
- input_dev->private = gf2k;
+
+ input_set_drvdata(input_dev, gf2k);
input_dev->open = gf2k_open;
input_dev->close = gf2k_close;
+
input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS);
for (i = 0; i < gf2k_axes[gf2k->id]; i++)
static int grip_open(struct input_dev *dev)
{
- struct grip *grip = dev->private;
+ struct grip *grip = input_get_drvdata(dev);
gameport_start_polling(grip->gameport);
return 0;
static void grip_close(struct input_dev *dev)
{
- struct grip *grip = dev->private;
+ struct grip *grip = input_get_drvdata(dev);
gameport_stop_polling(grip->gameport);
}
input_dev->id.product = grip->mode[i];
input_dev->id.version = 0x0100;
input_dev->cdev.dev = &gameport->dev;
- input_dev->private = grip;
+
+ input_set_drvdata(input_dev, grip);
input_dev->open = grip_open;
input_dev->close = grip_close;
static int grip_open(struct input_dev *dev)
{
- struct grip_mp *grip = dev->private;
+ struct grip_mp *grip = input_get_drvdata(dev);
gameport_start_polling(grip->gameport);
return 0;
static void grip_close(struct input_dev *dev)
{
- struct grip_mp *grip = dev->private;
+ struct grip_mp *grip = input_get_drvdata(dev);
- gameport_start_polling(grip->gameport);
+ gameport_stop_polling(grip->gameport);
}
/*
input_dev->id.product = 0x0100 + port->mode;
input_dev->id.version = 0x0100;
input_dev->cdev.dev = &grip->gameport->dev;
- input_dev->private = grip;
+
+ input_set_drvdata(input_dev, grip);
input_dev->open = grip_open;
input_dev->close = grip_close;
static int guillemot_open(struct input_dev *dev)
{
- struct guillemot *guillemot = dev->private;
+ struct guillemot *guillemot = input_get_drvdata(dev);
gameport_start_polling(guillemot->gameport);
return 0;
static void guillemot_close(struct input_dev *dev)
{
- struct guillemot *guillemot = dev->private;
+ struct guillemot *guillemot = input_get_drvdata(dev);
gameport_stop_polling(guillemot->gameport);
}
input_dev->id.product = guillemot_type[i].id;
input_dev->id.version = (int)data[14] << 8 | data[15];
input_dev->cdev.dev = &gameport->dev;
- input_dev->private = guillemot;
+
+ input_set_drvdata(input_dev, guillemot);
input_dev->open = guillemot_open;
input_dev->close = guillemot_close;
static int interact_open(struct input_dev *dev)
{
- struct interact *interact = dev->private;
+ struct interact *interact = input_get_drvdata(dev);
gameport_start_polling(interact->gameport);
return 0;
static void interact_close(struct input_dev *dev)
{
- struct interact *interact = dev->private;
+ struct interact *interact = input_get_drvdata(dev);
gameport_stop_polling(interact->gameport);
}
input_dev->id.vendor = GAMEPORT_ID_VENDOR_INTERACT;
input_dev->id.product = interact_type[i].id;
input_dev->id.version = 0x0100;
- input_dev->private = interact;
+
+ input_set_drvdata(input_dev, interact);
input_dev->open = interact_open;
input_dev->close = interact_close;
input_dev->id.product = 0x0001;
input_dev->id.version = 0x0100;
input_dev->cdev.dev = &serio->dev;
- input_dev->private = magellan;
input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS);
static int sw_open(struct input_dev *dev)
{
- struct sw *sw = dev->private;
+ struct sw *sw = input_get_drvdata(dev);
gameport_start_polling(sw->gameport);
return 0;
static void sw_close(struct input_dev *dev)
{
- struct sw *sw = dev->private;
+ struct sw *sw = input_get_drvdata(dev);
gameport_stop_polling(sw->gameport);
}
input_dev->id.product = sw->type;
input_dev->id.version = 0x0100;
input_dev->cdev.dev = &gameport->dev;
- input_dev->private = sw;
+
+ input_set_drvdata(input_dev, sw);
input_dev->open = sw_open;
input_dev->close = sw_close;
input_dev->id.product = id;
input_dev->id.version = 0x0100;
input_dev->cdev.dev = &serio->dev;
- input_dev->private = spaceball;
input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS);
input_dev->id.product = 0x0001;
input_dev->id.version = 0x0100;
input_dev->cdev.dev = &serio->dev;
- input_dev->private = spaceorb;
input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS);
input_dev->id.product = 0x0001;
input_dev->id.version = 0x0100;
input_dev->cdev.dev = &serio->dev;
- input_dev->private = stinger;
input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS);
input_dev->keybit[LONG(BTN_A)] = BIT(BTN_A) | BIT(BTN_B) | BIT(BTN_C) | BIT(BTN_X) |
static int tmdc_open(struct input_dev *dev)
{
- struct tmdc *tmdc = dev->private;
+ struct tmdc *tmdc = input_get_drvdata(dev);
gameport_start_polling(tmdc->gameport);
return 0;
static void tmdc_close(struct input_dev *dev)
{
- struct tmdc *tmdc = dev->private;
+ struct tmdc *tmdc = input_get_drvdata(dev);
gameport_stop_polling(tmdc->gameport);
}
input_dev->id.product = model->id;
input_dev->id.version = 0x0100;
input_dev->cdev.dev = &tmdc->gameport->dev;
- input_dev->private = tmdc;
+
+ input_set_drvdata(input_dev, tmdc);
input_dev->open = tmdc_open;
input_dev->close = tmdc_close;
static int tgfx_open(struct input_dev *dev)
{
- struct tgfx *tgfx = dev->private;
+ struct tgfx *tgfx = input_get_drvdata(dev);
int err;
err = mutex_lock_interruptible(&tgfx->sem);
static void tgfx_close(struct input_dev *dev)
{
- struct tgfx *tgfx = dev->private;
+ struct tgfx *tgfx = input_get_drvdata(dev);
mutex_lock(&tgfx->sem);
if (!--tgfx->used) {
input_dev->id.product = n_buttons[i];
input_dev->id.version = 0x0100;
- input_dev->private = tgfx;
+ input_set_drvdata(input_dev, tgfx);
+
input_dev->open = tgfx_open;
input_dev->close = tgfx_close;
input_dev->id.product = 0x0001;
input_dev->id.version = 0x0100;
input_dev->cdev.dev = &serio->dev;
- input_dev->private = twidjoy;
input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_ABS);
input_dev->absbit[0] = BIT(ABS_X) | BIT(ABS_Y);
input_dev->id.product = 0x0001;
input_dev->id.version = 0x0100;
input_dev->cdev.dev = &serio->dev;
- input_dev->private = warrior;
input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REL) | BIT(EV_ABS);
input_dev->keybit[LONG(BTN_TRIGGER)] = BIT(BTN_TRIGGER) | BIT(BTN_THUMB) | BIT(BTN_TOP) | BIT(BTN_TOP2);