diff options
author | Peter Huewe <PeterHuewe@gmx.de> | 2015-03-16 16:46:34 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-03-18 17:39:17 -0400 |
commit | af638a04070f54c22c2fe7523e742d06b5f980bf (patch) | |
tree | b22fcae41b48715fe85ae8e4cb0eb92d4df04326 | |
parent | 6a5333092e4674c1e1f7de05ce6a167273f5afdb (diff) |
PNP: media/rc: Use module_pnp_driver to register driver
Removing some boilerplate by using module_pnp_driver instead of calling
register and unregister in the otherwise empty init/exit functions
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | drivers/media/rc/ene_ir.c | 13 | ||||
-rw-r--r-- | drivers/media/rc/fintek-cir.c | 13 | ||||
-rw-r--r-- | drivers/media/rc/ite-cir.c | 13 | ||||
-rw-r--r-- | drivers/media/rc/nuvoton-cir.c | 13 |
4 files changed, 4 insertions, 48 deletions
diff --git a/drivers/media/rc/ene_ir.c b/drivers/media/rc/ene_ir.c index e80f2c6c5f1a..8d77e1c4a141 100644 --- a/drivers/media/rc/ene_ir.c +++ b/drivers/media/rc/ene_ir.c | |||
@@ -1195,16 +1195,6 @@ static struct pnp_driver ene_driver = { | |||
1195 | .shutdown = ene_shutdown, | 1195 | .shutdown = ene_shutdown, |
1196 | }; | 1196 | }; |
1197 | 1197 | ||
1198 | static int __init ene_init(void) | ||
1199 | { | ||
1200 | return pnp_register_driver(&ene_driver); | ||
1201 | } | ||
1202 | |||
1203 | static void ene_exit(void) | ||
1204 | { | ||
1205 | pnp_unregister_driver(&ene_driver); | ||
1206 | } | ||
1207 | |||
1208 | module_param(sample_period, int, S_IRUGO); | 1198 | module_param(sample_period, int, S_IRUGO); |
1209 | MODULE_PARM_DESC(sample_period, "Hardware sample period (50 us default)"); | 1199 | MODULE_PARM_DESC(sample_period, "Hardware sample period (50 us default)"); |
1210 | 1200 | ||
@@ -1226,5 +1216,4 @@ MODULE_DESCRIPTION | |||
1226 | MODULE_AUTHOR("Maxim Levitsky"); | 1216 | MODULE_AUTHOR("Maxim Levitsky"); |
1227 | MODULE_LICENSE("GPL"); | 1217 | MODULE_LICENSE("GPL"); |
1228 | 1218 | ||
1229 | module_init(ene_init); | 1219 | module_pnp_driver(ene_driver); |
1230 | module_exit(ene_exit); | ||
diff --git a/drivers/media/rc/fintek-cir.c b/drivers/media/rc/fintek-cir.c index b5167573240e..5c63c2ec6183 100644 --- a/drivers/media/rc/fintek-cir.c +++ b/drivers/media/rc/fintek-cir.c | |||
@@ -684,16 +684,6 @@ static struct pnp_driver fintek_driver = { | |||
684 | .shutdown = fintek_shutdown, | 684 | .shutdown = fintek_shutdown, |
685 | }; | 685 | }; |
686 | 686 | ||
687 | static int __init fintek_init(void) | ||
688 | { | ||
689 | return pnp_register_driver(&fintek_driver); | ||
690 | } | ||
691 | |||
692 | static void __exit fintek_exit(void) | ||
693 | { | ||
694 | pnp_unregister_driver(&fintek_driver); | ||
695 | } | ||
696 | |||
697 | module_param(debug, int, S_IRUGO | S_IWUSR); | 687 | module_param(debug, int, S_IRUGO | S_IWUSR); |
698 | MODULE_PARM_DESC(debug, "Enable debugging output"); | 688 | MODULE_PARM_DESC(debug, "Enable debugging output"); |
699 | 689 | ||
@@ -703,5 +693,4 @@ MODULE_DESCRIPTION(FINTEK_DESCRIPTION " driver"); | |||
703 | MODULE_AUTHOR("Jarod Wilson <jarod@redhat.com>"); | 693 | MODULE_AUTHOR("Jarod Wilson <jarod@redhat.com>"); |
704 | MODULE_LICENSE("GPL"); | 694 | MODULE_LICENSE("GPL"); |
705 | 695 | ||
706 | module_init(fintek_init); | 696 | module_pnp_driver(fintek_driver); |
707 | module_exit(fintek_exit); | ||
diff --git a/drivers/media/rc/ite-cir.c b/drivers/media/rc/ite-cir.c index 56abf9120cc2..0f301903aa6f 100644 --- a/drivers/media/rc/ite-cir.c +++ b/drivers/media/rc/ite-cir.c | |||
@@ -1708,21 +1708,10 @@ static struct pnp_driver ite_driver = { | |||
1708 | .shutdown = ite_shutdown, | 1708 | .shutdown = ite_shutdown, |
1709 | }; | 1709 | }; |
1710 | 1710 | ||
1711 | static int __init ite_init(void) | ||
1712 | { | ||
1713 | return pnp_register_driver(&ite_driver); | ||
1714 | } | ||
1715 | |||
1716 | static void __exit ite_exit(void) | ||
1717 | { | ||
1718 | pnp_unregister_driver(&ite_driver); | ||
1719 | } | ||
1720 | |||
1721 | MODULE_DEVICE_TABLE(pnp, ite_ids); | 1711 | MODULE_DEVICE_TABLE(pnp, ite_ids); |
1722 | MODULE_DESCRIPTION("ITE Tech Inc. IT8712F/ITE8512F CIR driver"); | 1712 | MODULE_DESCRIPTION("ITE Tech Inc. IT8712F/ITE8512F CIR driver"); |
1723 | 1713 | ||
1724 | MODULE_AUTHOR("Juan J. Garcia de Soria <skandalfo@gmail.com>"); | 1714 | MODULE_AUTHOR("Juan J. Garcia de Soria <skandalfo@gmail.com>"); |
1725 | MODULE_LICENSE("GPL"); | 1715 | MODULE_LICENSE("GPL"); |
1726 | 1716 | ||
1727 | module_init(ite_init); | 1717 | module_pnp_driver(ite_driver); |
1728 | module_exit(ite_exit); | ||
diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c index 9c2c8635ff33..85af7a869167 100644 --- a/drivers/media/rc/nuvoton-cir.c +++ b/drivers/media/rc/nuvoton-cir.c | |||
@@ -1219,16 +1219,6 @@ static struct pnp_driver nvt_driver = { | |||
1219 | .shutdown = nvt_shutdown, | 1219 | .shutdown = nvt_shutdown, |
1220 | }; | 1220 | }; |
1221 | 1221 | ||
1222 | static int __init nvt_init(void) | ||
1223 | { | ||
1224 | return pnp_register_driver(&nvt_driver); | ||
1225 | } | ||
1226 | |||
1227 | static void __exit nvt_exit(void) | ||
1228 | { | ||
1229 | pnp_unregister_driver(&nvt_driver); | ||
1230 | } | ||
1231 | |||
1232 | module_param(debug, int, S_IRUGO | S_IWUSR); | 1222 | module_param(debug, int, S_IRUGO | S_IWUSR); |
1233 | MODULE_PARM_DESC(debug, "Enable debugging output"); | 1223 | MODULE_PARM_DESC(debug, "Enable debugging output"); |
1234 | 1224 | ||
@@ -1238,5 +1228,4 @@ MODULE_DESCRIPTION("Nuvoton W83667HG-A & W83677HG-I CIR driver"); | |||
1238 | MODULE_AUTHOR("Jarod Wilson <jarod@redhat.com>"); | 1228 | MODULE_AUTHOR("Jarod Wilson <jarod@redhat.com>"); |
1239 | MODULE_LICENSE("GPL"); | 1229 | MODULE_LICENSE("GPL"); |
1240 | 1230 | ||
1241 | module_init(nvt_init); | 1231 | module_pnp_driver(nvt_driver); |
1242 | module_exit(nvt_exit); | ||