Commit 7d30d1df authored by Vojtech Pavlik's avatar Vojtech Pavlik

This patch by Brad Hards replaces the four id* fields of the input

struct by a single struct to simplify passing it around and to
userspace.
parent 5ab506c8
...@@ -233,6 +233,7 @@ static int evdev_ioctl(struct inode *inode, struct file *file, unsigned int cmd, ...@@ -233,6 +233,7 @@ static int evdev_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
struct evdev_list *list = file->private_data; struct evdev_list *list = file->private_data;
struct evdev *evdev = list->evdev; struct evdev *evdev = list->evdev;
struct input_dev *dev = evdev->handle.dev; struct input_dev *dev = evdev->handle.dev;
struct input_devinfo id;
int retval, t, u; int retval, t, u;
if (!evdev->exist) return -ENODEV; if (!evdev->exist) return -ENODEV;
...@@ -243,11 +244,12 @@ static int evdev_ioctl(struct inode *inode, struct file *file, unsigned int cmd, ...@@ -243,11 +244,12 @@ static int evdev_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
return put_user(EV_VERSION, (int *) arg); return put_user(EV_VERSION, (int *) arg);
case EVIOCGID: case EVIOCGID:
if ((retval = put_user(dev->idbus, ((short *) arg) + 0))) return retval; id.bustype = dev->id.bustype;
if ((retval = put_user(dev->idvendor, ((short *) arg) + 1))) return retval; id.vendor = dev->id.vendor;
if ((retval = put_user(dev->idproduct, ((short *) arg) + 2))) return retval; id.product = dev->id.product;
if ((retval = put_user(dev->idversion, ((short *) arg) + 3))) return retval; id.version = dev->id.version;
return 0; return copy_to_user((void *) arg, &id, sizeof(struct input_devinfo));
case EVIOCGREP: case EVIOCGREP:
if ((retval = put_user(dev->rep[0], ((int *) arg) + 0))) return retval; if ((retval = put_user(dev->rep[0], ((int *) arg) + 0))) return retval;
......
...@@ -291,9 +291,9 @@ static int __devinit cs461x_pci_probe(struct pci_dev *pdev, const struct pci_dev ...@@ -291,9 +291,9 @@ static int __devinit cs461x_pci_probe(struct pci_dev *pdev, const struct pci_dev
port->name = name; port->name = name;
port->phys = phys; port->phys = phys;
port->idbus = BUS_PCI; port->id.bustype = BUS_PCI;
port->idvendor = pdev->vendor; port->id.vendor = pdev->vendor;
port->idproduct = pdev->device; port->id.product = pdev->device;
cs461x_pokeBA0(BA0_JSIO, 0xFF); // ? cs461x_pokeBA0(BA0_JSIO, 0xFF); // ?
cs461x_pokeBA0(BA0_JSCTL, JSCTL_SP_MEDIUM_SLOW); cs461x_pokeBA0(BA0_JSCTL, JSCTL_SP_MEDIUM_SLOW);
......
...@@ -87,9 +87,9 @@ static int __devinit emu_probe(struct pci_dev *pdev, const struct pci_device_id ...@@ -87,9 +87,9 @@ static int __devinit emu_probe(struct pci_dev *pdev, const struct pci_device_id
emu->gameport.io = ioport; emu->gameport.io = ioport;
emu->gameport.name = pdev->name; emu->gameport.name = pdev->name;
emu->gameport.phys = emu->phys; emu->gameport.phys = emu->phys;
emu->gameport.idbus = BUS_PCI; emu->gameport.id.bustype = BUS_PCI;
emu->gameport.idvendor = pdev->vendor; emu->gameport.id.vendor = pdev->vendor;
emu->gameport.idproduct = pdev->device; emu->gameport.id.product = pdev->device;
pci_set_drvdata(pdev, emu); pci_set_drvdata(pdev, emu);
......
...@@ -105,9 +105,9 @@ static int __devinit fm801_gp_probe(struct pci_dev *pci, const struct pci_device ...@@ -105,9 +105,9 @@ static int __devinit fm801_gp_probe(struct pci_dev *pci, const struct pci_device
gp->gameport.phys = gp->phys; gp->gameport.phys = gp->phys;
gp->gameport.name = gp->name; gp->gameport.name = gp->name;
gp->gameport.idbus = BUS_PCI; gp->gameport.id.bustype = BUS_PCI;
gp->gameport.idvendor = pci->vendor; gp->gameport.id.vendor = pci->vendor;
gp->gameport.idproduct = pci->device; gp->gameport.id.product = pci->device;
pci_set_drvdata(pci, gp); pci_set_drvdata(pci, gp);
......
...@@ -259,7 +259,7 @@ int __init l4_init(void) ...@@ -259,7 +259,7 @@ int __init l4_init(void)
gameport->name = l4_name; gameport->name = l4_name;
gameport->phys = l4->phys; gameport->phys = l4->phys;
gameport->idbus = BUS_ISA; gameport->id.bustype = BUS_ISA;
if (!i && !j) if (!i && !j)
gameport->io = L4_PORT; gameport->io = L4_PORT;
......
...@@ -144,7 +144,7 @@ static struct ns558* ns558_isa_probe(int io, struct ns558 *next) ...@@ -144,7 +144,7 @@ static struct ns558* ns558_isa_probe(int io, struct ns558 *next)
port->gameport.io = io & (-1 << i); port->gameport.io = io & (-1 << i);
port->gameport.phys = port->phys; port->gameport.phys = port->phys;
port->gameport.name = port->name; port->gameport.name = port->name;
port->gameport.idbus = BUS_ISA; port->gameport.id.bustype = BUS_ISA;
sprintf(port->phys, "isa%04x/gameport0", io & (-1 << i)); sprintf(port->phys, "isa%04x/gameport0", io & (-1 << i));
sprintf(port->name, "NS558 ISA"); sprintf(port->name, "NS558 ISA");
...@@ -232,10 +232,10 @@ static struct ns558* ns558_pnp_probe(struct pci_dev *dev, struct ns558 *next) ...@@ -232,10 +232,10 @@ static struct ns558* ns558_pnp_probe(struct pci_dev *dev, struct ns558 *next)
port->gameport.io = ioport; port->gameport.io = ioport;
port->gameport.phys = port->phys; port->gameport.phys = port->phys;
port->gameport.name = port->name; port->gameport.name = port->name;
port->gameport.idbus = BUS_ISAPNP; port->gameport.id.bustype = BUS_ISAPNP;
port->gameport.idvendor = dev->vendor; port->gameport.id.vendor = dev->vendor;
port->gameport.idproduct = dev->device; port->gameport.id.product = dev->device;
port->gameport.idversion = 0x100; port->gameport.id.version = 0x100;
sprintf(port->phys, "isapnp%d.%d/gameport0", PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn)); sprintf(port->phys, "isapnp%d.%d/gameport0", PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn));
sprintf(port->name, "%s", dev->name[0] ? dev->name : "NS558 PnP Gameport"); sprintf(port->name, "%s", dev->name[0] ? dev->name : "NS558 PnP Gameport");
......
...@@ -129,9 +129,9 @@ static int __devinit vortex_probe(struct pci_dev *dev, const struct pci_device_i ...@@ -129,9 +129,9 @@ static int __devinit vortex_probe(struct pci_dev *dev, const struct pci_device_i
vortex->gameport.name = dev->name; vortex->gameport.name = dev->name;
vortex->gameport.phys = vortex->phys; vortex->gameport.phys = vortex->phys;
vortex->gameport.idbus = BUS_PCI; vortex->gameport.id.bustype = BUS_PCI;
vortex->gameport.idvendor = dev->vendor; vortex->gameport.id.vendor = dev->vendor;
vortex->gameport.idproduct = dev->device; vortex->gameport.id.product = dev->device;
for (i = 0; i < 6; i++) for (i = 0; i < 6; i++)
if (~pci_resource_flags(dev, i) & IORESOURCE_IO) if (~pci_resource_flags(dev, i) & IORESOURCE_IO)
......
...@@ -290,19 +290,19 @@ static struct input_device_id *input_match_device(struct input_device_id *id, st ...@@ -290,19 +290,19 @@ static struct input_device_id *input_match_device(struct input_device_id *id, st
for (; id->flags || id->driver_info; id++) { for (; id->flags || id->driver_info; id++) {
if (id->flags & INPUT_DEVICE_ID_MATCH_BUS) if (id->flags & INPUT_DEVICE_ID_MATCH_BUS)
if (id->idbus != dev->idbus) if (id->id.bustype != dev->id.bustype)
continue; continue;
if (id->flags & INPUT_DEVICE_ID_MATCH_VENDOR) if (id->flags & INPUT_DEVICE_ID_MATCH_VENDOR)
if (id->idvendor != dev->idvendor) if (id->id.vendor != dev->id.vendor)
continue; continue;
if (id->flags & INPUT_DEVICE_ID_MATCH_PRODUCT) if (id->flags & INPUT_DEVICE_ID_MATCH_PRODUCT)
if (id->idproduct != dev->idproduct) if (id->id.product != dev->id.product)
continue; continue;
if (id->flags & INPUT_DEVICE_ID_MATCH_BUS) if (id->flags & INPUT_DEVICE_ID_MATCH_BUS)
if (id->idversion != dev->idversion) if (id->id.version != dev->id.version)
continue; continue;
MATCH_BIT(evbit, EV_MAX); MATCH_BIT(evbit, EV_MAX);
...@@ -395,7 +395,7 @@ static void input_call_hotplug(char *verb, struct input_dev *dev) ...@@ -395,7 +395,7 @@ static void input_call_hotplug(char *verb, struct input_dev *dev)
envp[i++] = scratch; envp[i++] = scratch;
scratch += sprintf(scratch, "PRODUCT=%x/%x/%x/%x", scratch += sprintf(scratch, "PRODUCT=%x/%x/%x/%x",
dev->idbus, dev->idvendor, dev->idproduct, dev->idversion) + 1; dev->id.bustype, dev->id.vendor, dev->id.product, dev->id.version) + 1;
if (dev->name) { if (dev->name) {
envp[i++] = scratch; envp[i++] = scratch;
...@@ -710,7 +710,7 @@ static int input_devices_read(char *buf, char **start, off_t pos, int count, int ...@@ -710,7 +710,7 @@ static int input_devices_read(char *buf, char **start, off_t pos, int count, int
while (dev) { while (dev) {
len = sprintf(buf, "I: Bus=%04x Vendor=%04x Product=%04x Version=%04x\n", len = sprintf(buf, "I: Bus=%04x Vendor=%04x Product=%04x Version=%04x\n",
dev->idbus, dev->idvendor, dev->idproduct, dev->idversion); dev->id.bustype, dev->id.vendor, dev->id.product, dev->id.version);
len += sprintf(buf + len, "N: Name=\"%s\"\n", dev->name ? dev->name : ""); len += sprintf(buf + len, "N: Name=\"%s\"\n", dev->name ? dev->name : "");
len += sprintf(buf + len, "P: Phys=%s\n", dev->phys ? dev->phys : ""); len += sprintf(buf + len, "P: Phys=%s\n", dev->phys ? dev->phys : "");
......
...@@ -336,10 +336,10 @@ static void a3d_connect(struct gameport *gameport, struct gameport_dev *dev) ...@@ -336,10 +336,10 @@ static void a3d_connect(struct gameport *gameport, struct gameport_dev *dev)
a3d->adc.name = a3d_names[a3d->mode]; a3d->adc.name = a3d_names[a3d->mode];
a3d->adc.phys = a3d->adcphys; a3d->adc.phys = a3d->adcphys;
a3d->adc.idbus = BUS_GAMEPORT; a3d->adc.id.bustype = BUS_GAMEPORT;
a3d->adc.idvendor = GAMEPORT_ID_VENDOR_MADCATZ; a3d->adc.id.vendor = GAMEPORT_ID_VENDOR_MADCATZ;
a3d->adc.idproduct = a3d->mode; a3d->adc.id.product = a3d->mode;
a3d->adc.idversion = 0x0100; a3d->adc.id.version = 0x0100;
a3d_read(a3d, data); a3d_read(a3d, data);
...@@ -353,10 +353,10 @@ static void a3d_connect(struct gameport *gameport, struct gameport_dev *dev) ...@@ -353,10 +353,10 @@ static void a3d_connect(struct gameport *gameport, struct gameport_dev *dev)
a3d->dev.name = a3d_names[a3d->mode]; a3d->dev.name = a3d_names[a3d->mode];
a3d->dev.phys = a3d->phys; a3d->dev.phys = a3d->phys;
a3d->dev.idbus = BUS_GAMEPORT; a3d->dev.id.bustype = BUS_GAMEPORT;
a3d->dev.idvendor = GAMEPORT_ID_VENDOR_MADCATZ; a3d->dev.id.vendor = GAMEPORT_ID_VENDOR_MADCATZ;
a3d->dev.idproduct = a3d->mode; a3d->dev.id.product = a3d->mode;
a3d->dev.idversion = 0x0100; a3d->dev.id.version = 0x0100;
input_register_device(&a3d->dev); input_register_device(&a3d->dev);
printk(KERN_INFO "input: %s on %s\n", a3d_names[a3d->mode], a3d->phys); printk(KERN_INFO "input: %s on %s\n", a3d_names[a3d->mode], a3d->phys);
......
...@@ -416,10 +416,10 @@ static void adi_init_input(struct adi *adi, struct adi_port *port, int half) ...@@ -416,10 +416,10 @@ static void adi_init_input(struct adi *adi, struct adi_port *port, int half)
adi->dev.name = adi->name; adi->dev.name = adi->name;
adi->dev.phys = adi->phys; adi->dev.phys = adi->phys;
adi->dev.idbus = BUS_GAMEPORT; adi->dev.id.bustype = BUS_GAMEPORT;
adi->dev.idvendor = GAMEPORT_ID_VENDOR_LOGITECH; adi->dev.id.vendor = GAMEPORT_ID_VENDOR_LOGITECH;
adi->dev.idproduct = adi->id; adi->dev.id.product = adi->id;
adi->dev.idversion = 0x0100; adi->dev.id.version = 0x0100;
adi->dev.private = port; adi->dev.private = port;
adi->dev.evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); adi->dev.evbit[0] = BIT(EV_KEY) | BIT(EV_ABS);
......
...@@ -134,10 +134,10 @@ static int __init amijoy_init(void) ...@@ -134,10 +134,10 @@ static int __init amijoy_init(void)
amijoy->dev[i].name = amijoy_name; amijoy->dev[i].name = amijoy_name;
amijoy->dev[i].phys = amijoy_phys[i]; amijoy->dev[i].phys = amijoy_phys[i];
amijoy->dev[i].idbus = BUS_AMIGA; amijoy->dev[i].id.bustype = BUS_AMIGA;
amijoy->dev[i].idvendor = 0x0001; amijoy->dev[i].id.vendor = 0x0001;
amijoy->dev[i].idproduct = 0x0003; amijoy->dev[i].id.product = 0x0003;
amijoy->dev[i].version = 0x0100; amijoy->dev[i].id.version = 0x0100;
amijoy_dev[i].private = amijoy_used + i; amijoy_dev[i].private = amijoy_used + i;
......
...@@ -436,10 +436,10 @@ static void analog_init_device(struct analog_port *port, struct analog *analog, ...@@ -436,10 +436,10 @@ static void analog_init_device(struct analog_port *port, struct analog *analog,
analog->dev.name = analog->name; analog->dev.name = analog->name;
analog->dev.phys = analog->phys; analog->dev.phys = analog->phys;
analog->dev.idbus = BUS_GAMEPORT; analog->dev.id.bustype = BUS_GAMEPORT;
analog->dev.idvendor = GAMEPORT_ID_VENDOR_ANALOG; analog->dev.id.vendor = GAMEPORT_ID_VENDOR_ANALOG;
analog->dev.idproduct = analog->mask >> 4; analog->dev.id.product = analog->mask >> 4;
analog->dev.idversion = 0x0100; analog->dev.id.version = 0x0100;
analog->dev.open = analog_open; analog->dev.open = analog_open;
analog->dev.close = analog_close; analog->dev.close = analog_close;
......
...@@ -199,10 +199,10 @@ static void cobra_connect(struct gameport *gameport, struct gameport_dev *dev) ...@@ -199,10 +199,10 @@ static void cobra_connect(struct gameport *gameport, struct gameport_dev *dev)
cobra->dev[i].name = cobra_name; cobra->dev[i].name = cobra_name;
cobra->dev[i].phys = cobra->phys[i]; cobra->dev[i].phys = cobra->phys[i];
cobra->dev[i].idbus = BUS_GAMEPORT; cobra->dev[i].id.bustype = BUS_GAMEPORT;
cobra->dev[i].idvendor = GAMEPORT_ID_VENDOR_CREATIVE; cobra->dev[i].id.vendor = GAMEPORT_ID_VENDOR_CREATIVE;
cobra->dev[i].idproduct = 0x0008; cobra->dev[i].id.product = 0x0008;
cobra->dev[i].idversion = 0x0100; cobra->dev[i].id.version = 0x0100;
cobra->dev[i].evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); cobra->dev[i].evbit[0] = BIT(EV_KEY) | BIT(EV_ABS);
cobra->dev[i].absbit[0] = BIT(ABS_X) | BIT(ABS_Y); cobra->dev[i].absbit[0] = BIT(ABS_X) | BIT(ABS_Y);
......
...@@ -351,10 +351,10 @@ static struct db9 __init *db9_probe(int *config) ...@@ -351,10 +351,10 @@ static struct db9 __init *db9_probe(int *config)
db9->dev[i].name = db9_name[db9->mode]; db9->dev[i].name = db9_name[db9->mode];
db9->dev[i].phys = db9->phys[i]; db9->dev[i].phys = db9->phys[i];
db9->dev[i].idbus = BUS_PARPORT; db9->dev[i].id.bustype = BUS_PARPORT;
db9->dev[i].idvendor = 0x0002; db9->dev[i].id.vendor = 0x0002;
db9->dev[i].idproduct = config[1]; db9->dev[i].id.product = config[1];
db9->dev[i].idversion = 0x0100; db9->dev[i].id.version = 0x0100;
db9->dev[i].evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); db9->dev[i].evbit[0] = BIT(EV_KEY) | BIT(EV_ABS);
db9->dev[i].absbit[0] = BIT(ABS_X) | BIT(ABS_Y); db9->dev[i].absbit[0] = BIT(ABS_X) | BIT(ABS_Y);
......
...@@ -593,10 +593,10 @@ static struct gc __init *gc_probe(int *config) ...@@ -593,10 +593,10 @@ static struct gc __init *gc_probe(int *config)
gc->dev[i].name = gc_names[config[i + 1]]; gc->dev[i].name = gc_names[config[i + 1]];
gc->dev[i].phys = gc->phys[i]; gc->dev[i].phys = gc->phys[i];
gc->dev[i].idbus = BUS_PARPORT; gc->dev[i].id.bustype = BUS_PARPORT;
gc->dev[i].idvendor = 0x0001; gc->dev[i].id.vendor = 0x0001;
gc->dev[i].idproduct = config[i + 1]; gc->dev[i].id.product = config[i + 1];
gc->dev[i].idversion = 0x0100; gc->dev[i].id.version = 0x0100;
} }
parport_release(gc->pd); parport_release(gc->pd);
......
...@@ -295,10 +295,10 @@ static void gf2k_connect(struct gameport *gameport, struct gameport_dev *dev) ...@@ -295,10 +295,10 @@ static void gf2k_connect(struct gameport *gameport, struct gameport_dev *dev)
gf2k->dev.name = gf2k_names[gf2k->id]; gf2k->dev.name = gf2k_names[gf2k->id];
gf2k->dev.phys = gf2k->phys; gf2k->dev.phys = gf2k->phys;
gf2k->dev.idbus = BUS_GAMEPORT; gf2k->dev.id.bustype = BUS_GAMEPORT;
gf2k->dev.idvendor = GAMEPORT_ID_VENDOR_GENIUS; gf2k->dev.id.vendor = GAMEPORT_ID_VENDOR_GENIUS;
gf2k->dev.idproduct = gf2k->id; gf2k->dev.id.product = gf2k->id;
gf2k->dev.idversion = 0x0100; gf2k->dev.id.version = 0x0100;
for (i = 0; i < gf2k_axes[gf2k->id]; i++) for (i = 0; i < gf2k_axes[gf2k->id]; i++)
set_bit(gf2k_abs[i], gf2k->dev.absbit); set_bit(gf2k_abs[i], gf2k->dev.absbit);
......
...@@ -350,10 +350,10 @@ static void grip_connect(struct gameport *gameport, struct gameport_dev *dev) ...@@ -350,10 +350,10 @@ static void grip_connect(struct gameport *gameport, struct gameport_dev *dev)
grip->dev[i].name = grip_name[grip->mode[i]]; grip->dev[i].name = grip_name[grip->mode[i]];
grip->dev[i].phys = grip->phys[i]; grip->dev[i].phys = grip->phys[i];
grip->dev[i].idbus = BUS_GAMEPORT; grip->dev[i].id.bustype = BUS_GAMEPORT;
grip->dev[i].idvendor = GAMEPORT_ID_VENDOR_GRAVIS; grip->dev[i].id.vendor = GAMEPORT_ID_VENDOR_GRAVIS;
grip->dev[i].idproduct = grip->mode[i]; grip->dev[i].id.product = grip->mode[i];
grip->dev[i].idversion = 0x0100; grip->dev[i].id.version = 0x0100;
grip->dev[i].evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); grip->dev[i].evbit[0] = BIT(EV_KEY) | BIT(EV_ABS);
......
...@@ -222,10 +222,10 @@ static void guillemot_connect(struct gameport *gameport, struct gameport_dev *de ...@@ -222,10 +222,10 @@ static void guillemot_connect(struct gameport *gameport, struct gameport_dev *de
guillemot->dev.name = guillemot_type[i].name; guillemot->dev.name = guillemot_type[i].name;
guillemot->dev.phys = guillemot->phys; guillemot->dev.phys = guillemot->phys;
guillemot->dev.idbus = BUS_GAMEPORT; guillemot->dev.id.bustype = BUS_GAMEPORT;
guillemot->dev.idvendor = GAMEPORT_ID_VENDOR_GUILLEMOT; guillemot->dev.id.vendor = GAMEPORT_ID_VENDOR_GUILLEMOT;
guillemot->dev.idproduct = guillemot_type[i].id; guillemot->dev.id.product = guillemot_type[i].id;
guillemot->dev.idversion = (int)data[14] << 8 | data[15]; guillemot->dev.id.version = (int)data[14] << 8 | data[15];
guillemot->dev.evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); guillemot->dev.evbit[0] = BIT(EV_KEY) | BIT(EV_ABS);
......
...@@ -352,7 +352,7 @@ int iforce_init_device(struct iforce *iforce) ...@@ -352,7 +352,7 @@ int iforce_init_device(struct iforce *iforce)
* Input device fields. * Input device fields.
*/ */
iforce->dev.idbus = BUS_USB; iforce->dev.id.bustype = BUS_USB;
iforce->dev.private = iforce; iforce->dev.private = iforce;
iforce->dev.name = "Unknown I-Force device"; iforce->dev.name = "Unknown I-Force device";
iforce->dev.open = iforce_open; iforce->dev.open = iforce_open;
...@@ -392,12 +392,12 @@ int iforce_init_device(struct iforce *iforce) ...@@ -392,12 +392,12 @@ int iforce_init_device(struct iforce *iforce)
*/ */
if (!iforce_get_id_packet(iforce, "M")) if (!iforce_get_id_packet(iforce, "M"))
iforce->dev.idvendor = (iforce->edata[2] << 8) | iforce->edata[1]; iforce->dev.id.vendor = (iforce->edata[2] << 8) | iforce->edata[1];
else else
printk(KERN_WARNING "iforce-main.c: Device does not respond to id packet M\n"); printk(KERN_WARNING "iforce-main.c: Device does not respond to id packet M\n");
if (!iforce_get_id_packet(iforce, "P")) if (!iforce_get_id_packet(iforce, "P"))
iforce->dev.idproduct = (iforce->edata[2] << 8) | iforce->edata[1]; iforce->dev.id.product = (iforce->edata[2] << 8) | iforce->edata[1];
else else
printk(KERN_WARNING "iforce-main.c: Device does not respond to id packet P\n"); printk(KERN_WARNING "iforce-main.c: Device does not respond to id packet P\n");
...@@ -438,8 +438,8 @@ int iforce_init_device(struct iforce *iforce) ...@@ -438,8 +438,8 @@ int iforce_init_device(struct iforce *iforce)
*/ */
for (i = 0; iforce_device[i].idvendor; i++) for (i = 0; iforce_device[i].idvendor; i++)
if (iforce_device[i].idvendor == iforce->dev.idvendor && if (iforce_device[i].idvendor == iforce->dev.id.vendor &&
iforce_device[i].idproduct == iforce->dev.idproduct) iforce_device[i].idproduct == iforce->dev.id.product)
break; break;
iforce->type = iforce_device + i; iforce->type = iforce_device + i;
......
...@@ -254,10 +254,10 @@ static void interact_connect(struct gameport *gameport, struct gameport_dev *dev ...@@ -254,10 +254,10 @@ static void interact_connect(struct gameport *gameport, struct gameport_dev *dev
interact->dev.name = interact_type[i].name; interact->dev.name = interact_type[i].name;
interact->dev.phys = interact->phys; interact->dev.phys = interact->phys;
interact->dev.idbus = BUS_GAMEPORT; interact->dev.id.bustype = BUS_GAMEPORT;
interact->dev.idvendor = GAMEPORT_ID_VENDOR_INTERACT; interact->dev.id.vendor = GAMEPORT_ID_VENDOR_INTERACT;
interact->dev.idproduct = interact_type[i].id; interact->dev.id.product = interact_type[i].id;
interact->dev.idversion = 0x0100; interact->dev.id.version = 0x0100;
interact->dev.evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); interact->dev.evbit[0] = BIT(EV_KEY) | BIT(EV_ABS);
......
...@@ -170,10 +170,10 @@ static void magellan_connect(struct serio *serio, struct serio_dev *dev) ...@@ -170,10 +170,10 @@ static void magellan_connect(struct serio *serio, struct serio_dev *dev)
magellan->dev.private = magellan; magellan->dev.private = magellan;
magellan->dev.name = magellan_name; magellan->dev.name = magellan_name;
magellan->dev.phys = magellan->phys; magellan->dev.phys = magellan->phys;
magellan->dev.idbus = BUS_RS232; magellan->dev.id.bustype = BUS_RS232;
magellan->dev.idvendor = SERIO_MAGELLAN; magellan->dev.id.vendor = SERIO_MAGELLAN;
magellan->dev.idproduct = 0x0001; magellan->dev.id.product = 0x0001;
magellan->dev.idversion = 0x0100; magellan->dev.id.version = 0x0100;
serio->private = magellan; serio->private = magellan;
......
...@@ -701,10 +701,10 @@ static void sw_connect(struct gameport *gameport, struct gameport_dev *dev) ...@@ -701,10 +701,10 @@ static void sw_connect(struct gameport *gameport, struct gameport_dev *dev)
sw->dev[i].name = sw->name; sw->dev[i].name = sw->name;
sw->dev[i].phys = sw->phys[i]; sw->dev[i].phys = sw->phys[i];
sw->dev[i].idbus = BUS_GAMEPORT; sw->dev[i].id.bustype = BUS_GAMEPORT;
sw->dev[i].idvendor = GAMEPORT_ID_VENDOR_MICROSOFT; sw->dev[i].id.vendor = GAMEPORT_ID_VENDOR_MICROSOFT;
sw->dev[i].idproduct = sw->type; sw->dev[i].id.product = sw->type;
sw->dev[i].idversion = 0x0100; sw->dev[i].id.version = 0x0100;
sw->dev[i].evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); sw->dev[i].evbit[0] = BIT(EV_KEY) | BIT(EV_ABS);
......
...@@ -240,10 +240,10 @@ static void spaceball_connect(struct serio *serio, struct serio_dev *dev) ...@@ -240,10 +240,10 @@ static void spaceball_connect(struct serio *serio, struct serio_dev *dev)
spaceball->dev.name = spaceball_names[id]; spaceball->dev.name = spaceball_names[id];
spaceball->dev.phys = spaceball->phys; spaceball->dev.phys = spaceball->phys;
spaceball->dev.idbus = BUS_RS232; spaceball->dev.id.bustype = BUS_RS232;
spaceball->dev.idvendor = SERIO_SPACEBALL; spaceball->dev.id.vendor = SERIO_SPACEBALL;
spaceball->dev.idproduct = id; spaceball->dev.id.product = id;
spaceball->dev.idversion = 0x0100; spaceball->dev.id.version = 0x0100;
serio->private = spaceball; serio->private = spaceball;
......
...@@ -187,10 +187,10 @@ static void spaceorb_connect(struct serio *serio, struct serio_dev *dev) ...@@ -187,10 +187,10 @@ static void spaceorb_connect(struct serio *serio, struct serio_dev *dev)
spaceorb->dev.name = spaceorb_name; spaceorb->dev.name = spaceorb_name;
spaceorb->dev.phys = spaceorb->phys; spaceorb->dev.phys = spaceorb->phys;
spaceorb->dev.idbus = BUS_RS232; spaceorb->dev.id.bustype = BUS_RS232;
spaceorb->dev.idvendor = SERIO_SPACEORB; spaceorb->dev.id.vendor = SERIO_SPACEORB;
spaceorb->dev.idproduct = 0x0001; spaceorb->dev.id.product = 0x0001;
spaceorb->dev.idversion = 0x0100; spaceorb->dev.id.version = 0x0100;
serio->private = spaceorb; serio->private = spaceorb;
......
...@@ -152,10 +152,10 @@ static void stinger_connect(struct serio *serio, struct serio_dev *dev) ...@@ -152,10 +152,10 @@ static void stinger_connect(struct serio *serio, struct serio_dev *dev)
stinger->dev.name = stinger_name; stinger->dev.name = stinger_name;
stinger->dev.phys = stinger->phys; stinger->dev.phys = stinger->phys;
stinger->dev.idbus = BUS_RS232; stinger->dev.id.bustype = BUS_RS232;
stinger->dev.idvendor = SERIO_STINGER; stinger->dev.id.vendor = SERIO_STINGER;
stinger->dev.idproduct = 0x0001; stinger->dev.id.product = 0x0001;
stinger->dev.idversion = 0x0100; stinger->dev.id.version = 0x0100;
for (i = 0; i < 2; i++) { for (i = 0; i < 2; i++) {
stinger->dev.absmax[ABS_X+i] = 64; stinger->dev.absmax[ABS_X+i] = 64;
......
...@@ -312,10 +312,10 @@ static void tmdc_connect(struct gameport *gameport, struct gameport_dev *dev) ...@@ -312,10 +312,10 @@ static void tmdc_connect(struct gameport *gameport, struct gameport_dev *dev)
tmdc->dev[j].name = tmdc->name[j]; tmdc->dev[j].name = tmdc->name[j];
tmdc->dev[j].phys = tmdc->phys[j]; tmdc->dev[j].phys = tmdc->phys[j];
tmdc->dev[j].idbus = BUS_GAMEPORT; tmdc->dev[j].id.bustype = BUS_GAMEPORT;
tmdc->dev[j].idvendor = GAMEPORT_ID_VENDOR_THRUSTMASTER; tmdc->dev[j].id.vendor = GAMEPORT_ID_VENDOR_THRUSTMASTER;
tmdc->dev[j].idproduct = models[m].id; tmdc->dev[j].id.product = models[m].id;
tmdc->dev[j].idversion = 0x0100; tmdc->dev[j].id.version = 0x0100;
tmdc->dev[j].evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); tmdc->dev[j].evbit[0] = BIT(EV_KEY) | BIT(EV_ABS);
......
...@@ -179,10 +179,10 @@ static struct tgfx __init *tgfx_probe(int *config) ...@@ -179,10 +179,10 @@ static struct tgfx __init *tgfx_probe(int *config)
tgfx->dev[i].name = tgfx_name; tgfx->dev[i].name = tgfx_name;
tgfx->dev[i].phys = tgfx->phys[i]; tgfx->dev[i].phys = tgfx->phys[i];
tgfx->dev[i].idbus = BUS_PARPORT; tgfx->dev[i].id.bustype = BUS_PARPORT;
tgfx->dev[i].idvendor = 0x0003; tgfx->dev[i].id.vendor = 0x0003;
tgfx->dev[i].idproduct = config[i+1]; tgfx->dev[i].id.product = config[i+1];
tgfx->dev[i].idversion = 0x0100; tgfx->dev[i].id.version = 0x0100;
tgfx->dev[i].evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); tgfx->dev[i].evbit[0] = BIT(EV_KEY) | BIT(EV_ABS);
tgfx->dev[i].absbit[0] = BIT(ABS_X) | BIT(ABS_Y); tgfx->dev[i].absbit[0] = BIT(ABS_X) | BIT(ABS_Y);
......
...@@ -198,10 +198,10 @@ static void twidjoy_connect(struct serio *serio, struct serio_dev *dev) ...@@ -198,10 +198,10 @@ static void twidjoy_connect(struct serio *serio, struct serio_dev *dev)
twidjoy->dev.name = twidjoy_name; twidjoy->dev.name = twidjoy_name;
twidjoy->dev.phys = twidjoy->phys; twidjoy->dev.phys = twidjoy->phys;
twidjoy->dev.idbus = BUS_RS232; twidjoy->dev.id.bustype = BUS_RS232;
twidjoy->dev.idvendor = SERIO_TWIDJOY; twidjoy->dev.id.vendor = SERIO_TWIDJOY;
twidjoy->dev.idproduct = 0x0001; twidjoy->dev.id.product = 0x0001;
twidjoy->dev.idversion = 0x0100; twidjoy->dev.id.version = 0x0100;
twidjoy->dev.evbit[0] = BIT(EV_KEY) | BIT(EV_ABS); twidjoy->dev.evbit[0] = BIT(EV_KEY) | BIT(EV_ABS);
......
...@@ -156,10 +156,10 @@ static void warrior_connect(struct serio *serio, struct serio_dev *dev) ...@@ -156,10 +156,10 @@ static void warrior_connect(struct serio *serio, struct serio_dev *dev)
warrior->dev.name = warrior_name; warrior->dev.name = warrior_name;
warrior->dev.phys = warrior->phys; warrior->dev.phys = warrior->phys;
warrior->dev.idbus = BUS_RS232; warrior->dev.id.bustype = BUS_RS232;
warrior->dev.idvendor = SERIO_WARRIOR; warrior->dev.id.vendor = SERIO_WARRIOR;
warrior->dev.idproduct = 0x0001; warrior->dev.id.product = 0x0001;
warrior->dev.idversion = 0x0100; warrior->dev.id.version = 0x0100;
for (i = 0; i < 2; i++) { for (i = 0; i < 2; i++) {
warrior->dev.absmax[ABS_X+i] = -64; warrior->dev.absmax[ABS_X+i] = -64;
......
...@@ -121,10 +121,10 @@ static int __init amikbd_init(void) ...@@ -121,10 +121,10 @@ static int __init amikbd_init(void)
amikbd_dev.name = amikbd_name; amikbd_dev.name = amikbd_name;
amikbd_dev.phys = amikbd_phys; amikbd_dev.phys = amikbd_phys;
amikbd_dev.idbus = BUS_AMIGA; amikbd_dev.id.bustype = BUS_AMIGA;
amikbd_dev.idvendor = 0x0001; amikbd_dev.id.vendor = 0x0001;
amikbd_dev.idproduct = 0x0001; amikbd_dev.id.product = 0x0001;
amikbd_dev.idversion = 0x0100; amikbd_dev.id.version = 0x0100;
input_register_device(&amikbd_dev); input_register_device(&amikbd_dev);
......
...@@ -496,10 +496,10 @@ static void atkbd_connect(struct serio *serio, struct serio_dev *dev) ...@@ -496,10 +496,10 @@ static void atkbd_connect(struct serio *serio, struct serio_dev *dev)
atkbd->dev.name = atkbd->name; atkbd->dev.name = atkbd->name;
atkbd->dev.phys = atkbd->phys; atkbd->dev.phys = atkbd->phys;
atkbd->dev.idbus = BUS_I8042; atkbd->dev.id.bustype = BUS_I8042;
atkbd->dev.idvendor = 0x0001; atkbd->dev.id.vendor = 0x0001;
atkbd->dev.idproduct = atkbd->set; atkbd->dev.id.product = atkbd->set;
atkbd->dev.idversion = atkbd->id; atkbd->dev.id.version = atkbd->id;
for (i = 0; i < 512; i++) for (i = 0; i < 512; i++)
if (atkbd->keycode[i] && atkbd->keycode[i] <= 250) if (atkbd->keycode[i] && atkbd->keycode[i] <= 250)
......
...@@ -132,7 +132,7 @@ static int dc_kbd_connect(struct maple_device *dev) ...@@ -132,7 +132,7 @@ static int dc_kbd_connect(struct maple_device *dev)
kbd->dev.event = NULL; kbd->dev.event = NULL;
kbd->dev.name = dev->product_name; kbd->dev.name = dev->product_name;
kbd->dev.idbus = BUS_MAPLE; kbd->dev.id.bustype = BUS_MAPLE;
input_register_device(&kbd->dev); input_register_device(&kbd->dev);
......
...@@ -110,10 +110,10 @@ void nkbd_connect(struct serio *serio, struct serio_dev *dev) ...@@ -110,10 +110,10 @@ void nkbd_connect(struct serio *serio, struct serio_dev *dev)
nkbd->dev.name = nkbd_name; nkbd->dev.name = nkbd_name;
nkbd->dev.phys = nkbd->phys; nkbd->dev.phys = nkbd->phys;
nkbd->dev.idbus = BUS_RS232; nkbd->dev.id.bustype = BUS_RS232;
nkbd->dev.idvendor = SERIO_NEWTON; nkbd->dev.id.vendor = SERIO_NEWTON;
nkbd->dev.idproduct = 0x0001; nkbd->dev.id.product = 0x0001;
nkbd->dev.idversion = 0x0100; nkbd->dev.id.version = 0x0100;
input_register_device(&nkbd->dev); input_register_device(&nkbd->dev);
......
...@@ -246,10 +246,10 @@ static void ps2serkbd_connect(struct serio *serio, struct serio_dev *dev) ...@@ -246,10 +246,10 @@ static void ps2serkbd_connect(struct serio *serio, struct serio_dev *dev)
ps2serkbd->dev.name = ps2serkbd->name; ps2serkbd->dev.name = ps2serkbd->name;
ps2serkbd->dev.phys = ps2serkbd->phys; ps2serkbd->dev.phys = ps2serkbd->phys;
ps2serkbd->dev.idbus = BUS_RS232; ps2serkbd->dev.id.bustype = BUS_RS232;
ps2serkbd->dev.idvendor = SERIO_PS2SER; ps2serkbd->dev.id.vendor = SERIO_PS2SER;
ps2serkbd->dev.idproduct = ps2serkbd->set; ps2serkbd->dev.id.product = ps2serkbd->set;
ps2serkbd->dev.idversion = ps2serkbd->id; ps2serkbd->dev.id.version = ps2serkbd->id;
for (i = 0; i < 512; i++) for (i = 0; i < 512; i++)
if (ps2serkbd->keycode[i] && ps2serkbd->keycode[i] <= 250) if (ps2serkbd->keycode[i] && ps2serkbd->keycode[i] <= 250)
......
...@@ -271,10 +271,10 @@ static void sunkbd_connect(struct serio *serio, struct serio_dev *dev) ...@@ -271,10 +271,10 @@ static void sunkbd_connect(struct serio *serio, struct serio_dev *dev)
sunkbd->dev.name = sunkbd->name; sunkbd->dev.name = sunkbd->name;
sunkbd->dev.phys = sunkbd->phys; sunkbd->dev.phys = sunkbd->phys;
sunkbd->dev.idbus = BUS_RS232; sunkbd->dev.id.bustype = BUS_RS232;
sunkbd->dev.idvendor = SERIO_SUNKBD; sunkbd->dev.id.vendor = SERIO_SUNKBD;
sunkbd->dev.idproduct = sunkbd->type; sunkbd->dev.id.product = sunkbd->type;
sunkbd->dev.idversion = 0x0100; sunkbd->dev.id.version = 0x0100;
input_register_device(&sunkbd->dev); input_register_device(&sunkbd->dev);
......
...@@ -118,10 +118,10 @@ void xtkbd_connect(struct serio *serio, struct serio_dev *dev) ...@@ -118,10 +118,10 @@ void xtkbd_connect(struct serio *serio, struct serio_dev *dev)
xtkbd->dev.name = xtkbd_name; xtkbd->dev.name = xtkbd_name;
xtkbd->dev.phys = xtkbd->phys; xtkbd->dev.phys = xtkbd->phys;
xtkbd->dev.idbus = BUS_XTKBD; xtkbd->dev.id.bustype = BUS_XTKBD;
xtkbd->dev.idvendor = 0x0001; xtkbd->dev.id.vendor = 0x0001;
xtkbd->dev.idproduct = 0x0001; xtkbd->dev.id.product = 0x0001;
xtkbd->dev.idversion = 0x0100; xtkbd->dev.id.version = 0x0100;
input_register_device(&xtkbd->dev); input_register_device(&xtkbd->dev);
......
...@@ -110,10 +110,10 @@ static int __init amimouse_init(void) ...@@ -110,10 +110,10 @@ static int __init amimouse_init(void)
amimouse_dev.name = amimouse_name; amimouse_dev.name = amimouse_name;
amimouse_dev.phys = amimouse_phys; amimouse_dev.phys = amimouse_phys;
amimouse_dev.idbus = BUS_AMIGA; amimouse_dev.id.bustype = BUS_AMIGA;
amimouse_dev.idvendor = 0x0001; amimouse_dev.id.vendor = 0x0001;
amimouse_dev.idproduct = 0x0002; amimouse_dev.id.product = 0x0002;
amimouse_dev.idversion = 0x0100; amimouse_dev.id.version = 0x0100;
input_register_device(&amimouse_dev); input_register_device(&amimouse_dev);
......
...@@ -115,10 +115,6 @@ static struct input_dev inport_dev = { ...@@ -115,10 +115,6 @@ static struct input_dev inport_dev = {
close: inport_close, close: inport_close,
name: INPORT_NAME, name: INPORT_NAME,
phys: "isa023c/input0", phys: "isa023c/input0",
idbus: BUS_ISA,
idvendor: INPORT_VENDOR,
idproduct: 0x0001,
idversion: 0x0100,
}; };
static void inport_interrupt(int irq, void *dev_id, struct pt_regs *regs) static void inport_interrupt(int irq, void *dev_id, struct pt_regs *regs)
...@@ -176,6 +172,11 @@ static int __init inport_init(void) ...@@ -176,6 +172,11 @@ static int __init inport_init(void)
request_region(INPORT_BASE, INPORT_EXTENT, "inport"); request_region(INPORT_BASE, INPORT_EXTENT, "inport");
input_register_device(&inport_dev); input_register_device(&inport_dev);
inport_dev.id.bustype =BUS_ISA;
inport_dev.id.vendor =INPORT_VENDOR;
inport_dev.id.product =0x0001;
inport_dev.id.version =0x0100;
printk(KERN_INFO "input: " INPORT_NAME " at %#x irq %d\n", printk(KERN_INFO "input: " INPORT_NAME " at %#x irq %d\n",
INPORT_BASE, inport_irq); INPORT_BASE, inport_irq);
......
...@@ -105,10 +105,6 @@ static struct input_dev logibm_dev = { ...@@ -105,10 +105,6 @@ static struct input_dev logibm_dev = {
close: logibm_close, close: logibm_close,
name: "Logitech bus mouse", name: "Logitech bus mouse",
phys: "isa023c/input0", phys: "isa023c/input0",
idbus: BUS_ISA,
idvendor: 0x0003,
idproduct: 0x0001,
idversion: 0x0100,
}; };
static void logibm_interrupt(int irq, void *dev_id, struct pt_regs *regs) static void logibm_interrupt(int irq, void *dev_id, struct pt_regs *regs)
...@@ -166,6 +162,10 @@ static int __init logibm_init(void) ...@@ -166,6 +162,10 @@ static int __init logibm_init(void)
outb(LOGIBM_DISABLE_IRQ, LOGIBM_CONTROL_PORT); outb(LOGIBM_DISABLE_IRQ, LOGIBM_CONTROL_PORT);
input_register_device(&logibm_dev); input_register_device(&logibm_dev);
logibm_dev.id.bustype = BUS_ISA;
logibm_dev.id.vendor = 0x0003;
logibm_dev.id.product = 0x0001;
logibm_dev.id.version = 0x0100;
printk(KERN_INFO "input: Logitech bus mouse at %#x irq %d\n", LOGIBM_BASE, logibm_irq); printk(KERN_INFO "input: Logitech bus mouse at %#x irq %d\n", LOGIBM_BASE, logibm_irq);
......
...@@ -95,14 +95,14 @@ static int pc110pad_open(struct input_dev *dev) ...@@ -95,14 +95,14 @@ static int pc110pad_open(struct input_dev *dev)
if (pc110pad_used++) if (pc110pad_used++)
return 0; return 0;
save_flags(flags); __save_flags(flags);
cli(); __cli();
pc110pad_interrupt(0,0,0); pc110pad_interrupt(0,0,0);
pc110pad_interrupt(0,0,0); pc110pad_interrupt(0,0,0);
pc110pad_interrupt(0,0,0); pc110pad_interrupt(0,0,0);
outb(PC110PAD_ON, pc110pad_io + 2); outb(PC110PAD_ON, pc110pad_io + 2);
pc110pad_count = 0; pc110pad_count = 0;
restore_flags(flags); __restore_flags(flags);
return 0; return 0;
} }
...@@ -136,10 +136,10 @@ static int __init pc110pad_init(void) ...@@ -136,10 +136,10 @@ static int __init pc110pad_init(void)
pc110pad_dev.name = pc110pad_name; pc110pad_dev.name = pc110pad_name;
pc110pad_dev.phys = pc110pad_phys; pc110pad_dev.phys = pc110pad_phys;
pc110pad_dev.idbus = BUS_ISA; pc110pad_dev.id.bustype = BUS_ISA;
pc110pad_dev.idvendor = 0x0003; pc110pad_dev.id.vendor = 0x0003;
pc110pad_dev.idproduct = 0x0001; pc110pad_dev.id.product = 0x0001;
pc110pad_dev.idversion = 0x0100; pc110pad_dev.id.version = 0x0100;
input_register_device(&pc110pad_dev); input_register_device(&pc110pad_dev);
......
...@@ -600,10 +600,10 @@ static void psmouse_connect(struct serio *serio, struct serio_dev *dev) ...@@ -600,10 +600,10 @@ static void psmouse_connect(struct serio *serio, struct serio_dev *dev)
psmouse->dev.name = psmouse->devname; psmouse->dev.name = psmouse->devname;
psmouse->dev.phys = psmouse->phys; psmouse->dev.phys = psmouse->phys;
psmouse->dev.idbus = BUS_I8042; psmouse->dev.id.bustype = BUS_I8042;
psmouse->dev.idvendor = psmouse->type; psmouse->dev.id.vendor = psmouse->type;
psmouse->dev.idproduct = 0x0002; psmouse->dev.id.product = 0x0002;
psmouse->dev.idversion = 0x0100; psmouse->dev.id.version = 0x0100;
input_register_device(&psmouse->dev); input_register_device(&psmouse->dev);
......
...@@ -40,10 +40,6 @@ static struct input_dev rpcmouse_dev = { ...@@ -40,10 +40,6 @@ static struct input_dev rpcmouse_dev = {
relbit: { BIT(REL_X) | BIT(REL_Y) }, relbit: { BIT(REL_X) | BIT(REL_Y) },
name: "Acorn RiscPC Mouse", name: "Acorn RiscPC Mouse",
phys: "rpcmouse/input0", phys: "rpcmouse/input0",
idbus: BUS_HOST,
idvendor: 0x0005,
idproduct: 0x0001,
idversion: 0x0100,
}; };
static void rpcmouse_irq(int irq, void *dev_id, struct pt_regs *regs) static void rpcmouse_irq(int irq, void *dev_id, struct pt_regs *regs)
...@@ -79,6 +75,11 @@ static int __init rpcmouse_init(void) ...@@ -79,6 +75,11 @@ static int __init rpcmouse_init(void)
} }
input_register_device(&rpcmouse_dev); input_register_device(&rpcmouse_dev);
rpcmouse.id.bustype =BUS_HOST,
rpcmouse.id.vendor =0x0005,
rpcmouse.id.product =0x0001,
rpcmouse.id.version =0x0100,
printk(KERN_INFO "input: Acorn RiscPC mouse irq %d", IRQ_VSYNCPULSE); printk(KERN_INFO "input: Acorn RiscPC mouse irq %d", IRQ_VSYNCPULSE);
return 0; return 0;
......
...@@ -263,10 +263,10 @@ static void sermouse_connect(struct serio *serio, struct serio_dev *dev) ...@@ -263,10 +263,10 @@ static void sermouse_connect(struct serio *serio, struct serio_dev *dev)
sermouse->dev.name = sermouse_protocols[sermouse->type]; sermouse->dev.name = sermouse_protocols[sermouse->type];
sermouse->dev.phys = sermouse->phys; sermouse->dev.phys = sermouse->phys;
sermouse->dev.idbus = BUS_RS232; sermouse->dev.id.bustype = BUS_RS232;
sermouse->dev.idvendor = sermouse->type; sermouse->dev.id.vendor = sermouse->type;
sermouse->dev.idproduct = c; sermouse->dev.id.product = c;
sermouse->dev.idversion = 0x0100; sermouse->dev.id.version = 0x0100;
if (serio_open(serio, dev)) { if (serio_open(serio, dev)) {
kfree(sermouse); kfree(sermouse);
......
...@@ -134,10 +134,10 @@ static void gunze_connect(struct serio *serio, struct serio_dev *dev) ...@@ -134,10 +134,10 @@ static void gunze_connect(struct serio *serio, struct serio_dev *dev)
gunze->dev.private = gunze; gunze->dev.private = gunze;
gunze->dev.name = gunze_name; gunze->dev.name = gunze_name;
gunze->dev.phys = gunze->phys; gunze->dev.phys = gunze->phys;
gunze->dev.idbus = BUS_RS232; gunze->dev.id.bustype = BUS_RS232;
gunze->dev.idvendor = SERIO_GUNZE; gunze->dev.id.vendor = SERIO_GUNZE;
gunze->dev.idproduct = 0x0051; gunze->dev.id.product = 0x0051;
gunze->dev.idversion = 0x0100; gunze->dev.id.version = 0x0100;
if (serio_open(serio, dev)) { if (serio_open(serio, dev)) {
kfree(gunze); kfree(gunze);
......
...@@ -418,10 +418,10 @@ static void h3600ts_connect(struct serio *serio, struct serio_dev *dev) ...@@ -418,10 +418,10 @@ static void h3600ts_connect(struct serio *serio, struct serio_dev *dev)
ts->dev.private = ts; ts->dev.private = ts;
ts->dev.name = h3600_name; ts->dev.name = h3600_name;
ts->dev.phys = ts->phys; ts->dev.phys = ts->phys;
ts->dev.idbus = BUS_RS232; ts->dev.id.bustype = BUS_RS232;
ts->dev.idvendor = SERIO_H3600; ts->dev.id.vendor = SERIO_H3600;
ts->dev.idproduct = 0x0666; /* FIXME !!! We can ask the hardware */ ts->dev.id.product = 0x0666; /* FIXME !!! We can ask the hardware */
ts->dev.idversion = 0x0100; ts->dev.id.version = 0x0100;
if (serio_open(serio, dev)) { if (serio_open(serio, dev)) {
free_irq(IRQ_GPIO_BITSY_ACTION_BUTTON, ts); free_irq(IRQ_GPIO_BITSY_ACTION_BUTTON, ts);
......
...@@ -162,10 +162,10 @@ static int uinput_alloc_device(struct file *file, const char *buffer, size_t cou ...@@ -162,10 +162,10 @@ static int uinput_alloc_device(struct file *file, const char *buffer, size_t cou
strncpy(dev->name, user_dev.name, size); strncpy(dev->name, user_dev.name, size);
dev->name[size] = '\0'; dev->name[size] = '\0';
dev->idbus = user_dev.idbus; dev->id.bustype = user_dev.id.bustype;
dev->idvendor = user_dev.idvendor; dev->id.vendor = user_dev.id.vendor;
dev->idproduct = user_dev.idproduct; dev->id.product = user_dev.id.product;
dev->idversion = user_dev.idversion; dev->id.version = user_dev.id.version;
dev->ff_effects_max = user_dev.ff_effects_max; dev->ff_effects_max = user_dev.ff_effects_max;
size = sizeof(unsigned long) * NBITS(ABS_MAX + 1); size = sizeof(unsigned long) * NBITS(ABS_MAX + 1);
......
...@@ -479,10 +479,10 @@ adbhid_input_register(int id, int default_id, int original_handler_id, ...@@ -479,10 +479,10 @@ adbhid_input_register(int id, int default_id, int original_handler_id,
adbhid[id]->input.private = adbhid[id]; adbhid[id]->input.private = adbhid[id];
adbhid[id]->input.name = adbhid[id]->name; adbhid[id]->input.name = adbhid[id]->name;
adbhid[id]->input.phys = adbhid[id]->phys; adbhid[id]->input.phys = adbhid[id]->phys;
adbhid[id]->input.idbus = BUS_ADB; adbhid[id]->input.id.bustype = BUS_ADB;
adbhid[id]->input.idvendor = 0x0001; adbhid[id]->input.id.vendor = 0x0001;
adbhid[id]->input.idproduct = (id << 12) | (default_id << 8) | original_handler_id; adbhid[id]->input.id.product = (id << 12) | (default_id << 8) | original_handler_id;
adbhid[id]->input.idversion = 0x0100; adbhid[id]->input.id.version = 0x0100;
switch (default_id) { switch (default_id) {
case ADB_KEYBOARD: case ADB_KEYBOARD:
...@@ -607,7 +607,7 @@ adbhid_input_reregister(int id, int default_id, int org_handler_id, ...@@ -607,7 +607,7 @@ adbhid_input_reregister(int id, int default_id, int org_handler_id,
int cur_handler_id, int mk) int cur_handler_id, int mk)
{ {
if (adbhid[id]) { if (adbhid[id]) {
if (adbhid[id]->input.idproduct != if (adbhid[id]->input.id.product !=
((id << 12)|(default_id << 8)|org_handler_id)) { ((id << 12)|(default_id << 8)|org_handler_id)) {
adbhid_input_unregister(id); adbhid_input_unregister(id);
adbhid_input_register(id, default_id, org_handler_id, adbhid_input_register(id, default_id, org_handler_id,
......
...@@ -181,10 +181,10 @@ static void emumousebtn_input_register(void) ...@@ -181,10 +181,10 @@ static void emumousebtn_input_register(void)
emumousebtn.keybit[LONG(BTN_MOUSE)] = BIT(BTN_LEFT) | BIT(BTN_MIDDLE) | BIT(BTN_RIGHT); emumousebtn.keybit[LONG(BTN_MOUSE)] = BIT(BTN_LEFT) | BIT(BTN_MIDDLE) | BIT(BTN_RIGHT);
emumousebtn.relbit[0] = BIT(REL_X) | BIT(REL_Y); emumousebtn.relbit[0] = BIT(REL_X) | BIT(REL_Y);
emumousebtn.idbus = BUS_ADB; emumousebtn.id.bustype = BUS_ADB;
emumousebtn.idvendor = 0x0001; emumousebtn.id.vendor = 0x0001;
emumousebtn.idproduct = 0x0001; emumousebtn.id.product = 0x0001;
emumousebtn.idversion = 0x0100; emumousebtn.id.version = 0x0100;
input_register_device(&emumousebtn); input_register_device(&emumousebtn);
......
...@@ -277,10 +277,10 @@ aiptek_probe(struct usb_device *dev, unsigned int ifnum, ...@@ -277,10 +277,10 @@ aiptek_probe(struct usb_device *dev, unsigned int ifnum,
aiptek->dev.close = aiptek_close; aiptek->dev.close = aiptek_close;
aiptek->dev.name = aiptek->features->name; aiptek->dev.name = aiptek->features->name;
aiptek->dev.idbus = BUS_USB; aiptek->dev.id.bustype = BUS_USB;
aiptek->dev.idvendor = dev->descriptor.idVendor; aiptek->dev.id.vendor = dev->descriptor.idVendor;
aiptek->dev.idproduct = dev->descriptor.idProduct; aiptek->dev.id.product = dev->descriptor.idProduct;
aiptek->dev.idversion = dev->descriptor.bcdDevice; aiptek->dev.id.version = dev->descriptor.bcdDevice;
aiptek->usbdev = dev; aiptek->usbdev = dev;
endpoint = dev->config[0].interface[ifnum].altsetting[0].endpoint + 0; endpoint = dev->config[0].interface[ifnum].altsetting[0].endpoint + 0;
......
...@@ -490,10 +490,10 @@ int hidinput_connect(struct hid_device *hid) ...@@ -490,10 +490,10 @@ int hidinput_connect(struct hid_device *hid)
hid->input.name = hid->name; hid->input.name = hid->name;
hid->input.phys = hid->phys; hid->input.phys = hid->phys;
hid->input.uniq = hid->uniq; hid->input.uniq = hid->uniq;
hid->input.idbus = BUS_USB; hid->input.id.bustype = BUS_USB;
hid->input.idvendor = dev->descriptor.idVendor; hid->input.id.vendor = dev->descriptor.idVendor;
hid->input.idproduct = dev->descriptor.idProduct; hid->input.id.product = dev->descriptor.idProduct;
hid->input.idversion = dev->descriptor.bcdDevice; hid->input.id.version = dev->descriptor.bcdDevice;
for (k = HID_INPUT_REPORT; k <= HID_OUTPUT_REPORT; k++) { for (k = HID_INPUT_REPORT; k <= HID_OUTPUT_REPORT; k++) {
report_enum = hid->report_enum + k; report_enum = hid->report_enum + k;
......
...@@ -293,10 +293,10 @@ static void *powermate_probe(struct usb_device *udev, unsigned int ifnum, const ...@@ -293,10 +293,10 @@ static void *powermate_probe(struct usb_device *udev, unsigned int ifnum, const
pm->input.keybit[LONG(BTN_0)] = BIT(BTN_0); pm->input.keybit[LONG(BTN_0)] = BIT(BTN_0);
pm->input.relbit[LONG(REL_DIAL)] = BIT(REL_DIAL); pm->input.relbit[LONG(REL_DIAL)] = BIT(REL_DIAL);
pm->input.mscbit[LONG(MSC_PULSELED)] = BIT(MSC_PULSELED); pm->input.mscbit[LONG(MSC_PULSELED)] = BIT(MSC_PULSELED);
pm->input.idbus = BUS_USB; pm->input.id.bustype = BUS_USB;
pm->input.idvendor = udev->descriptor.idVendor; pm->input.id.vendor = udev->descriptor.idVendor;
pm->input.idproduct = udev->descriptor.idProduct; pm->input.id.product = udev->descriptor.idProduct;
pm->input.idversion = udev->descriptor.bcdDevice; pm->input.id.version = udev->descriptor.bcdDevice;
pm->input.event = powermate_input_event; pm->input.event = powermate_input_event;
input_register_device(&pm->input); input_register_device(&pm->input);
......
...@@ -236,10 +236,10 @@ static void *usb_kbd_probe(struct usb_device *dev, unsigned int ifnum, ...@@ -236,10 +236,10 @@ static void *usb_kbd_probe(struct usb_device *dev, unsigned int ifnum,
kbd->dev.name = kbd->name; kbd->dev.name = kbd->name;
kbd->dev.phys = kbd->phys; kbd->dev.phys = kbd->phys;
kbd->dev.idbus = BUS_USB; kbd->dev.id.bus = BUS_USB;
kbd->dev.idvendor = dev->descriptor.idVendor; kbd->dev.id.vendor = dev->descriptor.idVendor;
kbd->dev.idproduct = dev->descriptor.idProduct; kbd->dev.id.product = dev->descriptor.idProduct;
kbd->dev.idversion = dev->descriptor.bcdDevice; kbd->dev.id.version = dev->descriptor.bcdDevice;
if (!(buf = kmalloc(63, GFP_KERNEL))) { if (!(buf = kmalloc(63, GFP_KERNEL))) {
kfree(kbd); kfree(kbd);
...@@ -255,7 +255,7 @@ static void *usb_kbd_probe(struct usb_device *dev, unsigned int ifnum, ...@@ -255,7 +255,7 @@ static void *usb_kbd_probe(struct usb_device *dev, unsigned int ifnum,
if (!strlen(kbd->name)) if (!strlen(kbd->name))
sprintf(kbd->name, "USB HIDBP Keyboard %04x:%04x", sprintf(kbd->name, "USB HIDBP Keyboard %04x:%04x",
kbd->dev.idvendor, kbd->dev.idproduct); kbd->dev.id.vendor, kbd->dev.id.product);
kfree(buf); kfree(buf);
......
...@@ -145,10 +145,10 @@ static void *usb_mouse_probe(struct usb_device *dev, unsigned int ifnum, ...@@ -145,10 +145,10 @@ static void *usb_mouse_probe(struct usb_device *dev, unsigned int ifnum,
mouse->dev.name = mouse->name; mouse->dev.name = mouse->name;
mouse->dev.phys = mouse->phys; mouse->dev.phys = mouse->phys;
mouse->dev.idbus = BUS_USB; mouse->dev.id.bus = BUS_USB;
mouse->dev.idvendor = dev->descriptor.idVendor; mouse->dev.id.vendor = dev->descriptor.idVendor;
mouse->dev.idproduct = dev->descriptor.idProduct; mouse->dev.id.product = dev->descriptor.idProduct;
mouse->dev.idversion = dev->descriptor.bcdDevice; mouse->dev.id.version = dev->descriptor.bcdDevice;
if (!(buf = kmalloc(63, GFP_KERNEL))) { if (!(buf = kmalloc(63, GFP_KERNEL))) {
kfree(mouse); kfree(mouse);
...@@ -164,7 +164,7 @@ static void *usb_mouse_probe(struct usb_device *dev, unsigned int ifnum, ...@@ -164,7 +164,7 @@ static void *usb_mouse_probe(struct usb_device *dev, unsigned int ifnum,
if (!strlen(mouse->name)) if (!strlen(mouse->name))
sprintf(mouse->name, "USB HIDBP Mouse %04x:%04x", sprintf(mouse->name, "USB HIDBP Mouse %04x:%04x",
mouse->dev.idvendor, mouse->dev.idproduct); mouse->dev.id.vendor, mouse->dev.id.product);
kfree(buf); kfree(buf);
......
...@@ -400,10 +400,10 @@ static void *wacom_probe(struct usb_device *dev, unsigned int ifnum, const struc ...@@ -400,10 +400,10 @@ static void *wacom_probe(struct usb_device *dev, unsigned int ifnum, const struc
wacom->dev.name = wacom->features->name; wacom->dev.name = wacom->features->name;
wacom->dev.phys = wacom->phys; wacom->dev.phys = wacom->phys;
wacom->dev.idbus = BUS_USB; wacom->dev.id.bustype = BUS_USB;
wacom->dev.idvendor = dev->descriptor.idVendor; wacom->dev.id.vendor = dev->descriptor.idVendor;
wacom->dev.idproduct = dev->descriptor.idProduct; wacom->dev.id.product = dev->descriptor.idProduct;
wacom->dev.idversion = dev->descriptor.bcdDevice; wacom->dev.id.version = dev->descriptor.bcdDevice;
wacom->usbdev = dev; wacom->usbdev = dev;
endpoint = dev->config[0].interface[ifnum].altsetting[0].endpoint + 0; endpoint = dev->config[0].interface[ifnum].altsetting[0].endpoint + 0;
......
...@@ -227,10 +227,10 @@ static void * xpad_probe(struct usb_device *udev, unsigned int ifnum, const stru ...@@ -227,10 +227,10 @@ static void * xpad_probe(struct usb_device *udev, unsigned int ifnum, const stru
xpad->udev = udev; xpad->udev = udev;
xpad->dev.idbus = BUS_USB; xpad->dev.id.bustype = BUS_USB;
xpad->dev.idvendor = udev->descriptor.idVendor; xpad->dev.id.vendor = udev->descriptor.idVendor;
xpad->dev.idproduct = udev->descriptor.idProduct; xpad->dev.id.product = udev->descriptor.idProduct;
xpad->dev.idversion = udev->descriptor.bcdDevice; xpad->dev.id.version = udev->descriptor.bcdDevice;
xpad->dev.private = xpad; xpad->dev.private = xpad;
xpad->dev.name = xpad_device[i].name; xpad->dev.name = xpad_device[i].name;
xpad->dev.phys = xpad->phys; xpad->dev.phys = xpad->phys;
......
...@@ -39,10 +39,7 @@ struct gameport { ...@@ -39,10 +39,7 @@ struct gameport {
char *name; char *name;
char *phys; char *phys;
unsigned short idbus; struct input_devinfo id;
unsigned short idvendor;
unsigned short idproduct;
unsigned short idversion;
int io; int io;
int speed; int speed;
......
...@@ -56,8 +56,15 @@ struct input_event { ...@@ -56,8 +56,15 @@ struct input_event {
* IOCTLs (0x00 - 0x7f) * IOCTLs (0x00 - 0x7f)
*/ */
struct input_devinfo {
uint16_t bustype;
uint16_t vendor;
uint16_t product;
uint16_t version;
};
#define EVIOCGVERSION _IOR('E', 0x01, int) /* get driver version */ #define EVIOCGVERSION _IOR('E', 0x01, int) /* get driver version */
#define EVIOCGID _IOR('E', 0x02, short[4]) /* get device ID */ #define EVIOCGID _IOR('E', 0x02, struct input_devinfo) /* get device ID */
#define EVIOCGREP _IOR('E', 0x03, int[2]) /* get repeat settings */ #define EVIOCGREP _IOR('E', 0x03, int[2]) /* get repeat settings */
#define EVIOCSREP _IOW('E', 0x03, int[2]) /* get repeat settings */ #define EVIOCSREP _IOW('E', 0x03, int[2]) /* get repeat settings */
#define EVIOCGKEYCODE _IOR('E', 0x04, int[2]) /* get keycode */ #define EVIOCGKEYCODE _IOR('E', 0x04, int[2]) /* get keycode */
...@@ -742,10 +749,7 @@ struct input_dev { ...@@ -742,10 +749,7 @@ struct input_dev {
char *name; char *name;
char *phys; char *phys;
char *uniq; char *uniq;
unsigned short idbus; struct input_devinfo id;
unsigned short idvendor;
unsigned short idproduct;
unsigned short idversion;
unsigned long evbit[NBITS(EV_MAX)]; unsigned long evbit[NBITS(EV_MAX)];
unsigned long keybit[NBITS(KEY_MAX)]; unsigned long keybit[NBITS(KEY_MAX)];
...@@ -818,10 +822,7 @@ struct input_device_id { ...@@ -818,10 +822,7 @@ struct input_device_id {
unsigned long flags; unsigned long flags;
unsigned short idbus; struct input_devinfo id;
unsigned short idvendor;
unsigned short idproduct;
unsigned short idversion;
unsigned long evbit[NBITS(EV_MAX)]; unsigned long evbit[NBITS(EV_MAX)];
unsigned long keybit[NBITS(KEY_MAX)]; unsigned long keybit[NBITS(KEY_MAX)];
......
...@@ -64,10 +64,7 @@ struct uinput_device { ...@@ -64,10 +64,7 @@ struct uinput_device {
#define UINPUT_MAX_NAME_SIZE 80 #define UINPUT_MAX_NAME_SIZE 80
struct uinput_user_dev { struct uinput_user_dev {
char name[UINPUT_MAX_NAME_SIZE]; char name[UINPUT_MAX_NAME_SIZE];
unsigned short idbus; struct input_devinfo id;
unsigned short idvendor;
unsigned short idproduct;
unsigned short idversion;
int ff_effects_max; int ff_effects_max;
int absmax[ABS_MAX + 1]; int absmax[ABS_MAX + 1];
int absmin[ABS_MAX + 1]; int absmin[ABS_MAX + 1];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment