Commit 0669ebea authored by Dmitry Torokhov's avatar Dmitry Torokhov

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: default avatarDmitry Torokhov <dtor@mail.ru>
parent 7990a353
...@@ -524,7 +524,7 @@ static int __init iforce_init(void) ...@@ -524,7 +524,7 @@ static int __init iforce_init(void)
usb_register(&iforce_usb_driver); usb_register(&iforce_usb_driver);
#endif #endif
#ifdef CONFIG_JOYSTICK_IFORCE_232 #ifdef CONFIG_JOYSTICK_IFORCE_232
serio_register_device(&iforce_serio_dev); serio_register_driver(&iforce_serio_drv);
#endif #endif
return 0; return 0;
} }
...@@ -535,7 +535,7 @@ static void __exit iforce_exit(void) ...@@ -535,7 +535,7 @@ static void __exit iforce_exit(void)
usb_deregister(&iforce_usb_driver); usb_deregister(&iforce_usb_driver);
#endif #endif
#ifdef CONFIG_JOYSTICK_IFORCE_232 #ifdef CONFIG_JOYSTICK_IFORCE_232
serio_unregister_device(&iforce_serio_dev); serio_unregister_driver(&iforce_serio_drv);
#endif #endif
} }
......
...@@ -124,7 +124,7 @@ static irqreturn_t iforce_serio_irq(struct serio *serio, ...@@ -124,7 +124,7 @@ static irqreturn_t iforce_serio_irq(struct serio *serio,
return IRQ_HANDLED; 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; struct iforce *iforce;
if (serio->type != (SERIO_RS232 | SERIO_IFORCE)) if (serio->type != (SERIO_RS232 | SERIO_IFORCE))
...@@ -137,7 +137,7 @@ static void iforce_serio_connect(struct serio *serio, struct serio_dev *dev) ...@@ -137,7 +137,7 @@ static void iforce_serio_connect(struct serio *serio, struct serio_dev *dev)
iforce->serio = serio; iforce->serio = serio;
serio->private = iforce; serio->private = iforce;
if (serio_open(serio, dev)) { if (serio_open(serio, drv)) {
kfree(iforce); kfree(iforce);
return; return;
} }
...@@ -158,7 +158,7 @@ static void iforce_serio_disconnect(struct serio *serio) ...@@ -158,7 +158,7 @@ static void iforce_serio_disconnect(struct serio *serio)
kfree(iforce); kfree(iforce);
} }
struct serio_dev iforce_serio_dev = { struct serio_driver iforce_serio_drv = {
.write_wakeup = iforce_serio_write_wakeup, .write_wakeup = iforce_serio_write_wakeup,
.interrupt = iforce_serio_irq, .interrupt = iforce_serio_irq,
.connect = iforce_serio_connect, .connect = iforce_serio_connect,
......
...@@ -187,5 +187,5 @@ int iforce_upload_constant(struct iforce*, struct ff_effect*, int is_update); ...@@ -187,5 +187,5 @@ int iforce_upload_constant(struct iforce*, struct ff_effect*, int is_update);
int iforce_upload_condition(struct iforce*, struct ff_effect*, int is_update); int iforce_upload_condition(struct iforce*, struct ff_effect*, int is_update);
/* Public variables */ /* Public variables */
extern struct serio_dev iforce_serio_dev; extern struct serio_driver iforce_serio_drv;
extern struct usb_driver iforce_usb_driver; extern struct usb_driver iforce_usb_driver;
...@@ -146,7 +146,7 @@ static void magellan_disconnect(struct serio *serio) ...@@ -146,7 +146,7 @@ static void magellan_disconnect(struct serio *serio)
* it as an input device. * 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; struct magellan *magellan;
int i, t; int i, t;
...@@ -184,7 +184,7 @@ static void magellan_connect(struct serio *serio, struct serio_dev *dev) ...@@ -184,7 +184,7 @@ static void magellan_connect(struct serio *serio, struct serio_dev *dev)
serio->private = magellan; serio->private = magellan;
if (serio_open(serio, dev)) { if (serio_open(serio, drv)) {
kfree(magellan); kfree(magellan);
return; return;
} }
...@@ -199,7 +199,7 @@ static void magellan_connect(struct serio *serio, struct serio_dev *dev) ...@@ -199,7 +199,7 @@ static void magellan_connect(struct serio *serio, struct serio_dev *dev)
* The serio device structure. * The serio device structure.
*/ */
static struct serio_dev magellan_dev = { static struct serio_driver magellan_drv = {
.interrupt = magellan_interrupt, .interrupt = magellan_interrupt,
.connect = magellan_connect, .connect = magellan_connect,
.disconnect = magellan_disconnect, .disconnect = magellan_disconnect,
...@@ -211,13 +211,13 @@ static struct serio_dev magellan_dev = { ...@@ -211,13 +211,13 @@ static struct serio_dev magellan_dev = {
int __init magellan_init(void) int __init magellan_init(void)
{ {
serio_register_device(&magellan_dev); serio_register_driver(&magellan_drv);
return 0; return 0;
} }
void __exit magellan_exit(void) void __exit magellan_exit(void)
{ {
serio_unregister_device(&magellan_dev); serio_unregister_driver(&magellan_drv);
} }
module_init(magellan_init); module_init(magellan_init);
......
...@@ -201,7 +201,7 @@ static void spaceball_disconnect(struct serio *serio) ...@@ -201,7 +201,7 @@ static void spaceball_disconnect(struct serio *serio)
* it as an input device. * 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; struct spaceball *spaceball;
int i, t, id; int i, t, id;
...@@ -254,7 +254,7 @@ static void spaceball_connect(struct serio *serio, struct serio_dev *dev) ...@@ -254,7 +254,7 @@ static void spaceball_connect(struct serio *serio, struct serio_dev *dev)
serio->private = spaceball; serio->private = spaceball;
if (serio_open(serio, dev)) { if (serio_open(serio, drv)) {
kfree(spaceball); kfree(spaceball);
return; return;
} }
...@@ -269,7 +269,7 @@ static void spaceball_connect(struct serio *serio, struct serio_dev *dev) ...@@ -269,7 +269,7 @@ static void spaceball_connect(struct serio *serio, struct serio_dev *dev)
* The serio device structure. * The serio device structure.
*/ */
static struct serio_dev spaceball_dev = { static struct serio_driver spaceball_drv = {
.interrupt = spaceball_interrupt, .interrupt = spaceball_interrupt,
.connect = spaceball_connect, .connect = spaceball_connect,
.disconnect = spaceball_disconnect, .disconnect = spaceball_disconnect,
...@@ -281,13 +281,13 @@ static struct serio_dev spaceball_dev = { ...@@ -281,13 +281,13 @@ static struct serio_dev spaceball_dev = {
int __init spaceball_init(void) int __init spaceball_init(void)
{ {
serio_register_device(&spaceball_dev); serio_register_driver(&spaceball_drv);
return 0; return 0;
} }
void __exit spaceball_exit(void) void __exit spaceball_exit(void)
{ {
serio_unregister_device(&spaceball_dev); serio_unregister_driver(&spaceball_drv);
} }
module_init(spaceball_init); module_init(spaceball_init);
......
...@@ -162,7 +162,7 @@ static void spaceorb_disconnect(struct serio *serio) ...@@ -162,7 +162,7 @@ static void spaceorb_disconnect(struct serio *serio)
* it as an input device. * 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; struct spaceorb *spaceorb;
int i, t; int i, t;
...@@ -201,7 +201,7 @@ static void spaceorb_connect(struct serio *serio, struct serio_dev *dev) ...@@ -201,7 +201,7 @@ static void spaceorb_connect(struct serio *serio, struct serio_dev *dev)
serio->private = spaceorb; serio->private = spaceorb;
if (serio_open(serio, dev)) { if (serio_open(serio, drv)) {
kfree(spaceorb); kfree(spaceorb);
return; return;
} }
...@@ -213,7 +213,7 @@ static void spaceorb_connect(struct serio *serio, struct serio_dev *dev) ...@@ -213,7 +213,7 @@ static void spaceorb_connect(struct serio *serio, struct serio_dev *dev)
* The serio device structure. * The serio device structure.
*/ */
static struct serio_dev spaceorb_dev = { static struct serio_driver spaceorb_drv = {
.interrupt = spaceorb_interrupt, .interrupt = spaceorb_interrupt,
.connect = spaceorb_connect, .connect = spaceorb_connect,
.disconnect = spaceorb_disconnect, .disconnect = spaceorb_disconnect,
...@@ -225,13 +225,13 @@ static struct serio_dev spaceorb_dev = { ...@@ -225,13 +225,13 @@ static struct serio_dev spaceorb_dev = {
int __init spaceorb_init(void) int __init spaceorb_init(void)
{ {
serio_register_device(&spaceorb_dev); serio_register_driver(&spaceorb_drv);
return 0; return 0;
} }
void __exit spaceorb_exit(void) void __exit spaceorb_exit(void)
{ {
serio_unregister_device(&spaceorb_dev); serio_unregister_driver(&spaceorb_drv);
} }
module_init(spaceorb_init); module_init(spaceorb_init);
......
...@@ -134,7 +134,7 @@ static void stinger_disconnect(struct serio *serio) ...@@ -134,7 +134,7 @@ static void stinger_disconnect(struct serio *serio)
* it as an input device. * 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; struct stinger *stinger;
int i; int i;
...@@ -172,7 +172,7 @@ static void stinger_connect(struct serio *serio, struct serio_dev *dev) ...@@ -172,7 +172,7 @@ static void stinger_connect(struct serio *serio, struct serio_dev *dev)
stinger->dev.private = stinger; stinger->dev.private = stinger;
serio->private = stinger; serio->private = stinger;
if (serio_open(serio, dev)) { if (serio_open(serio, drv)) {
kfree(stinger); kfree(stinger);
return; return;
} }
...@@ -187,7 +187,7 @@ static void stinger_connect(struct serio *serio, struct serio_dev *dev) ...@@ -187,7 +187,7 @@ static void stinger_connect(struct serio *serio, struct serio_dev *dev)
* The serio device structure. * The serio device structure.
*/ */
static struct serio_dev stinger_dev = { static struct serio_driver stinger_drv = {
.interrupt = stinger_interrupt, .interrupt = stinger_interrupt,
.connect = stinger_connect, .connect = stinger_connect,
.disconnect = stinger_disconnect, .disconnect = stinger_disconnect,
...@@ -199,13 +199,13 @@ static struct serio_dev stinger_dev = { ...@@ -199,13 +199,13 @@ static struct serio_dev stinger_dev = {
int __init stinger_init(void) int __init stinger_init(void)
{ {
serio_register_device(&stinger_dev); serio_register_driver(&stinger_drv);
return 0; return 0;
} }
void __exit stinger_exit(void) void __exit stinger_exit(void)
{ {
serio_unregister_device(&stinger_dev); serio_unregister_driver(&stinger_drv);
} }
module_init(stinger_init); module_init(stinger_init);
......
...@@ -187,7 +187,7 @@ static void twidjoy_disconnect(struct serio *serio) ...@@ -187,7 +187,7 @@ static void twidjoy_disconnect(struct serio *serio)
* it as an input device. * 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_button_spec *bp;
struct twidjoy *twidjoy; struct twidjoy *twidjoy;
...@@ -232,7 +232,7 @@ static void twidjoy_connect(struct serio *serio, struct serio_dev *dev) ...@@ -232,7 +232,7 @@ static void twidjoy_connect(struct serio *serio, struct serio_dev *dev)
twidjoy->dev.private = twidjoy; twidjoy->dev.private = twidjoy;
serio->private = twidjoy; serio->private = twidjoy;
if (serio_open(serio, dev)) { if (serio_open(serio, drv)) {
kfree(twidjoy); kfree(twidjoy);
return; return;
} }
...@@ -246,7 +246,7 @@ static void twidjoy_connect(struct serio *serio, struct serio_dev *dev) ...@@ -246,7 +246,7 @@ static void twidjoy_connect(struct serio *serio, struct serio_dev *dev)
* The serio device structure. * The serio device structure.
*/ */
static struct serio_dev twidjoy_dev = { static struct serio_driver twidjoy_drv = {
.interrupt = twidjoy_interrupt, .interrupt = twidjoy_interrupt,
.connect = twidjoy_connect, .connect = twidjoy_connect,
.disconnect = twidjoy_disconnect, .disconnect = twidjoy_disconnect,
...@@ -258,13 +258,13 @@ static struct serio_dev twidjoy_dev = { ...@@ -258,13 +258,13 @@ static struct serio_dev twidjoy_dev = {
int __init twidjoy_init(void) int __init twidjoy_init(void)
{ {
serio_register_device(&twidjoy_dev); serio_register_driver(&twidjoy_drv);
return 0; return 0;
} }
void __exit twidjoy_exit(void) void __exit twidjoy_exit(void)
{ {
serio_unregister_device(&twidjoy_dev); serio_unregister_driver(&twidjoy_drv);
} }
module_init(twidjoy_init); module_init(twidjoy_init);
......
...@@ -139,7 +139,7 @@ static void warrior_disconnect(struct serio *serio) ...@@ -139,7 +139,7 @@ static void warrior_disconnect(struct serio *serio)
* it as an input device. * 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; struct warrior *warrior;
int i; int i;
...@@ -185,7 +185,7 @@ static void warrior_connect(struct serio *serio, struct serio_dev *dev) ...@@ -185,7 +185,7 @@ static void warrior_connect(struct serio *serio, struct serio_dev *dev)
serio->private = warrior; serio->private = warrior;
if (serio_open(serio, dev)) { if (serio_open(serio, drv)) {
kfree(warrior); kfree(warrior);
return; return;
} }
...@@ -199,7 +199,7 @@ static void warrior_connect(struct serio *serio, struct serio_dev *dev) ...@@ -199,7 +199,7 @@ static void warrior_connect(struct serio *serio, struct serio_dev *dev)
* The serio device structure. * The serio device structure.
*/ */
static struct serio_dev warrior_dev = { static struct serio_driver warrior_drv = {
.interrupt = warrior_interrupt, .interrupt = warrior_interrupt,
.connect = warrior_connect, .connect = warrior_connect,
.disconnect = warrior_disconnect, .disconnect = warrior_disconnect,
...@@ -211,13 +211,13 @@ static struct serio_dev warrior_dev = { ...@@ -211,13 +211,13 @@ static struct serio_dev warrior_dev = {
int __init warrior_init(void) int __init warrior_init(void)
{ {
serio_register_device(&warrior_dev); serio_register_driver(&warrior_drv);
return 0; return 0;
} }
void __exit warrior_exit(void) void __exit warrior_exit(void)
{ {
serio_unregister_device(&warrior_dev); serio_unregister_driver(&warrior_drv);
} }
module_init(warrior_init); module_init(warrior_init);
......
...@@ -732,7 +732,7 @@ static void atkbd_disconnect(struct serio *serio) ...@@ -732,7 +732,7 @@ static void atkbd_disconnect(struct serio *serio)
* to the input module. * 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; struct atkbd *atkbd;
int i; int i;
...@@ -785,7 +785,7 @@ static void atkbd_connect(struct serio *serio, struct serio_dev *dev) ...@@ -785,7 +785,7 @@ static void atkbd_connect(struct serio *serio, struct serio_dev *dev)
serio->private = atkbd; serio->private = atkbd;
if (serio_open(serio, dev)) { if (serio_open(serio, drv)) {
kfree(atkbd); kfree(atkbd);
return; return;
} }
...@@ -861,10 +861,10 @@ static void atkbd_connect(struct serio *serio, struct serio_dev *dev) ...@@ -861,10 +861,10 @@ static void atkbd_connect(struct serio *serio, struct serio_dev *dev)
static int atkbd_reconnect(struct serio *serio) static int atkbd_reconnect(struct serio *serio)
{ {
struct atkbd *atkbd = serio->private; struct atkbd *atkbd = serio->private;
struct serio_dev *dev = serio->dev; struct serio_driver *drv = serio->drv;
unsigned char param[1]; unsigned char param[1];
if (!dev) { if (!drv) {
printk(KERN_DEBUG "atkbd: reconnect request, but serio is disconnected, ignoring...\n"); printk(KERN_DEBUG "atkbd: reconnect request, but serio is disconnected, ignoring...\n");
return -1; return -1;
} }
...@@ -890,7 +890,7 @@ static int atkbd_reconnect(struct serio *serio) ...@@ -890,7 +890,7 @@ static int atkbd_reconnect(struct serio *serio)
return 0; return 0;
} }
static struct serio_dev atkbd_dev = { static struct serio_driver atkbd_drv = {
.interrupt = atkbd_interrupt, .interrupt = atkbd_interrupt,
.connect = atkbd_connect, .connect = atkbd_connect,
.reconnect = atkbd_reconnect, .reconnect = atkbd_reconnect,
...@@ -900,13 +900,13 @@ static struct serio_dev atkbd_dev = { ...@@ -900,13 +900,13 @@ static struct serio_dev atkbd_dev = {
int __init atkbd_init(void) int __init atkbd_init(void)
{ {
serio_register_device(&atkbd_dev); serio_register_driver(&atkbd_drv);
return 0; return 0;
} }
void __exit atkbd_exit(void) void __exit atkbd_exit(void)
{ {
serio_unregister_device(&atkbd_dev); serio_unregister_driver(&atkbd_drv);
} }
module_init(atkbd_init); module_init(atkbd_init);
......
...@@ -622,7 +622,7 @@ lkkbd_reinit (void *data) ...@@ -622,7 +622,7 @@ lkkbd_reinit (void *data)
* lkkbd_connect() probes for a LK keyboard and fills the necessary structures. * lkkbd_connect() probes for a LK keyboard and fills the necessary structures.
*/ */
static void static void
lkkbd_connect (struct serio *serio, struct serio_dev *dev) lkkbd_connect (struct serio *serio, struct serio_driver *drv)
{ {
struct lkkbd *lk; struct lkkbd *lk;
int i; int i;
...@@ -665,7 +665,7 @@ lkkbd_connect (struct serio *serio, struct serio_dev *dev) ...@@ -665,7 +665,7 @@ lkkbd_connect (struct serio *serio, struct serio_dev *dev)
serio->private = lk; serio->private = lk;
if (serio_open (serio, dev)) { if (serio_open (serio, drv)) {
kfree (lk); kfree (lk);
return; return;
} }
...@@ -703,7 +703,7 @@ lkkbd_disconnect (struct serio *serio) ...@@ -703,7 +703,7 @@ lkkbd_disconnect (struct serio *serio)
kfree (lk); kfree (lk);
} }
static struct serio_dev lkkbd_dev = { static struct serio_driver lkkbd_drv = {
.connect = lkkbd_connect, .connect = lkkbd_connect,
.disconnect = lkkbd_disconnect, .disconnect = lkkbd_disconnect,
.interrupt = lkkbd_interrupt, .interrupt = lkkbd_interrupt,
...@@ -715,14 +715,14 @@ static struct serio_dev lkkbd_dev = { ...@@ -715,14 +715,14 @@ static struct serio_dev lkkbd_dev = {
int __init int __init
lkkbd_init (void) lkkbd_init (void)
{ {
serio_register_device (&lkkbd_dev); serio_register_driver(&lkkbd_drv);
return 0; return 0;
} }
void __exit void __exit
lkkbd_exit (void) lkkbd_exit (void)
{ {
serio_unregister_device (&lkkbd_dev); serio_unregister_driver(&lkkbd_drv);
} }
module_init (lkkbd_init); module_init (lkkbd_init);
......
...@@ -82,7 +82,7 @@ irqreturn_t nkbd_interrupt(struct serio *serio, ...@@ -82,7 +82,7 @@ irqreturn_t nkbd_interrupt(struct serio *serio,
} }
void nkbd_connect(struct serio *serio, struct serio_dev *dev) void nkbd_connect(struct serio *serio, struct serio_driver *drv)
{ {
struct nkbd *nkbd; struct nkbd *nkbd;
int i; int i;
...@@ -106,7 +106,7 @@ void nkbd_connect(struct serio *serio, struct serio_dev *dev) ...@@ -106,7 +106,7 @@ void nkbd_connect(struct serio *serio, struct serio_dev *dev)
nkbd->dev.private = nkbd; nkbd->dev.private = nkbd;
serio->private = nkbd; serio->private = nkbd;
if (serio_open(serio, dev)) { if (serio_open(serio, drv)) {
kfree(nkbd); kfree(nkbd);
return; return;
} }
...@@ -138,7 +138,7 @@ void nkbd_disconnect(struct serio *serio) ...@@ -138,7 +138,7 @@ void nkbd_disconnect(struct serio *serio)
kfree(nkbd); kfree(nkbd);
} }
struct serio_dev nkbd_dev = { struct serio_driver nkbd_drv = {
.interrupt = nkbd_interrupt, .interrupt = nkbd_interrupt,
.connect = nkbd_connect, .connect = nkbd_connect,
.disconnect = nkbd_disconnect .disconnect = nkbd_disconnect
...@@ -146,13 +146,13 @@ struct serio_dev nkbd_dev = { ...@@ -146,13 +146,13 @@ struct serio_dev nkbd_dev = {
int __init nkbd_init(void) int __init nkbd_init(void)
{ {
serio_register_device(&nkbd_dev); serio_register_driver(&nkbd_drv);
return 0; return 0;
} }
void __exit nkbd_exit(void) void __exit nkbd_exit(void)
{ {
serio_unregister_device(&nkbd_dev); serio_unregister_driver(&nkbd_drv);
} }
module_init(nkbd_init); module_init(nkbd_init);
......
...@@ -221,7 +221,7 @@ static void sunkbd_reinit(void *data) ...@@ -221,7 +221,7 @@ static void sunkbd_reinit(void *data)
* sunkbd_connect() probes for a Sun keyboard and fills the necessary structures. * 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; struct sunkbd *sunkbd;
int i; int i;
...@@ -257,7 +257,7 @@ static void sunkbd_connect(struct serio *serio, struct serio_dev *dev) ...@@ -257,7 +257,7 @@ static void sunkbd_connect(struct serio *serio, struct serio_dev *dev)
serio->private = sunkbd; serio->private = sunkbd;
if (serio_open(serio, dev)) { if (serio_open(serio, drv)) {
kfree(sunkbd); kfree(sunkbd);
return; return;
} }
...@@ -301,7 +301,7 @@ static void sunkbd_disconnect(struct serio *serio) ...@@ -301,7 +301,7 @@ static void sunkbd_disconnect(struct serio *serio)
kfree(sunkbd); kfree(sunkbd);
} }
static struct serio_dev sunkbd_dev = { static struct serio_driver sunkbd_drv = {
.interrupt = sunkbd_interrupt, .interrupt = sunkbd_interrupt,
.connect = sunkbd_connect, .connect = sunkbd_connect,
.disconnect = sunkbd_disconnect .disconnect = sunkbd_disconnect
...@@ -313,13 +313,13 @@ static struct serio_dev sunkbd_dev = { ...@@ -313,13 +313,13 @@ static struct serio_dev sunkbd_dev = {
int __init sunkbd_init(void) int __init sunkbd_init(void)
{ {
serio_register_device(&sunkbd_dev); serio_register_driver(&sunkbd_drv);
return 0; return 0;
} }
void __exit sunkbd_exit(void) void __exit sunkbd_exit(void)
{ {
serio_unregister_device(&sunkbd_dev); serio_unregister_driver(&sunkbd_drv);
} }
module_init(sunkbd_init); module_init(sunkbd_init);
......
...@@ -86,7 +86,7 @@ irqreturn_t xtkbd_interrupt(struct serio *serio, ...@@ -86,7 +86,7 @@ irqreturn_t xtkbd_interrupt(struct serio *serio,
return IRQ_HANDLED; 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; struct xtkbd *xtkbd;
int i; int i;
...@@ -111,7 +111,7 @@ void xtkbd_connect(struct serio *serio, struct serio_dev *dev) ...@@ -111,7 +111,7 @@ void xtkbd_connect(struct serio *serio, struct serio_dev *dev)
serio->private = xtkbd; serio->private = xtkbd;
if (serio_open(serio, dev)) { if (serio_open(serio, drv)) {
kfree(xtkbd); kfree(xtkbd);
return; return;
} }
...@@ -143,7 +143,7 @@ void xtkbd_disconnect(struct serio *serio) ...@@ -143,7 +143,7 @@ void xtkbd_disconnect(struct serio *serio)
kfree(xtkbd); kfree(xtkbd);
} }
struct serio_dev xtkbd_dev = { struct serio_driver xtkbd_drv = {
.interrupt = xtkbd_interrupt, .interrupt = xtkbd_interrupt,
.connect = xtkbd_connect, .connect = xtkbd_connect,
.disconnect = xtkbd_disconnect .disconnect = xtkbd_disconnect
...@@ -151,13 +151,13 @@ struct serio_dev xtkbd_dev = { ...@@ -151,13 +151,13 @@ struct serio_dev xtkbd_dev = {
int __init xtkbd_init(void) int __init xtkbd_init(void)
{ {
serio_register_device(&xtkbd_dev); serio_register_driver(&xtkbd_drv);
return 0; return 0;
} }
void __exit xtkbd_exit(void) void __exit xtkbd_exit(void)
{ {
serio_unregister_device(&xtkbd_dev); serio_unregister_driver(&xtkbd_drv);
} }
module_init(xtkbd_init); module_init(xtkbd_init);
......
...@@ -678,7 +678,7 @@ static void psmouse_disconnect(struct serio *serio) ...@@ -678,7 +678,7 @@ static void psmouse_disconnect(struct serio *serio)
* psmouse_connect() is a callback from the serio module when * psmouse_connect() is a callback from the serio module when
* an unhandled serio port is found. * 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; struct psmouse *psmouse;
...@@ -700,7 +700,7 @@ static void psmouse_connect(struct serio *serio, struct serio_dev *dev) ...@@ -700,7 +700,7 @@ static void psmouse_connect(struct serio *serio, struct serio_dev *dev)
psmouse->dev.private = psmouse; psmouse->dev.private = psmouse;
serio->private = psmouse; serio->private = psmouse;
if (serio_open(serio, dev)) { if (serio_open(serio, drv)) {
kfree(psmouse); kfree(psmouse);
serio->private = NULL; serio->private = NULL;
return; return;
...@@ -753,9 +753,9 @@ static void psmouse_connect(struct serio *serio, struct serio_dev *dev) ...@@ -753,9 +753,9 @@ static void psmouse_connect(struct serio *serio, struct serio_dev *dev)
static int psmouse_reconnect(struct serio *serio) static int psmouse_reconnect(struct serio *serio)
{ {
struct psmouse *psmouse = serio->private; 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"); printk(KERN_DEBUG "psmouse: reconnect request, but serio is disconnected, ignoring...\n");
return -1; return -1;
} }
...@@ -793,7 +793,7 @@ static int psmouse_reconnect(struct serio *serio) ...@@ -793,7 +793,7 @@ static int psmouse_reconnect(struct serio *serio)
} }
static struct serio_dev psmouse_dev = { static struct serio_driver psmouse_drv = {
.interrupt = psmouse_interrupt, .interrupt = psmouse_interrupt,
.connect = psmouse_connect, .connect = psmouse_connect,
.reconnect = psmouse_reconnect, .reconnect = psmouse_reconnect,
...@@ -818,13 +818,13 @@ static inline void psmouse_parse_proto(void) ...@@ -818,13 +818,13 @@ static inline void psmouse_parse_proto(void)
int __init psmouse_init(void) int __init psmouse_init(void)
{ {
psmouse_parse_proto(); psmouse_parse_proto();
serio_register_device(&psmouse_dev); serio_register_driver(&psmouse_drv);
return 0; return 0;
} }
void __exit psmouse_exit(void) void __exit psmouse_exit(void)
{ {
serio_unregister_device(&psmouse_dev); serio_unregister_driver(&psmouse_drv);
} }
module_init(psmouse_init); module_init(psmouse_init);
......
...@@ -237,7 +237,7 @@ static void sermouse_disconnect(struct serio *serio) ...@@ -237,7 +237,7 @@ static void sermouse_disconnect(struct serio *serio)
* an unhandled serio port is found. * 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; struct sermouse *sermouse;
unsigned char c; unsigned char c;
...@@ -279,7 +279,7 @@ static void sermouse_connect(struct serio *serio, struct serio_dev *dev) ...@@ -279,7 +279,7 @@ static void sermouse_connect(struct serio *serio, struct serio_dev *dev)
sermouse->dev.id.product = c; sermouse->dev.id.product = c;
sermouse->dev.id.version = 0x0100; sermouse->dev.id.version = 0x0100;
if (serio_open(serio, dev)) { if (serio_open(serio, drv)) {
kfree(sermouse); kfree(sermouse);
return; return;
} }
...@@ -289,7 +289,7 @@ static void sermouse_connect(struct serio *serio, struct serio_dev *dev) ...@@ -289,7 +289,7 @@ static void sermouse_connect(struct serio *serio, struct serio_dev *dev)
printk(KERN_INFO "input: %s on %s\n", sermouse_protocols[sermouse->type], serio->phys); 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, .interrupt = sermouse_interrupt,
.connect = sermouse_connect, .connect = sermouse_connect,
.disconnect = sermouse_disconnect .disconnect = sermouse_disconnect
...@@ -297,13 +297,13 @@ static struct serio_dev sermouse_dev = { ...@@ -297,13 +297,13 @@ static struct serio_dev sermouse_dev = {
int __init sermouse_init(void) int __init sermouse_init(void)
{ {
serio_register_device(&sermouse_dev); serio_register_driver(&sermouse_drv);
return 0; return 0;
} }
void __exit sermouse_exit(void) void __exit sermouse_exit(void)
{ {
serio_unregister_device(&sermouse_dev); serio_unregister_driver(&sermouse_drv);
} }
module_init(sermouse_init); module_init(sermouse_init);
......
...@@ -470,7 +470,7 @@ static psmouse_ret_t synaptics_process_byte(struct psmouse *psmouse, struct pt_r ...@@ -470,7 +470,7 @@ static psmouse_ret_t synaptics_process_byte(struct psmouse *psmouse, struct pt_r
if (unlikely(priv->pkt_type == SYN_NEWABS)) if (unlikely(priv->pkt_type == SYN_NEWABS))
priv->pkt_type = synaptics_detect_pkt_type(psmouse); 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); synaptics_pass_pt_packet(&psmouse->ptport->serio, psmouse->packet);
else else
synaptics_process_packet(psmouse); synaptics_process_packet(psmouse);
......
...@@ -482,7 +482,7 @@ vsxxxaa_disconnect (struct serio *serio) ...@@ -482,7 +482,7 @@ vsxxxaa_disconnect (struct serio *serio)
} }
static void static void
vsxxxaa_connect (struct serio *serio, struct serio_dev *dev) vsxxxaa_connect (struct serio *serio, struct serio_driver *drv)
{ {
struct vsxxxaa *mouse; struct vsxxxaa *mouse;
...@@ -524,7 +524,7 @@ vsxxxaa_connect (struct serio *serio, struct serio_dev *dev) ...@@ -524,7 +524,7 @@ vsxxxaa_connect (struct serio *serio, struct serio_dev *dev)
mouse->dev.id.bustype = BUS_RS232; mouse->dev.id.bustype = BUS_RS232;
mouse->serio = serio; mouse->serio = serio;
if (serio_open (serio, dev)) { if (serio_open (serio, drv)) {
kfree (mouse); kfree (mouse);
return; return;
} }
...@@ -540,7 +540,7 @@ vsxxxaa_connect (struct serio *serio, struct serio_dev *dev) ...@@ -540,7 +540,7 @@ vsxxxaa_connect (struct serio *serio, struct serio_dev *dev)
printk (KERN_INFO "input: %s on %s\n", mouse->name, mouse->phys); 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, .connect = vsxxxaa_connect,
.interrupt = vsxxxaa_interrupt, .interrupt = vsxxxaa_interrupt,
.disconnect = vsxxxaa_disconnect, .disconnect = vsxxxaa_disconnect,
...@@ -549,14 +549,14 @@ static struct serio_dev vsxxxaa_dev = { ...@@ -549,14 +549,14 @@ static struct serio_dev vsxxxaa_dev = {
int __init int __init
vsxxxaa_init (void) vsxxxaa_init (void)
{ {
serio_register_device (&vsxxxaa_dev); serio_register_driver(&vsxxxaa_drv);
return 0; return 0;
} }
void __exit void __exit
vsxxxaa_exit (void) vsxxxaa_exit (void)
{ {
serio_unregister_device (&vsxxxaa_dev); serio_unregister_driver(&vsxxxaa_drv);
} }
module_init (vsxxxaa_init); module_init (vsxxxaa_init);
......
...@@ -48,27 +48,27 @@ EXPORT_SYMBOL(__serio_register_port); ...@@ -48,27 +48,27 @@ EXPORT_SYMBOL(__serio_register_port);
EXPORT_SYMBOL(serio_unregister_port); EXPORT_SYMBOL(serio_unregister_port);
EXPORT_SYMBOL(serio_unregister_port_delayed); EXPORT_SYMBOL(serio_unregister_port_delayed);
EXPORT_SYMBOL(__serio_unregister_port); EXPORT_SYMBOL(__serio_unregister_port);
EXPORT_SYMBOL(serio_register_device); EXPORT_SYMBOL(serio_register_driver);
EXPORT_SYMBOL(serio_unregister_device); EXPORT_SYMBOL(serio_unregister_driver);
EXPORT_SYMBOL(serio_open); EXPORT_SYMBOL(serio_open);
EXPORT_SYMBOL(serio_close); EXPORT_SYMBOL(serio_close);
EXPORT_SYMBOL(serio_rescan); EXPORT_SYMBOL(serio_rescan);
EXPORT_SYMBOL(serio_reconnect); 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_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) { list_for_each_entry(drv, &serio_driver_list, node) {
if (serio->dev) if (serio->drv)
break; break;
dev->connect(serio, dev); drv->connect(serio, drv);
} }
} }
...@@ -153,15 +153,15 @@ static void serio_handle_events(void) ...@@ -153,15 +153,15 @@ static void serio_handle_events(void)
break; break;
case SERIO_RECONNECT : case SERIO_RECONNECT :
if (event->serio->dev && event->serio->dev->reconnect) if (event->serio->drv && event->serio->drv->reconnect)
if (event->serio->dev->reconnect(event->serio) == 0) if (event->serio->drv->reconnect(event->serio) == 0)
break; break;
/* reconnect failed - fall through to rescan */ /* reconnect failed - fall through to rescan */
case SERIO_RESCAN : case SERIO_RESCAN :
if (event->serio->dev) if (event->serio->drv)
event->serio->dev->disconnect(event->serio); event->serio->drv->disconnect(event->serio);
serio_find_dev(event->serio); serio_find_driver(event->serio);
break; break;
default: default:
break; break;
...@@ -252,7 +252,7 @@ void __serio_register_port(struct serio *serio) ...@@ -252,7 +252,7 @@ void __serio_register_port(struct serio *serio)
{ {
spin_lock_init(&serio->lock); spin_lock_init(&serio->lock);
list_add_tail(&serio->node, &serio_list); list_add_tail(&serio->node, &serio_list);
serio_find_dev(serio); serio_find_driver(serio);
} }
void serio_unregister_port(struct serio *serio) void serio_unregister_port(struct serio *serio)
...@@ -281,58 +281,58 @@ void __serio_unregister_port(struct serio *serio) ...@@ -281,58 +281,58 @@ void __serio_unregister_port(struct serio *serio)
{ {
serio_remove_pending_events(serio); serio_remove_pending_events(serio);
list_del_init(&serio->node); list_del_init(&serio->node);
if (serio->dev) if (serio->drv)
serio->dev->disconnect(serio); 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; struct serio *serio;
down(&serio_sem); 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) list_for_each_entry(serio, &serio_list, node)
if (!serio->dev) if (!serio->drv)
dev->connect(serio, dev); drv->connect(serio, drv);
up(&serio_sem); up(&serio_sem);
} }
void serio_unregister_device(struct serio_dev *dev) void serio_unregister_driver(struct serio_driver *drv)
{ {
struct serio *serio; struct serio *serio;
down(&serio_sem); down(&serio_sem);
list_del_init(&dev->node); list_del_init(&drv->node);
list_for_each_entry(serio, &serio_list, node) { list_for_each_entry(serio, &serio_list, node) {
if (serio->dev == dev) if (serio->drv == drv)
dev->disconnect(serio); drv->disconnect(serio);
serio_find_dev(serio); serio_find_driver(serio);
} }
up(&serio_sem); up(&serio_sem);
} }
/* called from serio_dev->connect/disconnect methods under serio_sem */ /* called from serio_driver->connect/disconnect methods under serio_sem */
int serio_open(struct serio *serio, struct serio_dev *dev) int serio_open(struct serio *serio, struct serio_driver *drv)
{ {
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&serio->lock, flags); spin_lock_irqsave(&serio->lock, flags);
serio->dev = dev; serio->drv = drv;
spin_unlock_irqrestore(&serio->lock, flags); spin_unlock_irqrestore(&serio->lock, flags);
if (serio->open && serio->open(serio)) { if (serio->open && serio->open(serio)) {
spin_lock_irqsave(&serio->lock, flags); spin_lock_irqsave(&serio->lock, flags);
serio->dev = NULL; serio->drv = NULL;
spin_unlock_irqrestore(&serio->lock, flags); spin_unlock_irqrestore(&serio->lock, flags);
return -1; return -1;
} }
return 0; 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) void serio_close(struct serio *serio)
{ {
unsigned long flags; unsigned long flags;
...@@ -340,7 +340,7 @@ void serio_close(struct serio *serio) ...@@ -340,7 +340,7 @@ void serio_close(struct serio *serio)
if (serio->close) if (serio->close)
serio->close(serio); serio->close(serio);
spin_lock_irqsave(&serio->lock, flags); spin_lock_irqsave(&serio->lock, flags);
serio->dev = NULL; serio->drv = NULL;
spin_unlock_irqrestore(&serio->lock, flags); spin_unlock_irqrestore(&serio->lock, flags);
} }
...@@ -352,8 +352,8 @@ irqreturn_t serio_interrupt(struct serio *serio, ...@@ -352,8 +352,8 @@ irqreturn_t serio_interrupt(struct serio *serio,
spin_lock_irqsave(&serio->lock, flags); spin_lock_irqsave(&serio->lock, flags);
if (likely(serio->dev)) { if (likely(serio->drv)) {
ret = serio->dev->interrupt(serio, data, dfl, regs); ret = serio->drv->interrupt(serio, data, dfl, regs);
} else { } else {
if (!dfl) { if (!dfl) {
if ((serio->type != SERIO_8042 && if ((serio->type != SERIO_8042 &&
......
...@@ -170,7 +170,7 @@ static void serport_ldisc_write_wakeup(struct tty_struct * tty) ...@@ -170,7 +170,7 @@ static void serport_ldisc_write_wakeup(struct tty_struct * tty)
{ {
struct serport *sp = (struct serport *) tty->disc_data; struct serport *sp = (struct serport *) tty->disc_data;
serio_dev_write_wakeup(&sp->serio); serio_drv_write_wakeup(&sp->serio);
} }
/* /*
......
...@@ -111,7 +111,7 @@ static void gunze_disconnect(struct serio *serio) ...@@ -111,7 +111,7 @@ static void gunze_disconnect(struct serio *serio)
* and if yes, registers it as an input device. * 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; struct gunze *gunze;
...@@ -142,7 +142,7 @@ static void gunze_connect(struct serio *serio, struct serio_dev *dev) ...@@ -142,7 +142,7 @@ static void gunze_connect(struct serio *serio, struct serio_dev *dev)
gunze->dev.id.product = 0x0051; gunze->dev.id.product = 0x0051;
gunze->dev.id.version = 0x0100; gunze->dev.id.version = 0x0100;
if (serio_open(serio, dev)) { if (serio_open(serio, drv)) {
kfree(gunze); kfree(gunze);
return; return;
} }
...@@ -156,7 +156,7 @@ static void gunze_connect(struct serio *serio, struct serio_dev *dev) ...@@ -156,7 +156,7 @@ static void gunze_connect(struct serio *serio, struct serio_dev *dev)
* The serio device structure. * The serio device structure.
*/ */
static struct serio_dev gunze_dev = { static struct serio_driver gunze_drv = {
.interrupt = gunze_interrupt, .interrupt = gunze_interrupt,
.connect = gunze_connect, .connect = gunze_connect,
.disconnect = gunze_disconnect, .disconnect = gunze_disconnect,
...@@ -168,13 +168,13 @@ static struct serio_dev gunze_dev = { ...@@ -168,13 +168,13 @@ static struct serio_dev gunze_dev = {
int __init gunze_init(void) int __init gunze_init(void)
{ {
serio_register_device(&gunze_dev); serio_register_driver(&gunze_drv);
return 0; return 0;
} }
void __exit gunze_exit(void) void __exit gunze_exit(void)
{ {
serio_unregister_device(&gunze_dev); serio_unregister_driver(&gunze_drv);
} }
module_init(gunze_init); module_init(gunze_init);
......
...@@ -373,7 +373,7 @@ static irqreturn_t h3600ts_interrupt(struct serio *serio, unsigned char data, ...@@ -373,7 +373,7 @@ static irqreturn_t h3600ts_interrupt(struct serio *serio, unsigned char data,
* new serio device. It looks whether it was registered as a H3600 touchscreen * new serio device. It looks whether it was registered as a H3600 touchscreen
* and if yes, registers it as an input device. * 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; struct h3600_dev *ts;
...@@ -441,7 +441,7 @@ static void h3600ts_connect(struct serio *serio, struct serio_dev *dev) ...@@ -441,7 +441,7 @@ static void h3600ts_connect(struct serio *serio, struct serio_dev *dev)
ts->dev.id.product = 0x0666; /* FIXME !!! We can ask the hardware */ ts->dev.id.product = 0x0666; /* FIXME !!! We can ask the hardware */
ts->dev.id.version = 0x0100; 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_ACTION_BUTTON, ts);
free_irq(IRQ_GPIO_BITSY_NPOWER_BUTTON, ts); free_irq(IRQ_GPIO_BITSY_NPOWER_BUTTON, ts);
kfree(ts); kfree(ts);
...@@ -478,7 +478,7 @@ static void h3600ts_disconnect(struct serio *serio) ...@@ -478,7 +478,7 @@ static void h3600ts_disconnect(struct serio *serio)
* The serio device structure. * The serio device structure.
*/ */
static struct serio_dev h3600ts_dev = { static struct serio_driver h3600ts_drv = {
.interrupt = h3600ts_interrupt, .interrupt = h3600ts_interrupt,
.connect = h3600ts_connect, .connect = h3600ts_connect,
.disconnect = h3600ts_disconnect, .disconnect = h3600ts_disconnect,
...@@ -490,13 +490,13 @@ static struct serio_dev h3600ts_dev = { ...@@ -490,13 +490,13 @@ static struct serio_dev h3600ts_dev = {
static int __init h3600ts_init(void) static int __init h3600ts_init(void)
{ {
serio_register_device(&h3600ts_dev); serio_register_driver(&h3600ts_drv);
return 0; return 0;
} }
static void __exit h3600ts_exit(void) static void __exit h3600ts_exit(void)
{ {
serio_unregister_device(&h3600ts_dev); serio_unregister_driver(&h3600ts_drv);
} }
module_init(h3600ts_init); module_init(h3600ts_init);
......
...@@ -39,19 +39,19 @@ struct serio { ...@@ -39,19 +39,19 @@ struct serio {
int (*open)(struct serio *); int (*open)(struct serio *);
void (*close)(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 list_head node;
}; };
struct serio_dev { struct serio_driver {
void *private; void *private;
char *name; char *name;
void (*write_wakeup)(struct serio *); void (*write_wakeup)(struct serio *);
irqreturn_t (*interrupt)(struct serio *, unsigned char, irqreturn_t (*interrupt)(struct serio *, unsigned char,
unsigned int, struct pt_regs *); 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 *); int (*reconnect)(struct serio *);
void (*disconnect)(struct serio *); void (*disconnect)(struct serio *);
void (*cleanup)(struct serio *); void (*cleanup)(struct serio *);
...@@ -59,7 +59,7 @@ struct serio_dev { ...@@ -59,7 +59,7 @@ struct serio_dev {
struct list_head node; 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_close(struct serio *serio);
void serio_rescan(struct serio *serio); void serio_rescan(struct serio *serio);
void serio_reconnect(struct serio *serio); void serio_reconnect(struct serio *serio);
...@@ -71,8 +71,8 @@ void __serio_register_port(struct serio *serio); ...@@ -71,8 +71,8 @@ void __serio_register_port(struct serio *serio);
void serio_unregister_port(struct serio *serio); void serio_unregister_port(struct serio *serio);
void serio_unregister_port_delayed(struct serio *serio); void serio_unregister_port_delayed(struct serio *serio);
void __serio_unregister_port(struct serio *serio); void __serio_unregister_port(struct serio *serio);
void serio_register_device(struct serio_dev *dev); void serio_register_driver(struct serio_driver *drv);
void serio_unregister_device(struct serio_dev *dev); void serio_unregister_driver(struct serio_driver *drv);
static __inline__ int serio_write(struct serio *serio, unsigned char data) static __inline__ int serio_write(struct serio *serio, unsigned char data)
{ {
...@@ -82,16 +82,16 @@ static __inline__ int serio_write(struct serio *serio, unsigned char data) ...@@ -82,16 +82,16 @@ static __inline__ int serio_write(struct serio *serio, unsigned char data)
return -1; 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) if (serio->drv && serio->drv->write_wakeup)
serio->dev->write_wakeup(serio); serio->drv->write_wakeup(serio);
} }
static __inline__ void serio_cleanup(struct serio *serio) static __inline__ void serio_cleanup(struct serio *serio)
{ {
if (serio->dev && serio->dev->cleanup) if (serio->drv && serio->drv->cleanup)
serio->dev->cleanup(serio); serio->drv->cleanup(serio);
} }
#endif #endif
......
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