]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Input: keyboard - use macro module_platform_driver()
authorJJ Ding <dgdunix@gmail.com>
Tue, 29 Nov 2011 19:08:39 +0000 (11:08 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 1 Dec 2011 07:41:41 +0000 (23:41 -0800)
Commit 940ab88962bc1aff3273a8356d64577a6e386736 introduced a new macro to
save some platform_driver boilerplate code. Use it.

Signed-off-by: JJ Ding <dgdunix@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
26 files changed:
drivers/input/keyboard/adp5520-keys.c
drivers/input/keyboard/amikbd.c
drivers/input/keyboard/bf54x-keys.c
drivers/input/keyboard/davinci_keyscan.c
drivers/input/keyboard/ep93xx_keypad.c
drivers/input/keyboard/gpio_keys_polled.c
drivers/input/keyboard/imx_keypad.c
drivers/input/keyboard/jornada680_kbd.c
drivers/input/keyboard/jornada720_kbd.c
drivers/input/keyboard/matrix_keypad.c
drivers/input/keyboard/nomadik-ske-keypad.c
drivers/input/keyboard/omap-keypad.c
drivers/input/keyboard/omap4-keypad.c
drivers/input/keyboard/opencores-kbd.c
drivers/input/keyboard/pmic8xxx-keypad.c
drivers/input/keyboard/pxa27x_keypad.c
drivers/input/keyboard/pxa930_rotary.c
drivers/input/keyboard/samsung-keypad.c
drivers/input/keyboard/sh_keysc.c
drivers/input/keyboard/spear-keyboard.c
drivers/input/keyboard/stmpe-keypad.c
drivers/input/keyboard/tc3589x-keypad.c
drivers/input/keyboard/tegra-kbc.c
drivers/input/keyboard/tnetv107x-keypad.c
drivers/input/keyboard/twl4030_keypad.c
drivers/input/keyboard/w90p910_keypad.c

index 3db8006dac3a8f93e1e31a01e56766044cd194ed..e9e8674dfda122ce4773864866f153553bfa45a5 100644 (file)
@@ -202,18 +202,7 @@ static struct platform_driver adp5520_keys_driver = {
        .probe          = adp5520_keys_probe,
        .remove         = __devexit_p(adp5520_keys_remove),
 };
-
-static int __init adp5520_keys_init(void)
-{
-       return platform_driver_register(&adp5520_keys_driver);
-}
-module_init(adp5520_keys_init);
-
-static void __exit adp5520_keys_exit(void)
-{
-       platform_driver_unregister(&adp5520_keys_driver);
-}
-module_exit(adp5520_keys_exit);
+module_platform_driver(adp5520_keys_driver);
 
 MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>");
 MODULE_DESCRIPTION("Keys ADP5520 Driver");
index 79172af164f25a5ccd913f32225dcd5e60c22760..6df5f6aa7908a9dbf649226cfb1bbc8dee6685cf 100644 (file)
@@ -259,19 +259,6 @@ static struct platform_driver amikbd_driver = {
                .owner  = THIS_MODULE,
        },
 };
-
-static int __init amikbd_init(void)
-{
-       return platform_driver_probe(&amikbd_driver, amikbd_probe);
-}
-
-module_init(amikbd_init);
-
-static void __exit amikbd_exit(void)
-{
-       platform_driver_unregister(&amikbd_driver);
-}
-
-module_exit(amikbd_exit);
+module_platform_driver(amikbd_driver);
 
 MODULE_ALIAS("platform:amiga-keyboard");
index 7d989603f875f6a417c395624cffbc2b7171ac26..683e31456f0ee7e51a1add77da6e834f32a32f5b 100644 (file)
@@ -394,19 +394,7 @@ struct platform_driver bfin_kpad_device_driver = {
        .suspend        = bfin_kpad_suspend,
        .resume         = bfin_kpad_resume,
 };
-
-static int __init bfin_kpad_init(void)
-{
-       return platform_driver_register(&bfin_kpad_device_driver);
-}
-
-static void __exit bfin_kpad_exit(void)
-{
-       platform_driver_unregister(&bfin_kpad_device_driver);
-}
-
-module_init(bfin_kpad_init);
-module_exit(bfin_kpad_exit);
+module_platform_driver(bfin_kpad_device_driver);
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>");
index 9d82b3aeff5e5535b5f85d4a084a410523359564..469825247552588e46615d04d5e4221006ab9186 100644 (file)
@@ -328,18 +328,7 @@ static struct platform_driver davinci_ks_driver = {
        },
        .remove = __devexit_p(davinci_ks_remove),
 };
-
-static int __init davinci_ks_init(void)
-{
-       return platform_driver_probe(&davinci_ks_driver, davinci_ks_probe);
-}
-module_init(davinci_ks_init);
-
-static void __exit davinci_ks_exit(void)
-{
-       platform_driver_unregister(&davinci_ks_driver);
-}
-module_exit(davinci_ks_exit);
+module_platform_driver(davinci_ks_driver);
 
 MODULE_AUTHOR("Miguel Aguilar");
 MODULE_DESCRIPTION("Texas Instruments DaVinci Key Scan Driver");
index 4662c5da801890f63179203029bc9acc241f8314..0ba69f3fcb52b8ca3d47ce3516be6b2f6bbbf167 100644 (file)
@@ -390,19 +390,7 @@ static struct platform_driver ep93xx_keypad_driver = {
        .suspend        = ep93xx_keypad_suspend,
        .resume         = ep93xx_keypad_resume,
 };
-
-static int __init ep93xx_keypad_init(void)
-{
-       return platform_driver_register(&ep93xx_keypad_driver);
-}
-
-static void __exit ep93xx_keypad_exit(void)
-{
-       platform_driver_unregister(&ep93xx_keypad_driver);
-}
-
-module_init(ep93xx_keypad_init);
-module_exit(ep93xx_keypad_exit);
+module_platform_driver(ep93xx_keypad_driver);
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("H Hartley Sweeten <hsweeten@visionengravers.com>");
index 4c17aff206576d72468071c4465e1a08e4f36fa4..20c8ab1722148251ebd748def95337fd2b25519e 100644 (file)
@@ -241,19 +241,7 @@ static struct platform_driver gpio_keys_polled_driver = {
                .owner  = THIS_MODULE,
        },
 };
-
-static int __init gpio_keys_polled_init(void)
-{
-       return platform_driver_register(&gpio_keys_polled_driver);
-}
-
-static void __exit gpio_keys_polled_exit(void)
-{
-       platform_driver_unregister(&gpio_keys_polled_driver);
-}
-
-module_init(gpio_keys_polled_init);
-module_exit(gpio_keys_polled_exit);
+module_platform_driver(gpio_keys_polled_driver);
 
 MODULE_LICENSE("GPL v2");
 MODULE_AUTHOR("Gabor Juhos <juhosg@openwrt.org>");
index ccebd2d091519e849d68744715187423de46656d..fb87b3bcadb9f95d88c7204353048cc8a64233d9 100644 (file)
@@ -619,19 +619,7 @@ static struct platform_driver imx_keypad_driver = {
        .probe          = imx_keypad_probe,
        .remove         = __devexit_p(imx_keypad_remove),
 };
-
-static int __init imx_keypad_init(void)
-{
-       return platform_driver_register(&imx_keypad_driver);
-}
-
-static void __exit imx_keypad_exit(void)
-{
-       platform_driver_unregister(&imx_keypad_driver);
-}
-
-module_init(imx_keypad_init);
-module_exit(imx_keypad_exit);
+module_platform_driver(imx_keypad_driver);
 
 MODULE_AUTHOR("Alberto Panizzo <maramaopercheseimorto@gmail.com>");
 MODULE_DESCRIPTION("IMX Keypad Port Driver");
index 7197c5698747ada298c6712058bcaeb438b1018d..24f3ea01c4d5b88ea267f42fe93b70a1b18730bf 100644 (file)
@@ -260,19 +260,7 @@ static struct platform_driver jornada680kbd_driver = {
        .probe  = jornada680kbd_probe,
        .remove = __devexit_p(jornada680kbd_remove),
 };
-
-static int __init jornada680kbd_init(void)
-{
-       return platform_driver_register(&jornada680kbd_driver);
-}
-
-static void __exit jornada680kbd_exit(void)
-{
-       platform_driver_unregister(&jornada680kbd_driver);
-}
-
-module_init(jornada680kbd_init);
-module_exit(jornada680kbd_exit);
+module_platform_driver(jornada680kbd_driver);
 
 MODULE_AUTHOR("Kristoffer Ericson <kristoffer.ericson@gmail.com>");
 MODULE_DESCRIPTION("HP Jornada 620/660/680/690 Keyboard Driver");
index 0aa6740e60d00b6ba43b41929011f1b8138e4056..eeafc30b207ba123293fcf17c9d840277408a297 100644 (file)
@@ -174,16 +174,4 @@ static struct platform_driver jornada720_kbd_driver = {
        .probe   = jornada720_kbd_probe,
        .remove  = __devexit_p(jornada720_kbd_remove),
 };
-
-static int __init jornada720_kbd_init(void)
-{
-       return platform_driver_register(&jornada720_kbd_driver);
-}
-
-static void __exit jornada720_kbd_exit(void)
-{
-       platform_driver_unregister(&jornada720_kbd_driver);
-}
-
-module_init(jornada720_kbd_init);
-module_exit(jornada720_kbd_exit);
+module_platform_driver(jornada720_kbd_driver);
index e2ae657717ea634d7bc799a46f6dbcc0f0fb6371..9b223d73de326a12f9a7279e15d7a85ad4cd8760 100644 (file)
@@ -496,19 +496,7 @@ static struct platform_driver matrix_keypad_driver = {
 #endif
        },
 };
-
-static int __init matrix_keypad_init(void)
-{
-       return platform_driver_register(&matrix_keypad_driver);
-}
-
-static void __exit matrix_keypad_exit(void)
-{
-       platform_driver_unregister(&matrix_keypad_driver);
-}
-
-module_init(matrix_keypad_init);
-module_exit(matrix_keypad_exit);
+module_platform_driver(matrix_keypad_driver);
 
 MODULE_AUTHOR("Marek Vasut <marek.vasut@gmail.com>");
 MODULE_DESCRIPTION("GPIO Driven Matrix Keypad Driver");
index fcdec5e2b2977269b8718e84bf6da0991b48bb9c..6c4828f8ebd192960c39095b6ed53cdf809b15ed 100644 (file)
@@ -390,18 +390,7 @@ struct platform_driver ske_keypad_driver = {
        .probe = ske_keypad_probe,
        .remove = __devexit_p(ske_keypad_remove),
 };
-
-static int __init ske_keypad_init(void)
-{
-       return platform_driver_probe(&ske_keypad_driver, ske_keypad_probe);
-}
-module_init(ske_keypad_init);
-
-static void __exit ske_keypad_exit(void)
-{
-       platform_driver_unregister(&ske_keypad_driver);
-}
-module_exit(ske_keypad_exit);
+module_platform_driver(ske_keypad_driver);
 
 MODULE_LICENSE("GPL v2");
 MODULE_AUTHOR("Naveen Kumar <naveen.gaddipati@stericsson.com> / Sundar Iyer <sundar.iyer@stericsson.com>");
index 323bcdfff2484b6d3ddf22fddcb343216c879ee6..6b630d9d3dff13c3651b76a218b32a7e22964754 100644 (file)
@@ -473,20 +473,7 @@ static struct platform_driver omap_kp_driver = {
                .owner  = THIS_MODULE,
        },
 };
-
-static int __init omap_kp_init(void)
-{
-       printk(KERN_INFO "OMAP Keypad Driver\n");
-       return platform_driver_register(&omap_kp_driver);
-}
-
-static void __exit omap_kp_exit(void)
-{
-       platform_driver_unregister(&omap_kp_driver);
-}
-
-module_init(omap_kp_init);
-module_exit(omap_kp_exit);
+module_platform_driver(omap_kp_driver);
 
 MODULE_AUTHOR("Timo Teräs");
 MODULE_DESCRIPTION("OMAP Keypad Driver");
index c51a3c4a7feb52520246c332d93784a25fc70774..d5c5d77f4b82afd1c9e3369007ae8330bcb5abbf 100644 (file)
@@ -335,18 +335,7 @@ static struct platform_driver omap4_keypad_driver = {
                .owner  = THIS_MODULE,
        },
 };
-
-static int __init omap4_keypad_init(void)
-{
-       return platform_driver_register(&omap4_keypad_driver);
-}
-module_init(omap4_keypad_init);
-
-static void __exit omap4_keypad_exit(void)
-{
-       platform_driver_unregister(&omap4_keypad_driver);
-}
-module_exit(omap4_keypad_exit);
+module_platform_driver(omap4_keypad_driver);
 
 MODULE_AUTHOR("Texas Instruments");
 MODULE_DESCRIPTION("OMAP4 Keypad Driver");
index 1f1a5563f60a8b7c367acbd68543d998fb50cf8f..abe728c7b88e103db67b55020fb417e73ac048a3 100644 (file)
@@ -163,18 +163,7 @@ static struct platform_driver opencores_kbd_device_driver = {
                .name = "opencores-kbd",
        },
 };
-
-static int __init opencores_kbd_init(void)
-{
-       return platform_driver_register(&opencores_kbd_device_driver);
-}
-module_init(opencores_kbd_init);
-
-static void __exit opencores_kbd_exit(void)
-{
-       platform_driver_unregister(&opencores_kbd_device_driver);
-}
-module_exit(opencores_kbd_exit);
+module_platform_driver(opencores_kbd_device_driver);
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Javier Herrero <jherrero@hvsistemas.es>");
index e7cc51d0fb34adb6834381cffbdc0e9eed94f902..01a1c9f8a383b586d1ea4e18fbb826387a161093 100644 (file)
@@ -780,18 +780,7 @@ static struct platform_driver pmic8xxx_kp_driver = {
                .pm = &pm8xxx_kp_pm_ops,
        },
 };
-
-static int __init pmic8xxx_kp_init(void)
-{
-       return platform_driver_register(&pmic8xxx_kp_driver);
-}
-module_init(pmic8xxx_kp_init);
-
-static void __exit pmic8xxx_kp_exit(void)
-{
-       platform_driver_unregister(&pmic8xxx_kp_driver);
-}
-module_exit(pmic8xxx_kp_exit);
+module_platform_driver(pmic8xxx_kp_driver);
 
 MODULE_LICENSE("GPL v2");
 MODULE_DESCRIPTION("PMIC8XXX keypad driver");
index eca6ae63de146d8171ac384625c59abea9d8a9af..29fe1b2be1c1f46541fba50815f4bb8d349e8847 100644 (file)
@@ -602,19 +602,7 @@ static struct platform_driver pxa27x_keypad_driver = {
 #endif
        },
 };
-
-static int __init pxa27x_keypad_init(void)
-{
-       return platform_driver_register(&pxa27x_keypad_driver);
-}
-
-static void __exit pxa27x_keypad_exit(void)
-{
-       platform_driver_unregister(&pxa27x_keypad_driver);
-}
-
-module_init(pxa27x_keypad_init);
-module_exit(pxa27x_keypad_exit);
+module_platform_driver(pxa27x_keypad_driver);
 
 MODULE_DESCRIPTION("PXA27x Keypad Controller Driver");
 MODULE_LICENSE("GPL");
index 35451bf780c74483e915b87342ef1b7c88fd28dd..d7f1134b789e666253940beed396bcb7d41001e4 100644 (file)
@@ -195,18 +195,7 @@ static struct platform_driver pxa930_rotary_driver = {
        .probe          = pxa930_rotary_probe,
        .remove         = __devexit_p(pxa930_rotary_remove),
 };
-
-static int __init pxa930_rotary_init(void)
-{
-       return platform_driver_register(&pxa930_rotary_driver);
-}
-module_init(pxa930_rotary_init);
-
-static void __exit pxa930_rotary_exit(void)
-{
-       platform_driver_unregister(&pxa930_rotary_driver);
-}
-module_exit(pxa930_rotary_exit);
+module_platform_driver(pxa930_rotary_driver);
 
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("Driver for PXA93x Enhanced Rotary Controller");
index 9e50154896cfb0b959d145e364492cd79aaf5311..a6e010e016f8b990b512f731c7a18e953a32b9bf 100644 (file)
@@ -467,18 +467,7 @@ static struct platform_driver samsung_keypad_driver = {
        },
        .id_table       = samsung_keypad_driver_ids,
 };
-
-static int __init samsung_keypad_init(void)
-{
-       return platform_driver_register(&samsung_keypad_driver);
-}
-module_init(samsung_keypad_init);
-
-static void __exit samsung_keypad_exit(void)
-{
-       platform_driver_unregister(&samsung_keypad_driver);
-}
-module_exit(samsung_keypad_exit);
+module_platform_driver(samsung_keypad_driver);
 
 MODULE_DESCRIPTION("Samsung keypad driver");
 MODULE_AUTHOR("Joonyoung Shim <jy0922.shim@samsung.com>");
index 934aeb583b3035205e8c141573cbce685c812db9..da54ad5db154bf8065549779dfba335ef9088d66 100644 (file)
@@ -337,19 +337,7 @@ static struct platform_driver sh_keysc_device_driver = {
                .pm     = &sh_keysc_dev_pm_ops,
        }
 };
-
-static int __init sh_keysc_init(void)
-{
-       return platform_driver_register(&sh_keysc_device_driver);
-}
-
-static void __exit sh_keysc_exit(void)
-{
-       platform_driver_unregister(&sh_keysc_device_driver);
-}
-
-module_init(sh_keysc_init);
-module_exit(sh_keysc_exit);
+module_platform_driver(sh_keysc_device_driver);
 
 MODULE_AUTHOR("Magnus Damm");
 MODULE_DESCRIPTION("SuperH KEYSC Keypad Driver");
index d712dffd215712ee9bb419d7df062d066dcf1eac..c88bd63dc9ccc0f582fde988ce129609b7477556 100644 (file)
@@ -326,18 +326,7 @@ static struct platform_driver spear_kbd_driver = {
 #endif
        },
 };
-
-static int __init spear_kbd_init(void)
-{
-       return platform_driver_register(&spear_kbd_driver);
-}
-module_init(spear_kbd_init);
-
-static void __exit spear_kbd_exit(void)
-{
-       platform_driver_unregister(&spear_kbd_driver);
-}
-module_exit(spear_kbd_exit);
+module_platform_driver(spear_kbd_driver);
 
 MODULE_AUTHOR("Rajeev Kumar");
 MODULE_DESCRIPTION("SPEAr Keyboard Driver");
index ab7610ca10ebebd92817b641e0d4e77b1ddd2267..9397cf9c625cc8fb68514f9d9263b4385773dd71 100644 (file)
@@ -368,18 +368,7 @@ static struct platform_driver stmpe_keypad_driver = {
        .probe          = stmpe_keypad_probe,
        .remove         = __devexit_p(stmpe_keypad_remove),
 };
-
-static int __init stmpe_keypad_init(void)
-{
-       return platform_driver_register(&stmpe_keypad_driver);
-}
-module_init(stmpe_keypad_init);
-
-static void __exit stmpe_keypad_exit(void)
-{
-       platform_driver_unregister(&stmpe_keypad_driver);
-}
-module_exit(stmpe_keypad_exit);
+module_platform_driver(stmpe_keypad_driver);
 
 MODULE_LICENSE("GPL v2");
 MODULE_DESCRIPTION("STMPExxxx keypad driver");
index f60c9e82f2043b2ed4d9adbfdccaa5afa76ace36..ce916fa6781f3c64c33bbc241b4edaa7219eb390 100644 (file)
@@ -453,18 +453,7 @@ static struct platform_driver tc3589x_keypad_driver = {
        .probe  = tc3589x_keypad_probe,
        .remove = __devexit_p(tc3589x_keypad_remove),
 };
-
-static int __init tc3589x_keypad_init(void)
-{
-       return platform_driver_register(&tc3589x_keypad_driver);
-}
-module_init(tc3589x_keypad_init);
-
-static void __exit tc3589x_keypad_exit(void)
-{
-       return platform_driver_unregister(&tc3589x_keypad_driver);
-}
-module_exit(tc3589x_keypad_exit);
+module_platform_driver(tc3589x_keypad_driver);
 
 MODULE_LICENSE("GPL v2");
 MODULE_AUTHOR("Jayeeta Banerjee/Sundar Iyer");
index cf3228b0ab909a253c48f91a770172ae55acea1c..08d02f2c6a8852a1dc3d2b4e6e3a54ced14c78ab 100644 (file)
@@ -802,18 +802,7 @@ static struct platform_driver tegra_kbc_driver = {
                .pm     = &tegra_kbc_pm_ops,
        },
 };
-
-static void __exit tegra_kbc_exit(void)
-{
-       platform_driver_unregister(&tegra_kbc_driver);
-}
-module_exit(tegra_kbc_exit);
-
-static int __init tegra_kbc_init(void)
-{
-       return platform_driver_register(&tegra_kbc_driver);
-}
-module_init(tegra_kbc_init);
+module_platform_driver(tegra_kbc_driver);
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Rakesh Iyer <riyer@nvidia.com>");
index 66e55e5cfdd65d5d47d33616d5d2fff8f1413ea4..fb39c94b6fddeddc336680ede342e8189277ebba 100644 (file)
@@ -322,19 +322,7 @@ static struct platform_driver keypad_driver = {
        .driver.name    = "tnetv107x-keypad",
        .driver.owner   = THIS_MODULE,
 };
-
-static int __init keypad_init(void)
-{
-       return platform_driver_register(&keypad_driver);
-}
-
-static void __exit keypad_exit(void)
-{
-       platform_driver_unregister(&keypad_driver);
-}
-
-module_init(keypad_init);
-module_exit(keypad_exit);
+module_platform_driver(keypad_driver);
 
 MODULE_AUTHOR("Cyril Chemparathy");
 MODULE_DESCRIPTION("TNETV107X Keypad Driver");
index a26922cf0e84d3049d972b7dc0d79b986b3645fb..a588578037ebe7bb05481c221839a54287e6910b 100644 (file)
@@ -460,18 +460,7 @@ static struct platform_driver twl4030_kp_driver = {
                .owner  = THIS_MODULE,
        },
 };
-
-static int __init twl4030_kp_init(void)
-{
-       return platform_driver_register(&twl4030_kp_driver);
-}
-module_init(twl4030_kp_init);
-
-static void __exit twl4030_kp_exit(void)
-{
-       platform_driver_unregister(&twl4030_kp_driver);
-}
-module_exit(twl4030_kp_exit);
+module_platform_driver(twl4030_kp_driver);
 
 MODULE_AUTHOR("Texas Instruments");
 MODULE_DESCRIPTION("TWL4030 Keypad Driver");
index 318586dadacfb2582ea3317e25b62db7146e5ad7..99bbb7e775ae10ac3566df1ec9a1b23ae1d349ad 100644 (file)
@@ -262,19 +262,7 @@ static struct platform_driver w90p910_keypad_driver = {
                .owner  = THIS_MODULE,
        },
 };
-
-static int __init w90p910_keypad_init(void)
-{
-       return platform_driver_register(&w90p910_keypad_driver);
-}
-
-static void __exit w90p910_keypad_exit(void)
-{
-       platform_driver_unregister(&w90p910_keypad_driver);
-}
-
-module_init(w90p910_keypad_init);
-module_exit(w90p910_keypad_exit);
+module_platform_driver(w90p910_keypad_driver);
 
 MODULE_AUTHOR("Wan ZongShun <mcuos.com@gmail.com>");
 MODULE_DESCRIPTION("w90p910 keypad driver");