Commit 0c9c808e authored by Vojtech Pavlik's avatar Vojtech Pavlik

Apply Rusty's C99 initializer patch to input drivers.

Fix cli() breakage in input (gameport) drivers.
parent a2ea21bb
......@@ -80,11 +80,11 @@ static struct input_device_id evbug_ids[] = {
MODULE_DEVICE_TABLE(input, evbug_ids);
static struct input_handler evbug_handler = {
event: evbug_event,
connect: evbug_connect,
disconnect: evbug_disconnect,
name: "evbug",
id_table: evbug_ids,
.event = evbug_event,
.connect = evbug_connect,
.disconnect = evbug_disconnect,
.name = "evbug",
.id_table = evbug_ids,
};
int __init evbug_init(void)
......
......@@ -399,15 +399,15 @@ static int evdev_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
}
static struct file_operations evdev_fops = {
owner: THIS_MODULE,
read: evdev_read,
write: evdev_write,
poll: evdev_poll,
open: evdev_open,
release: evdev_release,
ioctl: evdev_ioctl,
fasync: evdev_fasync,
flush: evdev_flush
.owner = THIS_MODULE,
.read = evdev_read,
.write = evdev_write,
.poll = evdev_poll,
.open = evdev_open,
.release = evdev_release,
.ioctl = evdev_ioctl,
.fasync = evdev_fasync,
.flush = evdev_flush
};
static struct input_handle *evdev_connect(struct input_handler *handler, struct input_dev *dev, struct input_device_id *id)
......@@ -468,13 +468,13 @@ static struct input_device_id evdev_ids[] = {
MODULE_DEVICE_TABLE(input, evdev_ids);
static struct input_handler evdev_handler = {
event: evdev_event,
connect: evdev_connect,
disconnect: evdev_disconnect,
fops: &evdev_fops,
minor: EVDEV_MINOR_BASE,
name: "evdev",
id_table: evdev_ids,
.event = evdev_event,
.connect = evdev_connect,
.disconnect = evdev_disconnect,
.fops = &evdev_fops,
.minor = EVDEV_MINOR_BASE,
.name = "evdev",
.id_table = evdev_ids,
};
static int __init evdev_init(void)
......
......@@ -312,10 +312,10 @@ static void __devexit cs461x_pci_remove(struct pci_dev *pdev)
}
static struct pci_driver cs461x_pci_driver = {
name: "CS461x Gameport",
id_table: cs461x_pci_tbl,
probe: cs461x_pci_probe,
remove: __devexit_p(cs461x_pci_remove),
.name = "CS461x Gameport",
.id_table = cs461x_pci_tbl,
.probe = cs461x_pci_probe,
.remove = __devexit_p(cs461x_pci_remove),
};
int __init cs461x_init(void)
......
......@@ -110,10 +110,10 @@ static void __devexit emu_remove(struct pci_dev *pdev)
}
static struct pci_driver emu_driver = {
name: "Emu10k1 Gameport",
id_table: emu_tbl,
probe: emu_probe,
remove: __devexit_p(emu_remove),
.name = "Emu10k1 Gameport",
.id_table = emu_tbl,
.probe = emu_probe,
.remove = __devexit_p(emu_remove),
};
int __init emu_init(void)
......
......@@ -137,10 +137,10 @@ static struct pci_device_id fm801_gp_id_table[] __devinitdata = {
};
static struct pci_driver fm801_gp_driver = {
name: "FM801 GP",
id_table: fm801_gp_id_table,
probe: fm801_gp_probe,
remove: fm801_gp_remove,
.name = "FM801 GP",
.id_table = fm801_gp_id_table,
.probe = fm801_gp_probe,
.remove = fm801_gp_remove,
};
int __init fm801_gp_init(void)
......
......@@ -94,13 +94,12 @@ static int gameport_measure_speed(struct gameport *gameport)
tx = 1 << 30;
for(i = 0; i < 50; i++) {
save_flags(flags); /* Yes, all CPUs */
cli();
local_irq_save(flags);
GET_TIME(t1);
for(t = 0; t < 50; t++) gameport_read(gameport);
GET_TIME(t2);
GET_TIME(t3);
restore_flags(flags);
local_irq_restore(flags);
udelay(i * 10);
if ((t = DELTA(t2,t1) - DELTA(t3,t2)) < tx) tx = t;
}
......
......@@ -163,8 +163,8 @@ static struct ns558* ns558_isa_probe(int io, struct ns558 *next)
#ifdef __ISAPNP__
#define NS558_DEVICE(a,b,c,d)\
card_vendor: ISAPNP_ANY_ID, card_device: ISAPNP_ANY_ID,\
vendor: ISAPNP_VENDOR(a,b,c), function: ISAPNP_DEVICE(d)
.card_vendor = ISAPNP_ANY_ID, card_device: ISAPNP_ANY_ID,\
.vendor = ISAPNP_VENDOR(a,b,c), function: ISAPNP_DEVICE(d)
static struct isapnp_device_id pnp_devids[] = {
{ NS558_DEVICE('@','P','@',0x0001) }, /* ALS 100 */
......
......@@ -165,10 +165,10 @@ static struct pci_device_id vortex_id_table[] __devinitdata =
{ 0 }};
static struct pci_driver vortex_driver = {
name: "vortex",
id_table: vortex_id_table,
probe: vortex_probe,
remove: vortex_remove,
.name = "vortex",
.id_table = vortex_id_table,
.probe = vortex_probe,
.remove = vortex_remove,
};
int __init vortex_init(void)
......
......@@ -650,8 +650,8 @@ static int input_open_file(struct inode *inode, struct file *file)
}
static struct file_operations input_fops = {
owner: THIS_MODULE,
open: input_open_file,
.owner = THIS_MODULE,
.open = input_open_file,
};
devfs_handle_t input_register_minor(char *name, int minor, int minor_base)
......
......@@ -402,14 +402,14 @@ static int joydev_ioctl(struct inode *inode, struct file *file, unsigned int cmd
}
static struct file_operations joydev_fops = {
owner: THIS_MODULE,
read: joydev_read,
write: joydev_write,
poll: joydev_poll,
open: joydev_open,
release: joydev_release,
ioctl: joydev_ioctl,
fasync: joydev_fasync,
.owner = THIS_MODULE,
.read = joydev_read,
.write = joydev_write,
.poll = joydev_poll,
.open = joydev_open,
.release = joydev_release,
.ioctl = joydev_ioctl,
.fasync = joydev_fasync,
};
static struct input_handle *joydev_connect(struct input_handler *handler, struct input_dev *dev, struct input_device_id *id)
......@@ -505,19 +505,19 @@ static void joydev_disconnect(struct input_handle *handle)
static struct input_device_id joydev_ids[] = {
{
flags: INPUT_DEVICE_ID_MATCH_EVBIT,
evbit: { BIT(EV_KEY) | BIT(EV_ABS) },
absbit: { BIT(ABS_X) },
.flags = INPUT_DEVICE_ID_MATCH_EVBIT,
.evbit = { BIT(EV_KEY) | BIT(EV_ABS) },
.absbit = { BIT(ABS_X) },
},
{
flags: INPUT_DEVICE_ID_MATCH_EVBIT,
evbit: { BIT(EV_KEY) | BIT(EV_ABS) },
absbit: { BIT(ABS_WHEEL) },
.flags = INPUT_DEVICE_ID_MATCH_EVBIT,
.evbit = { BIT(EV_KEY) | BIT(EV_ABS) },
.absbit = { BIT(ABS_WHEEL) },
},
{
flags: INPUT_DEVICE_ID_MATCH_EVBIT,
evbit: { BIT(EV_KEY) | BIT(EV_ABS) },
absbit: { BIT(ABS_THROTTLE) },
.flags = INPUT_DEVICE_ID_MATCH_EVBIT,
.evbit = { BIT(EV_KEY) | BIT(EV_ABS) },
.absbit = { BIT(ABS_THROTTLE) },
},
{ }, /* Terminating entry */
};
......@@ -525,13 +525,13 @@ static struct input_device_id joydev_ids[] = {
MODULE_DEVICE_TABLE(input, joydev_ids);
static struct input_handler joydev_handler = {
event: joydev_event,
connect: joydev_connect,
disconnect: joydev_disconnect,
fops: &joydev_fops,
minor: JOYDEV_MINOR_BASE,
name: "joydev",
id_table: joydev_ids,
.event = joydev_event,
.connect = joydev_connect,
.disconnect = joydev_disconnect,
.fops = &joydev_fops,
.minor = JOYDEV_MINOR_BASE,
.name = "joydev",
.id_table = joydev_ids,
};
static int __init joydev_init(void)
......
......@@ -378,8 +378,8 @@ static void a3d_disconnect(struct gameport *gameport)
}
static struct gameport_dev a3d_dev = {
connect: a3d_connect,
disconnect: a3d_disconnect,
.connect = a3d_connect,
.disconnect = a3d_disconnect,
};
int __init a3d_init(void)
......
......@@ -541,8 +541,8 @@ static void adi_disconnect(struct gameport *gameport)
*/
static struct gameport_dev adi_dev = {
connect: adi_connect,
disconnect: adi_disconnect,
.connect = adi_connect,
.disconnect = adi_disconnect,
};
int __init adi_init(void)
......
......@@ -368,8 +368,7 @@ static void analog_calibrate_timer(struct analog_port *port)
unsigned int i, t, tx, t1, t2, t3;
unsigned long flags;
save_flags(flags);
cli();
local_irq_save(flags);
GET_TIME(t1);
#ifdef FAKE_TIME
analog_faketime += 830;
......@@ -377,19 +376,18 @@ static void analog_calibrate_timer(struct analog_port *port)
udelay(1000);
GET_TIME(t2);
GET_TIME(t3);
restore_flags(flags);
local_irq_restore(flags);
port->speed = DELTA(t1, t2) - DELTA(t2, t3);
tx = ~0;
for (i = 0; i < 50; i++) {
save_flags(flags);
cli();
local_irq_save(flags);
GET_TIME(t1);
for (t = 0; t < 50; t++) { gameport_read(gameport); GET_TIME(t2); }
GET_TIME(t3);
restore_flags(flags);
local_irq_restore(flags);
udelay(i);
t = DELTA(t1, t2) - DELTA(t2, t3);
if (t < tx) tx = t;
......@@ -737,8 +735,8 @@ static void analog_parse_options(void)
*/
static struct gameport_dev analog_dev = {
connect: analog_connect,
disconnect: analog_disconnect,
.connect = analog_connect,
.disconnect = analog_disconnect,
};
#ifndef MODULE
......
......@@ -235,8 +235,8 @@ static void cobra_disconnect(struct gameport *gameport)
}
static struct gameport_dev cobra_dev = {
connect: cobra_connect,
disconnect: cobra_disconnect,
.connect = cobra_connect,
.disconnect = cobra_disconnect,
};
int __init cobra_init(void)
......
......@@ -343,8 +343,8 @@ static void gf2k_disconnect(struct gameport *gameport)
}
static struct gameport_dev gf2k_dev = {
connect: gf2k_connect,
disconnect: gf2k_disconnect,
.connect = gf2k_connect,
.disconnect = gf2k_disconnect,
};
int __init gf2k_init(void)
......
......@@ -408,8 +408,8 @@ static void grip_disconnect(struct gameport *gameport)
}
static struct gameport_dev grip_dev = {
connect: grip_connect,
disconnect: grip_disconnect,
.connect = grip_connect,
.disconnect = grip_disconnect,
};
int __init grip_init(void)
......
......@@ -265,8 +265,8 @@ static void guillemot_disconnect(struct gameport *gameport)
}
static struct gameport_dev guillemot_dev = {
connect: guillemot_connect,
disconnect: guillemot_disconnect,
.connect = guillemot_connect,
.disconnect = guillemot_disconnect,
};
int __init guillemot_init(void)
......
......@@ -159,8 +159,8 @@ static void iforce_serio_disconnect(struct serio *serio)
}
struct serio_dev iforce_serio_dev = {
write_wakeup: iforce_serio_write_wakeup,
interrupt: iforce_serio_irq,
connect: iforce_serio_connect,
disconnect: iforce_serio_disconnect,
.write_wakeup = iforce_serio_write_wakeup,
.interrupt = iforce_serio_irq,
.connect = iforce_serio_connect,
.disconnect = iforce_serio_disconnect,
};
......@@ -206,9 +206,9 @@ static struct usb_device_id iforce_usb_ids [] = {
MODULE_DEVICE_TABLE (usb, iforce_usb_ids);
struct usb_driver iforce_usb_driver = {
owner: THIS_MODULE,
name: "iforce",
probe: iforce_usb_probe,
disconnect: iforce_usb_disconnect,
id_table: iforce_usb_ids,
.owner = THIS_MODULE,
.name = "iforce",
.probe = iforce_usb_probe,
.disconnect = iforce_usb_disconnect,
.id_table = iforce_usb_ids,
};
......@@ -293,8 +293,8 @@ static void interact_disconnect(struct gameport *gameport)
}
static struct gameport_dev interact_dev = {
connect: interact_connect,
disconnect: interact_disconnect,
.connect = interact_connect,
.disconnect = interact_disconnect,
};
int __init interact_init(void)
......
......@@ -133,8 +133,8 @@ static void __devexit joydump_disconnect(struct gameport *gameport)
}
static struct gameport_dev joydump_dev = {
connect: joydump_connect,
disconnect: joydump_disconnect,
.connect = joydump_connect,
.disconnect = joydump_disconnect,
};
static int __init joydump_init(void)
......
......@@ -192,9 +192,9 @@ static void magellan_connect(struct serio *serio, struct serio_dev *dev)
*/
static struct serio_dev magellan_dev = {
interrupt: magellan_interrupt,
connect: magellan_connect,
disconnect: magellan_disconnect,
.interrupt = magellan_interrupt,
.connect = magellan_connect,
.disconnect = magellan_disconnect,
};
/*
......
......@@ -743,8 +743,8 @@ static void sw_disconnect(struct gameport *gameport)
}
static struct gameport_dev sw_dev = {
connect: sw_connect,
disconnect: sw_disconnect,
.connect = sw_connect,
.disconnect = sw_disconnect,
};
int __init sw_init(void)
......
......@@ -263,9 +263,9 @@ static void spaceball_connect(struct serio *serio, struct serio_dev *dev)
*/
static struct serio_dev spaceball_dev = {
interrupt: spaceball_interrupt,
connect: spaceball_connect,
disconnect: spaceball_disconnect,
.interrupt = spaceball_interrupt,
.connect = spaceball_connect,
.disconnect = spaceball_disconnect,
};
/*
......
......@@ -207,9 +207,9 @@ static void spaceorb_connect(struct serio *serio, struct serio_dev *dev)
*/
static struct serio_dev spaceorb_dev = {
interrupt: spaceorb_interrupt,
connect: spaceorb_connect,
disconnect: spaceorb_disconnect,
.interrupt = spaceorb_interrupt,
.connect = spaceorb_connect,
.disconnect = spaceorb_disconnect,
};
/*
......
......@@ -182,9 +182,9 @@ static void stinger_connect(struct serio *serio, struct serio_dev *dev)
*/
static struct serio_dev stinger_dev = {
interrupt: stinger_interrupt,
connect: stinger_connect,
disconnect: stinger_disconnect,
.interrupt = stinger_interrupt,
.connect = stinger_connect,
.disconnect = stinger_disconnect,
};
/*
......
......@@ -361,8 +361,8 @@ static void tmdc_disconnect(struct gameport *gameport)
}
static struct gameport_dev tmdc_dev = {
connect: tmdc_connect,
disconnect: tmdc_disconnect,
.connect = tmdc_connect,
.disconnect = tmdc_disconnect,
};
int __init tmdc_init(void)
......
......@@ -240,9 +240,9 @@ static void twidjoy_connect(struct serio *serio, struct serio_dev *dev)
*/
static struct serio_dev twidjoy_dev = {
interrupt: twidjoy_interrupt,
connect: twidjoy_connect,
disconnect: twidjoy_disconnect,
.interrupt = twidjoy_interrupt,
.connect = twidjoy_connect,
.disconnect = twidjoy_disconnect,
};
/*
......
......@@ -194,9 +194,9 @@ static void warrior_connect(struct serio *serio, struct serio_dev *dev)
*/
static struct serio_dev warrior_dev = {
interrupt: warrior_interrupt,
connect: warrior_connect,
disconnect: warrior_disconnect,
.interrupt = warrior_interrupt,
.connect = warrior_connect,
.disconnect = warrior_disconnect,
};
/*
......
......@@ -197,8 +197,8 @@ static void keybdev_disconnect(struct input_handle *handle)
static struct input_device_id keybdev_ids[] = {
{
flags: INPUT_DEVICE_ID_MATCH_EVBIT,
evbit: { BIT(EV_KEY) },
.flags = INPUT_DEVICE_ID_MATCH_EVBIT,
.evbit = { BIT(EV_KEY) },
},
{ }, /* Terminating entry */
};
......@@ -206,11 +206,11 @@ static struct input_device_id keybdev_ids[] = {
MODULE_DEVICE_TABLE(input, keybdev_ids);
static struct input_handler keybdev_handler = {
event: keybdev_event,
connect: keybdev_connect,
disconnect: keybdev_disconnect,
name: "keybdev",
id_table: keybdev_ids,
.event = keybdev_event,
.connect = keybdev_connect,
.disconnect = keybdev_disconnect,
.name = "keybdev",
.id_table = keybdev_ids,
};
static int __init keybdev_init(void)
......
......@@ -523,9 +523,9 @@ static void atkbd_connect(struct serio *serio, struct serio_dev *dev)
static struct serio_dev atkbd_dev = {
interrupt: atkbd_interrupt,
connect: atkbd_connect,
disconnect: atkbd_disconnect
.interrupt = atkbd_interrupt,
.connect = atkbd_connect,
.disconnect = atkbd_disconnect
};
#ifndef MODULE
......
......@@ -160,10 +160,10 @@ static void dc_kbd_disconnect(struct maple_device *dev)
static struct maple_driver dc_kbd_driver = {
function: MAPLE_FUNC_KEYBOARD,
name: "Dreamcast keyboard",
connect: dc_kbd_connect,
disconnect: dc_kbd_disconnect,
.function = MAPLE_FUNC_KEYBOARD,
.name = "Dreamcast keyboard",
.connect = dc_kbd_connect,
.disconnect = dc_kbd_disconnect,
};
......
......@@ -129,9 +129,9 @@ void nkbd_disconnect(struct serio *serio)
}
struct serio_dev nkbd_dev = {
interrupt: nkbd_interrupt,
connect: nkbd_connect,
disconnect: nkbd_disconnect
.interrupt = nkbd_interrupt,
.connect = nkbd_connect,
.disconnect = nkbd_disconnect
};
int __init nkbd_init(void)
......
......@@ -294,9 +294,9 @@ static void sunkbd_disconnect(struct serio *serio)
}
static struct serio_dev sunkbd_dev = {
interrupt: sunkbd_interrupt,
connect: sunkbd_connect,
disconnect: sunkbd_disconnect
.interrupt = sunkbd_interrupt,
.connect = sunkbd_connect,
.disconnect = sunkbd_disconnect
};
/*
......
......@@ -137,9 +137,9 @@ void xtkbd_disconnect(struct serio *serio)
}
struct serio_dev xtkbd_dev = {
interrupt: xtkbd_interrupt,
connect: xtkbd_connect,
disconnect: xtkbd_disconnect
.interrupt = xtkbd_interrupt,
.connect = xtkbd_connect,
.disconnect = xtkbd_disconnect
};
int __init xtkbd_init(void)
......
......@@ -108,13 +108,13 @@ static void inport_close(struct input_dev *dev)
}
static struct input_dev inport_dev = {
evbit: { BIT(EV_KEY) | BIT(EV_REL) },
keybit: { [LONG(BTN_LEFT)] = BIT(BTN_LEFT) | BIT(BTN_MIDDLE) | BIT(BTN_RIGHT) },
relbit: { BIT(REL_X) | BIT(REL_Y) },
open: inport_open,
close: inport_close,
name: INPORT_NAME,
phys: "isa023c/input0",
.evbit = { BIT(EV_KEY) | BIT(EV_REL) },
.keybit = { [LONG(BTN_LEFT)] = BIT(BTN_LEFT) | BIT(BTN_MIDDLE) | BIT(BTN_RIGHT) },
.relbit = { BIT(REL_X) | BIT(REL_Y) },
.open = inport_open,
.close = inport_close,
.name = INPORT_NAME,
.phys = "isa023c/input0",
};
static void inport_interrupt(int irq, void *dev_id, struct pt_regs *regs)
......
......@@ -98,13 +98,13 @@ static void logibm_close(struct input_dev *dev)
}
static struct input_dev logibm_dev = {
evbit: { BIT(EV_KEY) | BIT(EV_REL) },
keybit: { [LONG(BTN_LEFT)] = BIT(BTN_LEFT) | BIT(BTN_MIDDLE) | BIT(BTN_RIGHT) },
relbit: { BIT(REL_X) | BIT(REL_Y) },
open: logibm_open,
close: logibm_close,
name: "Logitech bus mouse",
phys: "isa023c/input0",
.evbit = { BIT(EV_KEY) | BIT(EV_REL) },
.keybit = { [LONG(BTN_LEFT)] = BIT(BTN_LEFT) | BIT(BTN_MIDDLE) | BIT(BTN_RIGHT) },
.relbit = { BIT(REL_X) | BIT(REL_Y) },
.open = logibm_open,
.close = logibm_close,
.name = "Logitech bus mouse",
.phys = "isa023c/input0",
};
static void logibm_interrupt(int irq, void *dev_id, struct pt_regs *regs)
......
......@@ -107,10 +107,10 @@ static void dc_mouse_disconnect(struct maple_device *dev)
static struct maple_driver dc_mouse_driver = {
function: MAPLE_FUNC_MOUSE,
name: "Dreamcast mouse",
connect: dc_mouse_connect,
disconnect: dc_mouse_disconnect,
.function = MAPLE_FUNC_MOUSE,
.name = "Dreamcast mouse",
.connect = dc_mouse_connect,
.disconnect = dc_mouse_disconnect,
};
......
......@@ -95,14 +95,11 @@ static int pc110pad_open(struct input_dev *dev)
if (pc110pad_used++)
return 0;
__save_flags(flags);
__cli();
pc110pad_interrupt(0,0,0);
pc110pad_interrupt(0,0,0);
pc110pad_interrupt(0,0,0);
outb(PC110PAD_ON, pc110pad_io + 2);
pc110pad_count = 0;
__restore_flags(flags);
return 0;
}
......
......@@ -613,9 +613,9 @@ static void psmouse_connect(struct serio *serio, struct serio_dev *dev)
}
static struct serio_dev psmouse_dev = {
interrupt: psmouse_interrupt,
connect: psmouse_connect,
disconnect: psmouse_disconnect
.interrupt = psmouse_interrupt,
.connect = psmouse_connect,
.disconnect = psmouse_disconnect
};
int __init psmouse_init(void)
......
......@@ -36,11 +36,11 @@ MODULE_LICENSE("GPL");
static short rpcmouse_lastx, rpcmouse_lasty;
static struct input_dev rpcmouse_dev = {
evbit: { BIT(EV_KEY) | BIT(EV_REL) },
keybit: { [LONG(BTN_LEFT)] = BIT(BTN_LEFT) | BIT(BTN_MIDDLE) | BIT(BTN_RIGHT) },
relbit: { BIT(REL_X) | BIT(REL_Y) },
name: "Acorn RiscPC Mouse",
phys: "rpcmouse/input0",
.evbit = { BIT(EV_KEY) | BIT(EV_REL) },
.keybit = { [LONG(BTN_LEFT)] = BIT(BTN_LEFT) | BIT(BTN_MIDDLE) | BIT(BTN_RIGHT) },
.relbit = { BIT(REL_X) | BIT(REL_Y) },
.name = "Acorn RiscPC Mouse",
.phys = "rpcmouse/input0",
};
static void rpcmouse_irq(int irq, void *dev_id, struct pt_regs *regs)
......
......@@ -279,9 +279,9 @@ static void sermouse_connect(struct serio *serio, struct serio_dev *dev)
}
static struct serio_dev sermouse_dev = {
interrupt: sermouse_interrupt,
connect: sermouse_connect,
disconnect: sermouse_disconnect
.interrupt = sermouse_interrupt,
.connect = sermouse_connect,
.disconnect = sermouse_disconnect
};
int __init sermouse_init(void)
......
......@@ -414,13 +414,13 @@ static unsigned int mousedev_poll(struct file *file, poll_table *wait)
}
struct file_operations mousedev_fops = {
owner: THIS_MODULE,
read: mousedev_read,
write: mousedev_write,
poll: mousedev_poll,
open: mousedev_open,
release: mousedev_release,
fasync: mousedev_fasync,
.owner = THIS_MODULE,
.read = mousedev_read,
.write = mousedev_write,
.poll = mousedev_poll,
.open = mousedev_open,
.release = mousedev_release,
.fasync = mousedev_fasync,
};
static struct input_handle *mousedev_connect(struct input_handler *handler, struct input_dev *dev, struct input_device_id *id)
......@@ -477,17 +477,17 @@ static void mousedev_disconnect(struct input_handle *handle)
static struct input_device_id mousedev_ids[] = {
{
flags: INPUT_DEVICE_ID_MATCH_EVBIT | INPUT_DEVICE_ID_MATCH_KEYBIT | INPUT_DEVICE_ID_MATCH_RELBIT,
evbit: { BIT(EV_KEY) | BIT(EV_REL) },
keybit: { [LONG(BTN_LEFT)] = BIT(BTN_LEFT) },
relbit: { BIT(REL_X) | BIT(REL_Y) },
.flags = INPUT_DEVICE_ID_MATCH_EVBIT | INPUT_DEVICE_ID_MATCH_KEYBIT | INPUT_DEVICE_ID_MATCH_RELBIT,
.evbit = { BIT(EV_KEY) | BIT(EV_REL) },
.keybit = { [LONG(BTN_LEFT)] = BIT(BTN_LEFT) },
.relbit = { BIT(REL_X) | BIT(REL_Y) },
}, /* A mouse like device, at least one button, two relative axes */
{
flags: INPUT_DEVICE_ID_MATCH_EVBIT | INPUT_DEVICE_ID_MATCH_KEYBIT | INPUT_DEVICE_ID_MATCH_ABSBIT,
evbit: { BIT(EV_KEY) | BIT(EV_ABS) },
keybit: { [LONG(BTN_TOUCH)] = BIT(BTN_TOUCH) },
absbit: { BIT(ABS_X) | BIT(ABS_Y) },
.flags = INPUT_DEVICE_ID_MATCH_EVBIT | INPUT_DEVICE_ID_MATCH_KEYBIT | INPUT_DEVICE_ID_MATCH_ABSBIT,
.evbit = { BIT(EV_KEY) | BIT(EV_ABS) },
.keybit = { [LONG(BTN_TOUCH)] = BIT(BTN_TOUCH) },
.absbit = { BIT(ABS_X) | BIT(ABS_Y) },
}, /* A tablet like device, at least touch detection, two absolute axes */
{ }, /* Terminating entry */
......@@ -496,13 +496,13 @@ static struct input_device_id mousedev_ids[] = {
MODULE_DEVICE_TABLE(input, mousedev_ids);
static struct input_handler mousedev_handler = {
event: mousedev_event,
connect: mousedev_connect,
disconnect: mousedev_disconnect,
fops: &mousedev_fops,
minor: MOUSEDEV_MINOR_BASE,
name: "mousedev",
id_table: mousedev_ids,
.event = mousedev_event,
.connect = mousedev_connect,
.disconnect = mousedev_disconnect,
.fops = &mousedev_fops,
.minor = MOUSEDEV_MINOR_BASE,
.name = "mousedev",
.id_table = mousedev_ids,
};
#ifdef CONFIG_INPUT_MOUSEDEV_PSAUX
......
......@@ -136,18 +136,18 @@ static void power_disconnect(struct input_handle *handle)
static struct input_device_id power_ids[] = {
{
flags: INPUT_DEVICE_ID_MATCH_EVBIT | INPUT_DEVICE_ID_MATCH_KEYBIT,
evbit: { BIT(EV_KEY) },
keybit: { [LONG(KEY_SUSPEND)] = BIT(KEY_SUSPEND) }
.flags = INPUT_DEVICE_ID_MATCH_EVBIT | INPUT_DEVICE_ID_MATCH_KEYBIT,
.evbit = { BIT(EV_KEY) },
.keybit = { [LONG(KEY_SUSPEND)] = BIT(KEY_SUSPEND) }
},
{
flags: INPUT_DEVICE_ID_MATCH_EVBIT | INPUT_DEVICE_ID_MATCH_KEYBIT,
evbit: { BIT(EV_KEY) },
keybit: { [LONG(KEY_POWER)] = BIT(KEY_POWER) }
.flags = INPUT_DEVICE_ID_MATCH_EVBIT | INPUT_DEVICE_ID_MATCH_KEYBIT,
.evbit = { BIT(EV_KEY) },
.keybit = { [LONG(KEY_POWER)] = BIT(KEY_POWER) }
},
{
flags: INPUT_DEVICE_ID_MATCH_EVBIT,
evbit: { BIT(EV_PWR) },
.flags = INPUT_DEVICE_ID_MATCH_EVBIT,
.evbit = { BIT(EV_PWR) },
},
{ }, /* Terminating entry */
};
......@@ -155,11 +155,11 @@ static struct input_device_id power_ids[] = {
MODULE_DEVICE_TABLE(input, power_ids);
static struct input_handler power_handler = {
event: power_event,
connect: power_connect,
disconnect: power_disconnect,
name: "power",
id_table: power_ids,
.event = power_event,
.connect = power_connect,
.disconnect = power_disconnect,
.name = "power",
.id_table = power_ids,
};
static int __init power_init(void)
......
......@@ -141,12 +141,12 @@ static int ct82c710_write(struct serio *port, unsigned char c)
static struct serio ct82c710_port =
{
type: SERIO_8042,
name: ct82c710_name,
phys: ct82c710_phys,
write: ct82c710_write,
open: ct82c710_open,
close: ct82c710_close,
.type = SERIO_8042,
.name = ct82c710_name,
.phys = ct82c710_phys,
.write = ct82c710_write,
.open = ct82c710_open,
.close = ct82c710_close,
};
/*
......
......@@ -296,41 +296,41 @@ static void i8042_close(struct serio *port)
*/
static struct i8042_values i8042_kbd_values = {
irq: I8042_KBD_IRQ,
irqen: I8042_CTR_KBDINT,
disable: I8042_CTR_KBDDIS,
name: "KBD",
exists: 0,
.irq = I8042_KBD_IRQ,
.irqen = I8042_CTR_KBDINT,
.disable = I8042_CTR_KBDDIS,
.name = "KBD",
.exists = 0,
};
static struct serio i8042_kbd_port =
{
type: SERIO_8042,
write: i8042_kbd_write,
open: i8042_open,
close: i8042_close,
driver: &i8042_kbd_values,
name: "i8042 Kbd Port",
phys: I8042_KBD_PHYS_DESC,
.type = SERIO_8042,
.write = i8042_kbd_write,
.open = i8042_open,
.close = i8042_close,
.driver = &i8042_kbd_values,
.name = "i8042 Kbd Port",
.phys = I8042_KBD_PHYS_DESC,
};
static struct i8042_values i8042_aux_values = {
irq: I8042_AUX_IRQ,
irqen: I8042_CTR_AUXINT,
disable: I8042_CTR_AUXDIS,
name: "AUX",
exists: 0,
.irq = I8042_AUX_IRQ,
.irqen = I8042_CTR_AUXINT,
.disable = I8042_CTR_AUXDIS,
.name = "AUX",
.exists = 0,
};
static struct serio i8042_aux_port =
{
type: SERIO_8042,
write: i8042_aux_write,
open: i8042_open,
close: i8042_close,
driver: &i8042_aux_values,
name: "i8042 Aux Port",
phys: I8042_AUX_PHYS_DESC,
.type = SERIO_8042,
.write = i8042_aux_write,
.open = i8042_open,
.close = i8042_close,
.driver = &i8042_aux_values,
.name = "i8042 Aux Port",
.phys = I8042_AUX_PHYS_DESC,
};
/*
......
......@@ -97,11 +97,11 @@ static void parkbd_close(struct serio *port)
static struct serio parkbd_port =
{
write: parkbd_write,
open: parkbd_open,
close: parkbd_close,
name: parkbd_name,
phys: parkbd_phys,
.write = parkbd_write,
.open = parkbd_open,
.close = parkbd_close,
.name = parkbd_name,
.phys = parkbd_phys,
};
static void parkbd_interrupt(int irq, void *dev_id, struct pt_regs *regs)
......
......@@ -49,10 +49,10 @@ MODULE_LICENSE("GPL");
static struct serio q40kbd_port =
{
type: SERIO_8042,
write: NULL,
name: "Q40 PS/2 kbd port",
phys: "isa0060/serio0",
.type = SERIO_8042,
.write = NULL,
.name = "Q40 PS/2 kbd port",
.phys = "isa0060/serio0",
};
static void q40kbd_interrupt(int irq, void *dev_id, struct pt_regs *regs)
......
......@@ -55,10 +55,10 @@ static inline void rpckbd_write(unsigned char val)
static struct serio rpckbd_port =
{
type: SERIO_8042,
write: rpckbd_write,
name: "RiscPC PS/2 kbd port",
phys: "rpckbd/serio0",
.type = SERIO_8042,
.write = rpckbd_write,
.name = "RiscPC PS/2 kbd port",
.phys = "rpckbd/serio0",
};
static void rpckbd_rx(int irq, void *dev_id, struct pt_regs *regs)
......
......@@ -216,14 +216,14 @@ static void serport_ldisc_write_wakeup(struct tty_struct * tty)
*/
static struct tty_ldisc serport_ldisc = {
name: "input",
open: serport_ldisc_open,
close: serport_ldisc_close,
read: serport_ldisc_read,
ioctl: serport_ldisc_ioctl,
receive_buf: serport_ldisc_receive,
receive_room: serport_ldisc_room,
write_wakeup: serport_ldisc_write_wakeup
.name = "input",
.open = serport_ldisc_open,
.close = serport_ldisc_close,
.read = serport_ldisc_read,
.ioctl = serport_ldisc_ioctl,
.receive_buf = serport_ldisc_receive,
.receive_room = serport_ldisc_room,
.write_wakeup = serport_ldisc_write_wakeup
};
/*
......
......@@ -154,9 +154,9 @@ static void gunze_connect(struct serio *serio, struct serio_dev *dev)
*/
static struct serio_dev gunze_dev = {
interrupt: gunze_interrupt,
connect: gunze_connect,
disconnect: gunze_disconnect,
.interrupt = gunze_interrupt,
.connect = gunze_connect,
.disconnect = gunze_disconnect,
};
/*
......
......@@ -461,9 +461,9 @@ static void h3600ts_disconnect(struct serio *serio)
*/
static struct serio_dev h3600ts_dev = {
interrupt: h3600ts_interrupt,
connect: h3600ts_connect,
disconnect: h3600ts_disconnect,
.interrupt = h3600ts_interrupt,
.connect = h3600ts_connect,
.disconnect = h3600ts_disconnect,
};
/*
......
......@@ -218,13 +218,13 @@ static int tsdev_ioctl(struct inode *inode, struct file *file,
}
struct file_operations tsdev_fops = {
owner: THIS_MODULE,
open: tsdev_open,
release: tsdev_release,
read: tsdev_read,
poll: tsdev_poll,
fasync: tsdev_fasync,
ioctl: tsdev_ioctl,
.owner = THIS_MODULE,
.open = tsdev_open,
.release = tsdev_release,
.read = tsdev_read,
.poll = tsdev_poll,
.fasync = tsdev_fasync,
.ioctl = tsdev_ioctl,
};
static void tsdev_event(struct input_handle *handle, unsigned int type,
......@@ -411,13 +411,13 @@ static struct input_device_id tsdev_ids[] = {
MODULE_DEVICE_TABLE(input, tsdev_ids);
static struct input_handler tsdev_handler = {
event: tsdev_event,
connect: tsdev_connect,
disconnect: tsdev_disconnect,
fops: &tsdev_fops,
minor: TSDEV_MINOR_BASE,
name: "tsdev",
id_table: tsdev_ids,
.event = tsdev_event,
.connect = tsdev_connect,
.disconnect = tsdev_disconnect,
.fops = &tsdev_fops,
.minor = TSDEV_MINOR_BASE,
.name = "tsdev",
.id_table = tsdev_ids,
};
static int __init tsdev_init(void)
......
......@@ -351,20 +351,20 @@ static int uinput_ioctl(struct inode *inode, struct file *file, unsigned int cmd
}
struct file_operations uinput_fops = {
owner: THIS_MODULE,
open: uinput_open,
release: uinput_close,
read: uinput_read,
write: uinput_write,
poll: uinput_poll,
.owner = THIS_MODULE,
.open = uinput_open,
.release = uinput_close,
.read = uinput_read,
.write = uinput_write,
.poll = uinput_poll,
// fasync: uinput_fasync,
ioctl: uinput_ioctl,
.ioctl = uinput_ioctl,
};
static struct miscdevice uinput_misc = {
fops: &uinput_fops,
minor: UINPUT_MINOR,
name: UINPUT_NAME,
.fops = &uinput_fops,
.minor = UINPUT_MINOR,
.name = UINPUT_NAME,
};
static int __init uinput_init(void)
......
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