aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-04-06 08:13:30 -0400
committerGrant Likely <grant.likely@secretlab.ca>2012-04-07 16:30:35 -0400
commit93baa65fe50a83056c97973de2300337b000472e (patch)
treee91ed77013c1219d2e90581a8b409ff779a92630 /drivers/gpio
parentc29985dd3e26118c8ba64105e09b85b714462765 (diff)
gpio: Convert drivers to use module_pci_driver()
This patch converts the drivers in drivers/gpio/* to use module_pci_driver() macro which makes the code smaller and a bit simpler by having less boilerplate. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpio-bt8xx.c12
-rw-r--r--drivers/gpio/gpio-ml-ioh.c12
-rw-r--r--drivers/gpio/gpio-pch.c12
-rw-r--r--drivers/gpio/gpio-sodaville.c12
4 files changed, 4 insertions, 44 deletions
diff --git a/drivers/gpio/gpio-bt8xx.c b/drivers/gpio/gpio-bt8xx.c
index 5ca4098ba092..e4cc7eb69bb2 100644
--- a/drivers/gpio/gpio-bt8xx.c
+++ b/drivers/gpio/gpio-bt8xx.c
@@ -328,17 +328,7 @@ static struct pci_driver bt8xxgpio_pci_driver = {
328 .resume = bt8xxgpio_resume, 328 .resume = bt8xxgpio_resume,
329}; 329};
330 330
331static int __init bt8xxgpio_init(void) 331module_pci_driver(bt8xxgpio_pci_driver);
332{
333 return pci_register_driver(&bt8xxgpio_pci_driver);
334}
335module_init(bt8xxgpio_init)
336
337static void __exit bt8xxgpio_exit(void)
338{
339 pci_unregister_driver(&bt8xxgpio_pci_driver);
340}
341module_exit(bt8xxgpio_exit)
342 332
343MODULE_LICENSE("GPL"); 333MODULE_LICENSE("GPL");
344MODULE_AUTHOR("Michael Buesch"); 334MODULE_AUTHOR("Michael Buesch");
diff --git a/drivers/gpio/gpio-ml-ioh.c b/drivers/gpio/gpio-ml-ioh.c
index f0febe5b8221..db01f151d41c 100644
--- a/drivers/gpio/gpio-ml-ioh.c
+++ b/drivers/gpio/gpio-ml-ioh.c
@@ -611,17 +611,7 @@ static struct pci_driver ioh_gpio_driver = {
611 .resume = ioh_gpio_resume 611 .resume = ioh_gpio_resume
612}; 612};
613 613
614static int __init ioh_gpio_pci_init(void) 614module_pci_driver(ioh_gpio_driver);
615{
616 return pci_register_driver(&ioh_gpio_driver);
617}
618module_init(ioh_gpio_pci_init);
619
620static void __exit ioh_gpio_pci_exit(void)
621{
622 pci_unregister_driver(&ioh_gpio_driver);
623}
624module_exit(ioh_gpio_pci_exit);
625 615
626MODULE_DESCRIPTION("OKI SEMICONDUCTOR ML-IOH series GPIO Driver"); 616MODULE_DESCRIPTION("OKI SEMICONDUCTOR ML-IOH series GPIO Driver");
627MODULE_LICENSE("GPL"); 617MODULE_LICENSE("GPL");
diff --git a/drivers/gpio/gpio-pch.c b/drivers/gpio/gpio-pch.c
index e8729cc2ba2b..a05fdb6c464c 100644
--- a/drivers/gpio/gpio-pch.c
+++ b/drivers/gpio/gpio-pch.c
@@ -539,17 +539,7 @@ static struct pci_driver pch_gpio_driver = {
539 .resume = pch_gpio_resume 539 .resume = pch_gpio_resume
540}; 540};
541 541
542static int __init pch_gpio_pci_init(void) 542module_pci_driver(pch_gpio_driver);
543{
544 return pci_register_driver(&pch_gpio_driver);
545}
546module_init(pch_gpio_pci_init);
547
548static void __exit pch_gpio_pci_exit(void)
549{
550 pci_unregister_driver(&pch_gpio_driver);
551}
552module_exit(pch_gpio_pci_exit);
553 543
554MODULE_DESCRIPTION("PCH GPIO PCI Driver"); 544MODULE_DESCRIPTION("PCH GPIO PCI Driver");
555MODULE_LICENSE("GPL"); 545MODULE_LICENSE("GPL");
diff --git a/drivers/gpio/gpio-sodaville.c b/drivers/gpio/gpio-sodaville.c
index 9ba15d31d242..e20dc737dd4e 100644
--- a/drivers/gpio/gpio-sodaville.c
+++ b/drivers/gpio/gpio-sodaville.c
@@ -285,17 +285,7 @@ static struct pci_driver sdv_gpio_driver = {
285 .remove = sdv_gpio_remove, 285 .remove = sdv_gpio_remove,
286}; 286};
287 287
288static int __init sdv_gpio_init(void) 288module_pci_driver(sdv_gpio_driver);
289{
290 return pci_register_driver(&sdv_gpio_driver);
291}
292module_init(sdv_gpio_init);
293
294static void __exit sdv_gpio_exit(void)
295{
296 pci_unregister_driver(&sdv_gpio_driver);
297}
298module_exit(sdv_gpio_exit);
299 289
300MODULE_AUTHOR("Hans J. Koch <hjk@linutronix.de>"); 290MODULE_AUTHOR("Hans J. Koch <hjk@linutronix.de>");
301MODULE_DESCRIPTION("GPIO interface for Intel Sodaville SoCs"); 291MODULE_DESCRIPTION("GPIO interface for Intel Sodaville SoCs");