From: Dmitry Torokhov =================================================================== ChangeSet@1.1794, 2004-06-17 18:20:45-05:00, dtor_core@ameritech.net Input: more renames in serio in preparations to sysfs integration - serio_dev -> serio_driver - serio_[un]register_device -> serio_[un]register_driver Signed-off-by: Dmitry Torokhov drivers/input/joystick/iforce/iforce.h | 2 drivers/input/mouse/synaptics.c | 2 drivers/input/serio/serport.c | 2 =================================================================== Signed-off-by: Andrew Morton --- 25-akpm/drivers/input/joystick/iforce/iforce-main.c | 4 - 25-akpm/drivers/input/joystick/iforce/iforce-serio.c | 6 - 25-akpm/drivers/input/joystick/iforce/iforce.h | 2 25-akpm/drivers/input/joystick/magellan.c | 10 +- 25-akpm/drivers/input/joystick/spaceball.c | 10 +- 25-akpm/drivers/input/joystick/spaceorb.c | 10 +- 25-akpm/drivers/input/joystick/stinger.c | 10 +- 25-akpm/drivers/input/joystick/twidjoy.c | 10 +- 25-akpm/drivers/input/joystick/warrior.c | 10 +- 25-akpm/drivers/input/keyboard/atkbd.c | 14 +-- 25-akpm/drivers/input/keyboard/lkkbd.c | 10 +- 25-akpm/drivers/input/keyboard/newtonkbd.c | 10 +- 25-akpm/drivers/input/keyboard/sunkbd.c | 10 +- 25-akpm/drivers/input/keyboard/xtkbd.c | 10 +- 25-akpm/drivers/input/mouse/psmouse-base.c | 14 +-- 25-akpm/drivers/input/mouse/sermouse.c | 10 +- 25-akpm/drivers/input/mouse/synaptics.c | 2 25-akpm/drivers/input/mouse/vsxxxaa.c | 10 +- 25-akpm/drivers/input/serio/serio.c | 72 +++++++++---------- 25-akpm/drivers/input/serio/serport.c | 2 25-akpm/drivers/input/touchscreen/gunze.c | 10 +- 25-akpm/drivers/input/touchscreen/h3600_ts_input.c | 10 +- 25-akpm/include/linux/serio.h | 22 ++--- 23 files changed, 139 insertions(+), 139 deletions(-) diff -puN drivers/input/joystick/iforce/iforce.h~input-serio-renames-2 drivers/input/joystick/iforce/iforce.h --- 25/drivers/input/joystick/iforce/iforce.h~input-serio-renames-2 2004-06-23 21:44:22.226686864 -0700 +++ 25-akpm/drivers/input/joystick/iforce/iforce.h 2004-06-23 21:44:22.260681696 -0700 @@ -187,5 +187,5 @@ int iforce_upload_constant(struct iforce int iforce_upload_condition(struct iforce*, struct ff_effect*, int is_update); /* Public variables */ -extern struct serio_dev iforce_serio_dev; +extern struct serio_driver iforce_serio_drv; extern struct usb_driver iforce_usb_driver; diff -puN drivers/input/joystick/iforce/iforce-main.c~input-serio-renames-2 drivers/input/joystick/iforce/iforce-main.c --- 25/drivers/input/joystick/iforce/iforce-main.c~input-serio-renames-2 2004-06-23 21:44:22.228686560 -0700 +++ 25-akpm/drivers/input/joystick/iforce/iforce-main.c 2004-06-23 21:44:22.261681544 -0700 @@ -524,7 +524,7 @@ static int __init iforce_init(void) usb_register(&iforce_usb_driver); #endif #ifdef CONFIG_JOYSTICK_IFORCE_232 - serio_register_device(&iforce_serio_dev); + serio_register_driver(&iforce_serio_drv); #endif return 0; } @@ -535,7 +535,7 @@ static void __exit iforce_exit(void) usb_deregister(&iforce_usb_driver); #endif #ifdef CONFIG_JOYSTICK_IFORCE_232 - serio_unregister_device(&iforce_serio_dev); + serio_unregister_driver(&iforce_serio_drv); #endif } diff -puN drivers/input/joystick/iforce/iforce-serio.c~input-serio-renames-2 drivers/input/joystick/iforce/iforce-serio.c --- 25/drivers/input/joystick/iforce/iforce-serio.c~input-serio-renames-2 2004-06-23 21:44:22.229686408 -0700 +++ 25-akpm/drivers/input/joystick/iforce/iforce-serio.c 2004-06-23 21:44:22.261681544 -0700 @@ -124,7 +124,7 @@ out: return IRQ_HANDLED; } -static void iforce_serio_connect(struct serio *serio, struct serio_dev *dev) +static void iforce_serio_connect(struct serio *serio, struct serio_driver *drv) { struct iforce *iforce; if (serio->type != (SERIO_RS232 | SERIO_IFORCE)) @@ -137,7 +137,7 @@ static void iforce_serio_connect(struct iforce->serio = serio; serio->private = iforce; - if (serio_open(serio, dev)) { + if (serio_open(serio, drv)) { kfree(iforce); return; } @@ -158,7 +158,7 @@ static void iforce_serio_disconnect(stru kfree(iforce); } -struct serio_dev iforce_serio_dev = { +struct serio_driver iforce_serio_drv = { .write_wakeup = iforce_serio_write_wakeup, .interrupt = iforce_serio_irq, .connect = iforce_serio_connect, diff -puN drivers/input/joystick/magellan.c~input-serio-renames-2 drivers/input/joystick/magellan.c --- 25/drivers/input/joystick/magellan.c~input-serio-renames-2 2004-06-23 21:44:22.231686104 -0700 +++ 25-akpm/drivers/input/joystick/magellan.c 2004-06-23 21:44:22.262681392 -0700 @@ -146,7 +146,7 @@ static void magellan_disconnect(struct s * it as an input device. */ -static void magellan_connect(struct serio *serio, struct serio_dev *dev) +static void magellan_connect(struct serio *serio, struct serio_driver *drv) { struct magellan *magellan; int i, t; @@ -184,7 +184,7 @@ static void magellan_connect(struct seri serio->private = magellan; - if (serio_open(serio, dev)) { + if (serio_open(serio, drv)) { kfree(magellan); return; } @@ -199,7 +199,7 @@ static void magellan_connect(struct seri * The serio device structure. */ -static struct serio_dev magellan_dev = { +static struct serio_driver magellan_drv = { .interrupt = magellan_interrupt, .connect = magellan_connect, .disconnect = magellan_disconnect, @@ -211,13 +211,13 @@ static struct serio_dev magellan_dev = { int __init magellan_init(void) { - serio_register_device(&magellan_dev); + serio_register_driver(&magellan_drv); return 0; } void __exit magellan_exit(void) { - serio_unregister_device(&magellan_dev); + serio_unregister_driver(&magellan_drv); } module_init(magellan_init); diff -puN drivers/input/joystick/spaceball.c~input-serio-renames-2 drivers/input/joystick/spaceball.c --- 25/drivers/input/joystick/spaceball.c~input-serio-renames-2 2004-06-23 21:44:22.232685952 -0700 +++ 25-akpm/drivers/input/joystick/spaceball.c 2004-06-23 21:44:22.262681392 -0700 @@ -201,7 +201,7 @@ static void spaceball_disconnect(struct * it as an input device. */ -static void spaceball_connect(struct serio *serio, struct serio_dev *dev) +static void spaceball_connect(struct serio *serio, struct serio_driver *drv) { struct spaceball *spaceball; int i, t, id; @@ -254,7 +254,7 @@ static void spaceball_connect(struct ser serio->private = spaceball; - if (serio_open(serio, dev)) { + if (serio_open(serio, drv)) { kfree(spaceball); return; } @@ -269,7 +269,7 @@ static void spaceball_connect(struct ser * The serio device structure. */ -static struct serio_dev spaceball_dev = { +static struct serio_driver spaceball_drv = { .interrupt = spaceball_interrupt, .connect = spaceball_connect, .disconnect = spaceball_disconnect, @@ -281,13 +281,13 @@ static struct serio_dev spaceball_dev = int __init spaceball_init(void) { - serio_register_device(&spaceball_dev); + serio_register_driver(&spaceball_drv); return 0; } void __exit spaceball_exit(void) { - serio_unregister_device(&spaceball_dev); + serio_unregister_driver(&spaceball_drv); } module_init(spaceball_init); diff -puN drivers/input/joystick/spaceorb.c~input-serio-renames-2 drivers/input/joystick/spaceorb.c --- 25/drivers/input/joystick/spaceorb.c~input-serio-renames-2 2004-06-23 21:44:22.234685648 -0700 +++ 25-akpm/drivers/input/joystick/spaceorb.c 2004-06-23 21:44:22.263681240 -0700 @@ -162,7 +162,7 @@ static void spaceorb_disconnect(struct s * it as an input device. */ -static void spaceorb_connect(struct serio *serio, struct serio_dev *dev) +static void spaceorb_connect(struct serio *serio, struct serio_driver *drv) { struct spaceorb *spaceorb; int i, t; @@ -201,7 +201,7 @@ static void spaceorb_connect(struct seri serio->private = spaceorb; - if (serio_open(serio, dev)) { + if (serio_open(serio, drv)) { kfree(spaceorb); return; } @@ -213,7 +213,7 @@ static void spaceorb_connect(struct seri * The serio device structure. */ -static struct serio_dev spaceorb_dev = { +static struct serio_driver spaceorb_drv = { .interrupt = spaceorb_interrupt, .connect = spaceorb_connect, .disconnect = spaceorb_disconnect, @@ -225,13 +225,13 @@ static struct serio_dev spaceorb_dev = { int __init spaceorb_init(void) { - serio_register_device(&spaceorb_dev); + serio_register_driver(&spaceorb_drv); return 0; } void __exit spaceorb_exit(void) { - serio_unregister_device(&spaceorb_dev); + serio_unregister_driver(&spaceorb_drv); } module_init(spaceorb_init); diff -puN drivers/input/joystick/stinger.c~input-serio-renames-2 drivers/input/joystick/stinger.c --- 25/drivers/input/joystick/stinger.c~input-serio-renames-2 2004-06-23 21:44:22.235685496 -0700 +++ 25-akpm/drivers/input/joystick/stinger.c 2004-06-23 21:44:22.263681240 -0700 @@ -134,7 +134,7 @@ static void stinger_disconnect(struct se * it as an input device. */ -static void stinger_connect(struct serio *serio, struct serio_dev *dev) +static void stinger_connect(struct serio *serio, struct serio_driver *drv) { struct stinger *stinger; int i; @@ -172,7 +172,7 @@ static void stinger_connect(struct serio stinger->dev.private = stinger; serio->private = stinger; - if (serio_open(serio, dev)) { + if (serio_open(serio, drv)) { kfree(stinger); return; } @@ -187,7 +187,7 @@ static void stinger_connect(struct serio * The serio device structure. */ -static struct serio_dev stinger_dev = { +static struct serio_driver stinger_drv = { .interrupt = stinger_interrupt, .connect = stinger_connect, .disconnect = stinger_disconnect, @@ -199,13 +199,13 @@ static struct serio_dev stinger_dev = { int __init stinger_init(void) { - serio_register_device(&stinger_dev); + serio_register_driver(&stinger_drv); return 0; } void __exit stinger_exit(void) { - serio_unregister_device(&stinger_dev); + serio_unregister_driver(&stinger_drv); } module_init(stinger_init); diff -puN drivers/input/joystick/twidjoy.c~input-serio-renames-2 drivers/input/joystick/twidjoy.c --- 25/drivers/input/joystick/twidjoy.c~input-serio-renames-2 2004-06-23 21:44:22.236685344 -0700 +++ 25-akpm/drivers/input/joystick/twidjoy.c 2004-06-23 21:44:22.264681088 -0700 @@ -187,7 +187,7 @@ static void twidjoy_disconnect(struct se * it as an input device. */ -static void twidjoy_connect(struct serio *serio, struct serio_dev *dev) +static void twidjoy_connect(struct serio *serio, struct serio_driver *drv) { struct twidjoy_button_spec *bp; struct twidjoy *twidjoy; @@ -232,7 +232,7 @@ static void twidjoy_connect(struct serio twidjoy->dev.private = twidjoy; serio->private = twidjoy; - if (serio_open(serio, dev)) { + if (serio_open(serio, drv)) { kfree(twidjoy); return; } @@ -246,7 +246,7 @@ static void twidjoy_connect(struct serio * The serio device structure. */ -static struct serio_dev twidjoy_dev = { +static struct serio_driver twidjoy_drv = { .interrupt = twidjoy_interrupt, .connect = twidjoy_connect, .disconnect = twidjoy_disconnect, @@ -258,13 +258,13 @@ static struct serio_dev twidjoy_dev = { int __init twidjoy_init(void) { - serio_register_device(&twidjoy_dev); + serio_register_driver(&twidjoy_drv); return 0; } void __exit twidjoy_exit(void) { - serio_unregister_device(&twidjoy_dev); + serio_unregister_driver(&twidjoy_drv); } module_init(twidjoy_init); diff -puN drivers/input/joystick/warrior.c~input-serio-renames-2 drivers/input/joystick/warrior.c --- 25/drivers/input/joystick/warrior.c~input-serio-renames-2 2004-06-23 21:44:22.238685040 -0700 +++ 25-akpm/drivers/input/joystick/warrior.c 2004-06-23 21:44:22.264681088 -0700 @@ -139,7 +139,7 @@ static void warrior_disconnect(struct se * it as an input device. */ -static void warrior_connect(struct serio *serio, struct serio_dev *dev) +static void warrior_connect(struct serio *serio, struct serio_driver *drv) { struct warrior *warrior; int i; @@ -185,7 +185,7 @@ static void warrior_connect(struct serio serio->private = warrior; - if (serio_open(serio, dev)) { + if (serio_open(serio, drv)) { kfree(warrior); return; } @@ -199,7 +199,7 @@ static void warrior_connect(struct serio * The serio device structure. */ -static struct serio_dev warrior_dev = { +static struct serio_driver warrior_drv = { .interrupt = warrior_interrupt, .connect = warrior_connect, .disconnect = warrior_disconnect, @@ -211,13 +211,13 @@ static struct serio_dev warrior_dev = { int __init warrior_init(void) { - serio_register_device(&warrior_dev); + serio_register_driver(&warrior_drv); return 0; } void __exit warrior_exit(void) { - serio_unregister_device(&warrior_dev); + serio_unregister_driver(&warrior_drv); } module_init(warrior_init); diff -puN drivers/input/keyboard/atkbd.c~input-serio-renames-2 drivers/input/keyboard/atkbd.c --- 25/drivers/input/keyboard/atkbd.c~input-serio-renames-2 2004-06-23 21:44:22.239684888 -0700 +++ 25-akpm/drivers/input/keyboard/atkbd.c 2004-06-23 21:44:22.265680936 -0700 @@ -732,7 +732,7 @@ static void atkbd_disconnect(struct seri * to the input module. */ -static void atkbd_connect(struct serio *serio, struct serio_dev *dev) +static void atkbd_connect(struct serio *serio, struct serio_driver *drv) { struct atkbd *atkbd; int i; @@ -785,7 +785,7 @@ static void atkbd_connect(struct serio * serio->private = atkbd; - if (serio_open(serio, dev)) { + if (serio_open(serio, drv)) { kfree(atkbd); return; } @@ -861,10 +861,10 @@ static void atkbd_connect(struct serio * static int atkbd_reconnect(struct serio *serio) { struct atkbd *atkbd = serio->private; - struct serio_dev *dev = serio->dev; + struct serio_driver *drv = serio->drv; unsigned char param[1]; - if (!dev) { + if (!drv) { printk(KERN_DEBUG "atkbd: reconnect request, but serio is disconnected, ignoring...\n"); return -1; } @@ -890,7 +890,7 @@ static int atkbd_reconnect(struct serio return 0; } -static struct serio_dev atkbd_dev = { +static struct serio_driver atkbd_drv = { .interrupt = atkbd_interrupt, .connect = atkbd_connect, .reconnect = atkbd_reconnect, @@ -900,13 +900,13 @@ static struct serio_dev atkbd_dev = { int __init atkbd_init(void) { - serio_register_device(&atkbd_dev); + serio_register_driver(&atkbd_drv); return 0; } void __exit atkbd_exit(void) { - serio_unregister_device(&atkbd_dev); + serio_unregister_driver(&atkbd_drv); } module_init(atkbd_init); diff -puN drivers/input/keyboard/lkkbd.c~input-serio-renames-2 drivers/input/keyboard/lkkbd.c --- 25/drivers/input/keyboard/lkkbd.c~input-serio-renames-2 2004-06-23 21:44:22.241684584 -0700 +++ 25-akpm/drivers/input/keyboard/lkkbd.c 2004-06-23 21:44:22.266680784 -0700 @@ -622,7 +622,7 @@ lkkbd_reinit (void *data) * lkkbd_connect() probes for a LK keyboard and fills the necessary structures. */ static void -lkkbd_connect (struct serio *serio, struct serio_dev *dev) +lkkbd_connect (struct serio *serio, struct serio_driver *drv) { struct lkkbd *lk; int i; @@ -665,7 +665,7 @@ lkkbd_connect (struct serio *serio, stru serio->private = lk; - if (serio_open (serio, dev)) { + if (serio_open (serio, drv)) { kfree (lk); return; } @@ -703,7 +703,7 @@ lkkbd_disconnect (struct serio *serio) kfree (lk); } -static struct serio_dev lkkbd_dev = { +static struct serio_driver lkkbd_drv = { .connect = lkkbd_connect, .disconnect = lkkbd_disconnect, .interrupt = lkkbd_interrupt, @@ -715,14 +715,14 @@ static struct serio_dev lkkbd_dev = { int __init lkkbd_init (void) { - serio_register_device (&lkkbd_dev); + serio_register_driver(&lkkbd_drv); return 0; } void __exit lkkbd_exit (void) { - serio_unregister_device (&lkkbd_dev); + serio_unregister_driver(&lkkbd_drv); } module_init (lkkbd_init); diff -puN drivers/input/keyboard/newtonkbd.c~input-serio-renames-2 drivers/input/keyboard/newtonkbd.c --- 25/drivers/input/keyboard/newtonkbd.c~input-serio-renames-2 2004-06-23 21:44:22.242684432 -0700 +++ 25-akpm/drivers/input/keyboard/newtonkbd.c 2004-06-23 21:44:22.267680632 -0700 @@ -82,7 +82,7 @@ irqreturn_t nkbd_interrupt(struct serio } -void nkbd_connect(struct serio *serio, struct serio_dev *dev) +void nkbd_connect(struct serio *serio, struct serio_driver *drv) { struct nkbd *nkbd; int i; @@ -106,7 +106,7 @@ void nkbd_connect(struct serio *serio, s nkbd->dev.private = nkbd; serio->private = nkbd; - if (serio_open(serio, dev)) { + if (serio_open(serio, drv)) { kfree(nkbd); return; } @@ -138,7 +138,7 @@ void nkbd_disconnect(struct serio *serio kfree(nkbd); } -struct serio_dev nkbd_dev = { +struct serio_driver nkbd_drv = { .interrupt = nkbd_interrupt, .connect = nkbd_connect, .disconnect = nkbd_disconnect @@ -146,13 +146,13 @@ struct serio_dev nkbd_dev = { int __init nkbd_init(void) { - serio_register_device(&nkbd_dev); + serio_register_driver(&nkbd_drv); return 0; } void __exit nkbd_exit(void) { - serio_unregister_device(&nkbd_dev); + serio_unregister_driver(&nkbd_drv); } module_init(nkbd_init); diff -puN drivers/input/keyboard/sunkbd.c~input-serio-renames-2 drivers/input/keyboard/sunkbd.c --- 25/drivers/input/keyboard/sunkbd.c~input-serio-renames-2 2004-06-23 21:44:22.243684280 -0700 +++ 25-akpm/drivers/input/keyboard/sunkbd.c 2004-06-23 21:44:22.267680632 -0700 @@ -221,7 +221,7 @@ static void sunkbd_reinit(void *data) * sunkbd_connect() probes for a Sun keyboard and fills the necessary structures. */ -static void sunkbd_connect(struct serio *serio, struct serio_dev *dev) +static void sunkbd_connect(struct serio *serio, struct serio_driver *drv) { struct sunkbd *sunkbd; int i; @@ -257,7 +257,7 @@ static void sunkbd_connect(struct serio serio->private = sunkbd; - if (serio_open(serio, dev)) { + if (serio_open(serio, drv)) { kfree(sunkbd); return; } @@ -301,7 +301,7 @@ static void sunkbd_disconnect(struct ser kfree(sunkbd); } -static struct serio_dev sunkbd_dev = { +static struct serio_driver sunkbd_drv = { .interrupt = sunkbd_interrupt, .connect = sunkbd_connect, .disconnect = sunkbd_disconnect @@ -313,13 +313,13 @@ static struct serio_dev sunkbd_dev = { int __init sunkbd_init(void) { - serio_register_device(&sunkbd_dev); + serio_register_driver(&sunkbd_drv); return 0; } void __exit sunkbd_exit(void) { - serio_unregister_device(&sunkbd_dev); + serio_unregister_driver(&sunkbd_drv); } module_init(sunkbd_init); diff -puN drivers/input/keyboard/xtkbd.c~input-serio-renames-2 drivers/input/keyboard/xtkbd.c --- 25/drivers/input/keyboard/xtkbd.c~input-serio-renames-2 2004-06-23 21:44:22.244684128 -0700 +++ 25-akpm/drivers/input/keyboard/xtkbd.c 2004-06-23 21:44:22.268680480 -0700 @@ -86,7 +86,7 @@ irqreturn_t xtkbd_interrupt(struct serio return IRQ_HANDLED; } -void xtkbd_connect(struct serio *serio, struct serio_dev *dev) +void xtkbd_connect(struct serio *serio, struct serio_driver *drv) { struct xtkbd *xtkbd; int i; @@ -111,7 +111,7 @@ void xtkbd_connect(struct serio *serio, serio->private = xtkbd; - if (serio_open(serio, dev)) { + if (serio_open(serio, drv)) { kfree(xtkbd); return; } @@ -143,7 +143,7 @@ void xtkbd_disconnect(struct serio *seri kfree(xtkbd); } -struct serio_dev xtkbd_dev = { +struct serio_driver xtkbd_drv = { .interrupt = xtkbd_interrupt, .connect = xtkbd_connect, .disconnect = xtkbd_disconnect @@ -151,13 +151,13 @@ struct serio_dev xtkbd_dev = { int __init xtkbd_init(void) { - serio_register_device(&xtkbd_dev); + serio_register_driver(&xtkbd_drv); return 0; } void __exit xtkbd_exit(void) { - serio_unregister_device(&xtkbd_dev); + serio_unregister_driver(&xtkbd_drv); } module_init(xtkbd_init); diff -puN drivers/input/mouse/psmouse-base.c~input-serio-renames-2 drivers/input/mouse/psmouse-base.c --- 25/drivers/input/mouse/psmouse-base.c~input-serio-renames-2 2004-06-23 21:44:22.246683824 -0700 +++ 25-akpm/drivers/input/mouse/psmouse-base.c 2004-06-23 21:44:22.269680328 -0700 @@ -698,7 +698,7 @@ static void psmouse_disconnect(struct se * psmouse_connect() is a callback from the serio module when * an unhandled serio port is found. */ -static void psmouse_connect(struct serio *serio, struct serio_dev *dev) +static void psmouse_connect(struct serio *serio, struct serio_driver *drv) { struct psmouse *psmouse; @@ -720,7 +720,7 @@ static void psmouse_connect(struct serio psmouse_set_state(psmouse, PSMOUSE_CMD_MODE); serio->private = psmouse; - if (serio_open(serio, dev)) { + if (serio_open(serio, drv)) { kfree(psmouse); serio->private = NULL; return; @@ -773,9 +773,9 @@ static void psmouse_connect(struct serio static int psmouse_reconnect(struct serio *serio) { struct psmouse *psmouse = serio->private; - struct serio_dev *dev = serio->dev; + struct serio_driver *drv = serio->drv; - if (!dev || !psmouse) { + if (!drv || !psmouse) { printk(KERN_DEBUG "psmouse: reconnect request, but serio is disconnected, ignoring...\n"); return -1; } @@ -808,7 +808,7 @@ static int psmouse_reconnect(struct seri } -static struct serio_dev psmouse_dev = { +static struct serio_driver psmouse_drv = { .interrupt = psmouse_interrupt, .connect = psmouse_connect, .reconnect = psmouse_reconnect, @@ -833,13 +833,13 @@ static inline void psmouse_parse_proto(v int __init psmouse_init(void) { psmouse_parse_proto(); - serio_register_device(&psmouse_dev); + serio_register_driver(&psmouse_drv); return 0; } void __exit psmouse_exit(void) { - serio_unregister_device(&psmouse_dev); + serio_unregister_driver(&psmouse_drv); } module_init(psmouse_init); diff -puN drivers/input/mouse/sermouse.c~input-serio-renames-2 drivers/input/mouse/sermouse.c --- 25/drivers/input/mouse/sermouse.c~input-serio-renames-2 2004-06-23 21:44:22.247683672 -0700 +++ 25-akpm/drivers/input/mouse/sermouse.c 2004-06-23 21:44:22.270680176 -0700 @@ -237,7 +237,7 @@ static void sermouse_disconnect(struct s * an unhandled serio port is found. */ -static void sermouse_connect(struct serio *serio, struct serio_dev *dev) +static void sermouse_connect(struct serio *serio, struct serio_driver *drv) { struct sermouse *sermouse; unsigned char c; @@ -279,7 +279,7 @@ static void sermouse_connect(struct seri sermouse->dev.id.product = c; sermouse->dev.id.version = 0x0100; - if (serio_open(serio, dev)) { + if (serio_open(serio, drv)) { kfree(sermouse); return; } @@ -289,7 +289,7 @@ static void sermouse_connect(struct seri printk(KERN_INFO "input: %s on %s\n", sermouse_protocols[sermouse->type], serio->phys); } -static struct serio_dev sermouse_dev = { +static struct serio_driver sermouse_drv = { .interrupt = sermouse_interrupt, .connect = sermouse_connect, .disconnect = sermouse_disconnect @@ -297,13 +297,13 @@ static struct serio_dev sermouse_dev = { int __init sermouse_init(void) { - serio_register_device(&sermouse_dev); + serio_register_driver(&sermouse_drv); return 0; } void __exit sermouse_exit(void) { - serio_unregister_device(&sermouse_dev); + serio_unregister_driver(&sermouse_drv); } module_init(sermouse_init); diff -puN drivers/input/mouse/synaptics.c~input-serio-renames-2 drivers/input/mouse/synaptics.c --- 25/drivers/input/mouse/synaptics.c~input-serio-renames-2 2004-06-23 21:44:22.248683520 -0700 +++ 25-akpm/drivers/input/mouse/synaptics.c 2004-06-23 21:44:22.271680024 -0700 @@ -470,7 +470,7 @@ static psmouse_ret_t synaptics_process_b if (unlikely(priv->pkt_type == SYN_NEWABS)) priv->pkt_type = synaptics_detect_pkt_type(psmouse); - if (psmouse->ptport && psmouse->ptport->serio.dev && synaptics_is_pt_packet(psmouse->packet)) + if (psmouse->ptport && psmouse->ptport->serio.drv && synaptics_is_pt_packet(psmouse->packet)) synaptics_pass_pt_packet(&psmouse->ptport->serio, psmouse->packet); else synaptics_process_packet(psmouse); diff -puN drivers/input/mouse/vsxxxaa.c~input-serio-renames-2 drivers/input/mouse/vsxxxaa.c --- 25/drivers/input/mouse/vsxxxaa.c~input-serio-renames-2 2004-06-23 21:44:22.250683216 -0700 +++ 25-akpm/drivers/input/mouse/vsxxxaa.c 2004-06-23 21:44:22.271680024 -0700 @@ -482,7 +482,7 @@ vsxxxaa_disconnect (struct serio *serio) } static void -vsxxxaa_connect (struct serio *serio, struct serio_dev *dev) +vsxxxaa_connect (struct serio *serio, struct serio_driver *drv) { struct vsxxxaa *mouse; @@ -524,7 +524,7 @@ vsxxxaa_connect (struct serio *serio, st mouse->dev.id.bustype = BUS_RS232; mouse->serio = serio; - if (serio_open (serio, dev)) { + if (serio_open (serio, drv)) { kfree (mouse); return; } @@ -540,7 +540,7 @@ vsxxxaa_connect (struct serio *serio, st printk (KERN_INFO "input: %s on %s\n", mouse->name, mouse->phys); } -static struct serio_dev vsxxxaa_dev = { +static struct serio_driver vsxxxaa_drv = { .connect = vsxxxaa_connect, .interrupt = vsxxxaa_interrupt, .disconnect = vsxxxaa_disconnect, @@ -549,14 +549,14 @@ static struct serio_dev vsxxxaa_dev = { int __init vsxxxaa_init (void) { - serio_register_device (&vsxxxaa_dev); + serio_register_driver(&vsxxxaa_drv); return 0; } void __exit vsxxxaa_exit (void) { - serio_unregister_device (&vsxxxaa_dev); + serio_unregister_driver(&vsxxxaa_drv); } module_init (vsxxxaa_init); diff -puN drivers/input/serio/serio.c~input-serio-renames-2 drivers/input/serio/serio.c --- 25/drivers/input/serio/serio.c~input-serio-renames-2 2004-06-23 21:44:22.251683064 -0700 +++ 25-akpm/drivers/input/serio/serio.c 2004-06-23 21:44:22.273679720 -0700 @@ -48,27 +48,27 @@ EXPORT_SYMBOL(__serio_register_port); EXPORT_SYMBOL(serio_unregister_port); EXPORT_SYMBOL(serio_unregister_port_delayed); EXPORT_SYMBOL(__serio_unregister_port); -EXPORT_SYMBOL(serio_register_device); -EXPORT_SYMBOL(serio_unregister_device); +EXPORT_SYMBOL(serio_register_driver); +EXPORT_SYMBOL(serio_unregister_driver); EXPORT_SYMBOL(serio_open); EXPORT_SYMBOL(serio_close); EXPORT_SYMBOL(serio_rescan); EXPORT_SYMBOL(serio_reconnect); -static DECLARE_MUTEX(serio_sem); /* protects serio_list and serio_dev_list */ +static DECLARE_MUTEX(serio_sem); /* protects serio_list and serio_diriver_list */ static LIST_HEAD(serio_list); -static LIST_HEAD(serio_dev_list); +static LIST_HEAD(serio_driver_list); -/* serio_find_dev() must be called with serio_sem down. */ +/* serio_find_driver() must be called with serio_sem down. */ -static void serio_find_dev(struct serio *serio) +static void serio_find_driver(struct serio *serio) { - struct serio_dev *dev; + struct serio_driver *drv; - list_for_each_entry(dev, &serio_dev_list, node) { - if (serio->dev) + list_for_each_entry(drv, &serio_driver_list, node) { + if (serio->drv) break; - dev->connect(serio, dev); + drv->connect(serio, drv); } } @@ -153,15 +153,15 @@ static void serio_handle_events(void) break; case SERIO_RECONNECT : - if (event->serio->dev && event->serio->dev->reconnect) - if (event->serio->dev->reconnect(event->serio) == 0) + if (event->serio->drv && event->serio->drv->reconnect) + if (event->serio->drv->reconnect(event->serio) == 0) break; /* reconnect failed - fall through to rescan */ case SERIO_RESCAN : - if (event->serio->dev) - event->serio->dev->disconnect(event->serio); - serio_find_dev(event->serio); + if (event->serio->drv) + event->serio->drv->disconnect(event->serio); + serio_find_driver(event->serio); break; default: break; @@ -252,7 +252,7 @@ void __serio_register_port(struct serio { spin_lock_init(&serio->lock); list_add_tail(&serio->node, &serio_list); - serio_find_dev(serio); + serio_find_driver(serio); } void serio_unregister_port(struct serio *serio) @@ -281,58 +281,58 @@ void __serio_unregister_port(struct seri { serio_remove_pending_events(serio); list_del_init(&serio->node); - if (serio->dev) - serio->dev->disconnect(serio); + if (serio->drv) + serio->drv->disconnect(serio); } /* - * Serio device operations + * Serio driver operations */ -void serio_register_device(struct serio_dev *dev) +void serio_register_driver(struct serio_driver *drv) { struct serio *serio; down(&serio_sem); - list_add_tail(&dev->node, &serio_dev_list); + list_add_tail(&drv->node, &serio_driver_list); list_for_each_entry(serio, &serio_list, node) - if (!serio->dev) - dev->connect(serio, dev); + if (!serio->drv) + drv->connect(serio, drv); up(&serio_sem); } -void serio_unregister_device(struct serio_dev *dev) +void serio_unregister_driver(struct serio_driver *drv) { struct serio *serio; down(&serio_sem); - list_del_init(&dev->node); + list_del_init(&drv->node); list_for_each_entry(serio, &serio_list, node) { - if (serio->dev == dev) - dev->disconnect(serio); - serio_find_dev(serio); + if (serio->drv == drv) + drv->disconnect(serio); + serio_find_driver(serio); } up(&serio_sem); } -/* called from serio_dev->connect/disconnect methods under serio_sem */ -int serio_open(struct serio *serio, struct serio_dev *dev) +/* called from serio_driver->connect/disconnect methods under serio_sem */ +int serio_open(struct serio *serio, struct serio_driver *drv) { unsigned long flags; spin_lock_irqsave(&serio->lock, flags); - serio->dev = dev; + serio->drv = drv; spin_unlock_irqrestore(&serio->lock, flags); if (serio->open && serio->open(serio)) { spin_lock_irqsave(&serio->lock, flags); - serio->dev = NULL; + serio->drv = NULL; spin_unlock_irqrestore(&serio->lock, flags); return -1; } return 0; } -/* called from serio_dev->connect/disconnect methods under serio_sem */ +/* called from serio_driver->connect/disconnect methods under serio_sem */ void serio_close(struct serio *serio) { unsigned long flags; @@ -340,7 +340,7 @@ void serio_close(struct serio *serio) if (serio->close) serio->close(serio); spin_lock_irqsave(&serio->lock, flags); - serio->dev = NULL; + serio->drv = NULL; spin_unlock_irqrestore(&serio->lock, flags); } @@ -352,8 +352,8 @@ irqreturn_t serio_interrupt(struct serio spin_lock_irqsave(&serio->lock, flags); - if (likely(serio->dev)) { - ret = serio->dev->interrupt(serio, data, dfl, regs); + if (likely(serio->drv)) { + ret = serio->drv->interrupt(serio, data, dfl, regs); } else { if (!dfl) { if ((serio->type != SERIO_8042 && diff -puN drivers/input/serio/serport.c~input-serio-renames-2 drivers/input/serio/serport.c --- 25/drivers/input/serio/serport.c~input-serio-renames-2 2004-06-23 21:44:22.252682912 -0700 +++ 25-akpm/drivers/input/serio/serport.c 2004-06-23 21:44:22.273679720 -0700 @@ -170,7 +170,7 @@ static void serport_ldisc_write_wakeup(s { struct serport *sp = (struct serport *) tty->disc_data; - serio_dev_write_wakeup(&sp->serio); + serio_drv_write_wakeup(&sp->serio); } /* diff -puN drivers/input/touchscreen/gunze.c~input-serio-renames-2 drivers/input/touchscreen/gunze.c --- 25/drivers/input/touchscreen/gunze.c~input-serio-renames-2 2004-06-23 21:44:22.254682608 -0700 +++ 25-akpm/drivers/input/touchscreen/gunze.c 2004-06-23 21:44:22.274679568 -0700 @@ -111,7 +111,7 @@ static void gunze_disconnect(struct seri * and if yes, registers it as an input device. */ -static void gunze_connect(struct serio *serio, struct serio_dev *dev) +static void gunze_connect(struct serio *serio, struct serio_driver *drv) { struct gunze *gunze; @@ -142,7 +142,7 @@ static void gunze_connect(struct serio * gunze->dev.id.product = 0x0051; gunze->dev.id.version = 0x0100; - if (serio_open(serio, dev)) { + if (serio_open(serio, drv)) { kfree(gunze); return; } @@ -156,7 +156,7 @@ static void gunze_connect(struct serio * * The serio device structure. */ -static struct serio_dev gunze_dev = { +static struct serio_driver gunze_drv = { .interrupt = gunze_interrupt, .connect = gunze_connect, .disconnect = gunze_disconnect, @@ -168,13 +168,13 @@ static struct serio_dev gunze_dev = { int __init gunze_init(void) { - serio_register_device(&gunze_dev); + serio_register_driver(&gunze_drv); return 0; } void __exit gunze_exit(void) { - serio_unregister_device(&gunze_dev); + serio_unregister_driver(&gunze_drv); } module_init(gunze_init); diff -puN drivers/input/touchscreen/h3600_ts_input.c~input-serio-renames-2 drivers/input/touchscreen/h3600_ts_input.c --- 25/drivers/input/touchscreen/h3600_ts_input.c~input-serio-renames-2 2004-06-23 21:44:22.255682456 -0700 +++ 25-akpm/drivers/input/touchscreen/h3600_ts_input.c 2004-06-23 21:44:22.274679568 -0700 @@ -373,7 +373,7 @@ static irqreturn_t h3600ts_interrupt(str * new serio device. It looks whether it was registered as a H3600 touchscreen * and if yes, registers it as an input device. */ -static void h3600ts_connect(struct serio *serio, struct serio_dev *dev) +static void h3600ts_connect(struct serio *serio, struct serio_driver *drv) { struct h3600_dev *ts; @@ -441,7 +441,7 @@ static void h3600ts_connect(struct serio ts->dev.id.product = 0x0666; /* FIXME !!! We can ask the hardware */ ts->dev.id.version = 0x0100; - if (serio_open(serio, dev)) { + if (serio_open(serio, drv)) { free_irq(IRQ_GPIO_BITSY_ACTION_BUTTON, ts); free_irq(IRQ_GPIO_BITSY_NPOWER_BUTTON, ts); kfree(ts); @@ -478,7 +478,7 @@ static void h3600ts_disconnect(struct se * The serio device structure. */ -static struct serio_dev h3600ts_dev = { +static struct serio_driver h3600ts_drv = { .interrupt = h3600ts_interrupt, .connect = h3600ts_connect, .disconnect = h3600ts_disconnect, @@ -490,13 +490,13 @@ static struct serio_dev h3600ts_dev = { static int __init h3600ts_init(void) { - serio_register_device(&h3600ts_dev); + serio_register_driver(&h3600ts_drv); return 0; } static void __exit h3600ts_exit(void) { - serio_unregister_device(&h3600ts_dev); + serio_unregister_driver(&h3600ts_drv); } module_init(h3600ts_init); diff -puN include/linux/serio.h~input-serio-renames-2 include/linux/serio.h --- 25/include/linux/serio.h~input-serio-renames-2 2004-06-23 21:44:22.256682304 -0700 +++ 25-akpm/include/linux/serio.h 2004-06-23 21:44:22.275679416 -0700 @@ -39,19 +39,19 @@ struct serio { int (*open)(struct serio *); void (*close)(struct serio *); - struct serio_dev *dev; /* Accessed from interrupt, writes must be protected by serio_lock */ + struct serio_driver *drv; /* Accessed from interrupt, writes must be protected by serio_lock */ struct list_head node; }; -struct serio_dev { +struct serio_driver { void *private; char *name; void (*write_wakeup)(struct serio *); irqreturn_t (*interrupt)(struct serio *, unsigned char, unsigned int, struct pt_regs *); - void (*connect)(struct serio *, struct serio_dev *dev); + void (*connect)(struct serio *, struct serio_driver *drv); int (*reconnect)(struct serio *); void (*disconnect)(struct serio *); void (*cleanup)(struct serio *); @@ -59,7 +59,7 @@ struct serio_dev { struct list_head node; }; -int serio_open(struct serio *serio, struct serio_dev *dev); +int serio_open(struct serio *serio, struct serio_driver *drv); void serio_close(struct serio *serio); void serio_rescan(struct serio *serio); void serio_reconnect(struct serio *serio); @@ -71,8 +71,8 @@ void __serio_register_port(struct serio void serio_unregister_port(struct serio *serio); void serio_unregister_port_delayed(struct serio *serio); void __serio_unregister_port(struct serio *serio); -void serio_register_device(struct serio_dev *dev); -void serio_unregister_device(struct serio_dev *dev); +void serio_register_driver(struct serio_driver *drv); +void serio_unregister_driver(struct serio_driver *drv); static __inline__ int serio_write(struct serio *serio, unsigned char data) { @@ -82,16 +82,16 @@ static __inline__ int serio_write(struct return -1; } -static __inline__ void serio_dev_write_wakeup(struct serio *serio) +static __inline__ void serio_drv_write_wakeup(struct serio *serio) { - if (serio->dev && serio->dev->write_wakeup) - serio->dev->write_wakeup(serio); + if (serio->drv && serio->drv->write_wakeup) + serio->drv->write_wakeup(serio); } static __inline__ void serio_cleanup(struct serio *serio) { - if (serio->dev && serio->dev->cleanup) - serio->dev->cleanup(serio); + if (serio->drv && serio->drv->cleanup) + serio->drv->cleanup(serio); } #endif _