aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/keyboard
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-04-04 02:50:17 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2012-04-04 12:25:43 -0400
commit65ac9f7a23c934ee8c40dc20955e75db4924bfea (patch)
tree7baa3439e9b0a774073473cccef6960e7f77bc6e /drivers/input/keyboard
parentfa7f86d157781515b74d658120552eafd890f4de (diff)
Input: serio - use module_serio_driver
This patch converts the drivers in drivers/input/* to use module_serio_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/keyboard')
-rw-r--r--drivers/input/keyboard/hil_kbd.c13
-rw-r--r--drivers/input/keyboard/lkkbd.c17
-rw-r--r--drivers/input/keyboard/newtonkbd.c13
-rw-r--r--drivers/input/keyboard/stowaway.c13
-rw-r--r--drivers/input/keyboard/sunkbd.c17
-rw-r--r--drivers/input/keyboard/xtkbd.c13
6 files changed, 6 insertions, 80 deletions
diff --git a/drivers/input/keyboard/hil_kbd.c b/drivers/input/keyboard/hil_kbd.c
index fed31e0947a1..589e3c258f3f 100644
--- a/drivers/input/keyboard/hil_kbd.c
+++ b/drivers/input/keyboard/hil_kbd.c
@@ -583,15 +583,4 @@ static struct serio_driver hil_serio_drv = {
583 .interrupt = hil_dev_interrupt 583 .interrupt = hil_dev_interrupt
584}; 584};
585 585
586static int __init hil_dev_init(void) 586module_serio_driver(hil_serio_drv);
587{
588 return serio_register_driver(&hil_serio_drv);
589}
590
591static void __exit hil_dev_exit(void)
592{
593 serio_unregister_driver(&hil_serio_drv);
594}
595
596module_init(hil_dev_init);
597module_exit(hil_dev_exit);
diff --git a/drivers/input/keyboard/lkkbd.c b/drivers/input/keyboard/lkkbd.c
index fa9bb6d235e2..fc0a63c2f278 100644
--- a/drivers/input/keyboard/lkkbd.c
+++ b/drivers/input/keyboard/lkkbd.c
@@ -731,19 +731,4 @@ static struct serio_driver lkkbd_drv = {
731 .interrupt = lkkbd_interrupt, 731 .interrupt = lkkbd_interrupt,
732}; 732};
733 733
734/* 734module_serio_driver(lkkbd_drv);
735 * The functions for insering/removing us as a module.
736 */
737static int __init lkkbd_init(void)
738{
739 return serio_register_driver(&lkkbd_drv);
740}
741
742static void __exit lkkbd_exit(void)
743{
744 serio_unregister_driver(&lkkbd_drv);
745}
746
747module_init(lkkbd_init);
748module_exit(lkkbd_exit);
749
diff --git a/drivers/input/keyboard/newtonkbd.c b/drivers/input/keyboard/newtonkbd.c
index 48d1cab0aa1c..f971898ad591 100644
--- a/drivers/input/keyboard/newtonkbd.c
+++ b/drivers/input/keyboard/newtonkbd.c
@@ -166,15 +166,4 @@ static struct serio_driver nkbd_drv = {
166 .disconnect = nkbd_disconnect, 166 .disconnect = nkbd_disconnect,
167}; 167};
168 168
169static int __init nkbd_init(void) 169module_serio_driver(nkbd_drv);
170{
171 return serio_register_driver(&nkbd_drv);
172}
173
174static void __exit nkbd_exit(void)
175{
176 serio_unregister_driver(&nkbd_drv);
177}
178
179module_init(nkbd_init);
180module_exit(nkbd_exit);
diff --git a/drivers/input/keyboard/stowaway.c b/drivers/input/keyboard/stowaway.c
index 7437219370b1..cc612c5d5427 100644
--- a/drivers/input/keyboard/stowaway.c
+++ b/drivers/input/keyboard/stowaway.c
@@ -170,15 +170,4 @@ static struct serio_driver skbd_drv = {
170 .disconnect = skbd_disconnect, 170 .disconnect = skbd_disconnect,
171}; 171};
172 172
173static int __init skbd_init(void) 173module_serio_driver(skbd_drv);
174{
175 return serio_register_driver(&skbd_drv);
176}
177
178static void __exit skbd_exit(void)
179{
180 serio_unregister_driver(&skbd_drv);
181}
182
183module_init(skbd_init);
184module_exit(skbd_exit);
diff --git a/drivers/input/keyboard/sunkbd.c b/drivers/input/keyboard/sunkbd.c
index a99a04b03ee4..5f836b1638c1 100644
--- a/drivers/input/keyboard/sunkbd.c
+++ b/drivers/input/keyboard/sunkbd.c
@@ -369,19 +369,4 @@ static struct serio_driver sunkbd_drv = {
369 .disconnect = sunkbd_disconnect, 369 .disconnect = sunkbd_disconnect,
370}; 370};
371 371
372/* 372module_serio_driver(sunkbd_drv);
373 * The functions for insering/removing us as a module.
374 */
375
376static int __init sunkbd_init(void)
377{
378 return serio_register_driver(&sunkbd_drv);
379}
380
381static void __exit sunkbd_exit(void)
382{
383 serio_unregister_driver(&sunkbd_drv);
384}
385
386module_init(sunkbd_init);
387module_exit(sunkbd_exit);
diff --git a/drivers/input/keyboard/xtkbd.c b/drivers/input/keyboard/xtkbd.c
index 37b01d777a4a..d050d9d0011b 100644
--- a/drivers/input/keyboard/xtkbd.c
+++ b/drivers/input/keyboard/xtkbd.c
@@ -169,15 +169,4 @@ static struct serio_driver xtkbd_drv = {
169 .disconnect = xtkbd_disconnect, 169 .disconnect = xtkbd_disconnect,
170}; 170};
171 171
172static int __init xtkbd_init(void) 172module_serio_driver(xtkbd_drv);
173{
174 return serio_register_driver(&xtkbd_drv);
175}
176
177static void __exit xtkbd_exit(void)
178{
179 serio_unregister_driver(&xtkbd_drv);
180}
181
182module_init(xtkbd_init);
183module_exit(xtkbd_exit);