diff options
| author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-01-10 18:08:01 -0500 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-01-11 02:12:46 -0500 |
| commit | d3d25808df236f27ba34125e7cf90de98fbf346c (patch) | |
| tree | 41101bbce35363c62749f547b32001842589800d | |
| parent | da733563be5a9da26fe81d9f007262d00b846e22 (diff) | |
Input: revert some over-zealous conversions to module_platform_driver()
Recent conversion to module_platform_driver() went a bit too far and
converted not only drivers that used platform_driver_register() but
also ones using platform_driver_probe(), breaking them in process.
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
| -rw-r--r-- | drivers/input/keyboard/amikbd.c | 15 | ||||
| -rw-r--r-- | drivers/input/keyboard/davinci_keyscan.c | 13 | ||||
| -rw-r--r-- | drivers/input/keyboard/nomadik-ske-keypad.c | 13 | ||||
| -rw-r--r-- | drivers/input/misc/twl4030-pwrbutton.c | 15 | ||||
| -rw-r--r-- | drivers/input/mouse/amimouse.c | 16 | ||||
| -rw-r--r-- | drivers/input/serio/at32psif.c | 14 | ||||
| -rw-r--r-- | drivers/input/touchscreen/atmel-wm97xx.c | 13 | ||||
| -rw-r--r-- | drivers/input/touchscreen/mc13783_ts.c | 13 |
8 files changed, 102 insertions, 10 deletions
diff --git a/drivers/input/keyboard/amikbd.c b/drivers/input/keyboard/amikbd.c index 6df5f6aa7908..79172af164f2 100644 --- a/drivers/input/keyboard/amikbd.c +++ b/drivers/input/keyboard/amikbd.c | |||
| @@ -259,6 +259,19 @@ static struct platform_driver amikbd_driver = { | |||
| 259 | .owner = THIS_MODULE, | 259 | .owner = THIS_MODULE, |
| 260 | }, | 260 | }, |
| 261 | }; | 261 | }; |
| 262 | module_platform_driver(amikbd_driver); | 262 | |
| 263 | static int __init amikbd_init(void) | ||
| 264 | { | ||
| 265 | return platform_driver_probe(&amikbd_driver, amikbd_probe); | ||
| 266 | } | ||
| 267 | |||
| 268 | module_init(amikbd_init); | ||
| 269 | |||
| 270 | static void __exit amikbd_exit(void) | ||
| 271 | { | ||
| 272 | platform_driver_unregister(&amikbd_driver); | ||
| 273 | } | ||
| 274 | |||
| 275 | module_exit(amikbd_exit); | ||
| 263 | 276 | ||
| 264 | MODULE_ALIAS("platform:amiga-keyboard"); | 277 | MODULE_ALIAS("platform:amiga-keyboard"); |
diff --git a/drivers/input/keyboard/davinci_keyscan.c b/drivers/input/keyboard/davinci_keyscan.c index 469825247552..9d82b3aeff5e 100644 --- a/drivers/input/keyboard/davinci_keyscan.c +++ b/drivers/input/keyboard/davinci_keyscan.c | |||
| @@ -328,7 +328,18 @@ static struct platform_driver davinci_ks_driver = { | |||
| 328 | }, | 328 | }, |
| 329 | .remove = __devexit_p(davinci_ks_remove), | 329 | .remove = __devexit_p(davinci_ks_remove), |
| 330 | }; | 330 | }; |
| 331 | module_platform_driver(davinci_ks_driver); | 331 | |
| 332 | static int __init davinci_ks_init(void) | ||
| 333 | { | ||
| 334 | return platform_driver_probe(&davinci_ks_driver, davinci_ks_probe); | ||
| 335 | } | ||
| 336 | module_init(davinci_ks_init); | ||
| 337 | |||
| 338 | static void __exit davinci_ks_exit(void) | ||
| 339 | { | ||
| 340 | platform_driver_unregister(&davinci_ks_driver); | ||
| 341 | } | ||
| 342 | module_exit(davinci_ks_exit); | ||
| 332 | 343 | ||
| 333 | MODULE_AUTHOR("Miguel Aguilar"); | 344 | MODULE_AUTHOR("Miguel Aguilar"); |
| 334 | MODULE_DESCRIPTION("Texas Instruments DaVinci Key Scan Driver"); | 345 | MODULE_DESCRIPTION("Texas Instruments DaVinci Key Scan Driver"); |
diff --git a/drivers/input/keyboard/nomadik-ske-keypad.c b/drivers/input/keyboard/nomadik-ske-keypad.c index 5a71e55c9c54..e35566aa102f 100644 --- a/drivers/input/keyboard/nomadik-ske-keypad.c +++ b/drivers/input/keyboard/nomadik-ske-keypad.c | |||
| @@ -390,7 +390,18 @@ static struct platform_driver ske_keypad_driver = { | |||
| 390 | .probe = ske_keypad_probe, | 390 | .probe = ske_keypad_probe, |
| 391 | .remove = __devexit_p(ske_keypad_remove), | 391 | .remove = __devexit_p(ske_keypad_remove), |
| 392 | }; | 392 | }; |
| 393 | module_platform_driver(ske_keypad_driver); | 393 | |
| 394 | static int __init ske_keypad_init(void) | ||
| 395 | { | ||
| 396 | return platform_driver_probe(&ske_keypad_driver, ske_keypad_probe); | ||
| 397 | } | ||
| 398 | module_init(ske_keypad_init); | ||
| 399 | |||
| 400 | static void __exit ske_keypad_exit(void) | ||
| 401 | { | ||
| 402 | platform_driver_unregister(&ske_keypad_driver); | ||
| 403 | } | ||
| 404 | module_exit(ske_keypad_exit); | ||
| 394 | 405 | ||
| 395 | MODULE_LICENSE("GPL v2"); | 406 | MODULE_LICENSE("GPL v2"); |
| 396 | MODULE_AUTHOR("Naveen Kumar <naveen.gaddipati@stericsson.com> / Sundar Iyer <sundar.iyer@stericsson.com>"); | 407 | MODULE_AUTHOR("Naveen Kumar <naveen.gaddipati@stericsson.com> / Sundar Iyer <sundar.iyer@stericsson.com>"); |
diff --git a/drivers/input/misc/twl4030-pwrbutton.c b/drivers/input/misc/twl4030-pwrbutton.c index 19a68828cd86..38e4b507b94c 100644 --- a/drivers/input/misc/twl4030-pwrbutton.c +++ b/drivers/input/misc/twl4030-pwrbutton.c | |||
| @@ -107,14 +107,25 @@ static int __exit twl4030_pwrbutton_remove(struct platform_device *pdev) | |||
| 107 | } | 107 | } |
| 108 | 108 | ||
| 109 | static struct platform_driver twl4030_pwrbutton_driver = { | 109 | static struct platform_driver twl4030_pwrbutton_driver = { |
| 110 | .probe = twl4030_pwrbutton_probe, | ||
| 111 | .remove = __exit_p(twl4030_pwrbutton_remove), | 110 | .remove = __exit_p(twl4030_pwrbutton_remove), |
| 112 | .driver = { | 111 | .driver = { |
| 113 | .name = "twl4030_pwrbutton", | 112 | .name = "twl4030_pwrbutton", |
| 114 | .owner = THIS_MODULE, | 113 | .owner = THIS_MODULE, |
| 115 | }, | 114 | }, |
| 116 | }; | 115 | }; |
| 117 | module_platform_driver(twl4030_pwrbutton_driver); | 116 | |
| 117 | static int __init twl4030_pwrbutton_init(void) | ||
| 118 | { | ||
| 119 | return platform_driver_probe(&twl4030_pwrbutton_driver, | ||
| 120 | twl4030_pwrbutton_probe); | ||
| 121 | } | ||
| 122 | module_init(twl4030_pwrbutton_init); | ||
| 123 | |||
| 124 | static void __exit twl4030_pwrbutton_exit(void) | ||
| 125 | { | ||
| 126 | platform_driver_unregister(&twl4030_pwrbutton_driver); | ||
| 127 | } | ||
| 128 | module_exit(twl4030_pwrbutton_exit); | ||
| 118 | 129 | ||
| 119 | MODULE_ALIAS("platform:twl4030_pwrbutton"); | 130 | MODULE_ALIAS("platform:twl4030_pwrbutton"); |
| 120 | MODULE_DESCRIPTION("Triton2 Power Button"); | 131 | MODULE_DESCRIPTION("Triton2 Power Button"); |
diff --git a/drivers/input/mouse/amimouse.c b/drivers/input/mouse/amimouse.c index 39be7b82c046..ff5f61a0fd3a 100644 --- a/drivers/input/mouse/amimouse.c +++ b/drivers/input/mouse/amimouse.c | |||
| @@ -140,13 +140,25 @@ static int __exit amimouse_remove(struct platform_device *pdev) | |||
| 140 | } | 140 | } |
| 141 | 141 | ||
| 142 | static struct platform_driver amimouse_driver = { | 142 | static struct platform_driver amimouse_driver = { |
| 143 | .probe = amimouse_probe, | ||
| 144 | .remove = __exit_p(amimouse_remove), | 143 | .remove = __exit_p(amimouse_remove), |
| 145 | .driver = { | 144 | .driver = { |
| 146 | .name = "amiga-mouse", | 145 | .name = "amiga-mouse", |
| 147 | .owner = THIS_MODULE, | 146 | .owner = THIS_MODULE, |
| 148 | }, | 147 | }, |
| 149 | }; | 148 | }; |
| 150 | module_platform_driver(amimouse_driver); | 149 | |
| 150 | static int __init amimouse_init(void) | ||
| 151 | { | ||
| 152 | return platform_driver_probe(&amimouse_driver, amimouse_probe); | ||
| 153 | } | ||
| 154 | |||
| 155 | module_init(amimouse_init); | ||
| 156 | |||
| 157 | static void __exit amimouse_exit(void) | ||
| 158 | { | ||
| 159 | platform_driver_unregister(&amimouse_driver); | ||
| 160 | } | ||
| 161 | |||
| 162 | module_exit(amimouse_exit); | ||
| 151 | 163 | ||
| 152 | MODULE_ALIAS("platform:amiga-mouse"); | 164 | MODULE_ALIAS("platform:amiga-mouse"); |
diff --git a/drivers/input/serio/at32psif.c b/drivers/input/serio/at32psif.c index 421a7442e464..95280f9207e1 100644 --- a/drivers/input/serio/at32psif.c +++ b/drivers/input/serio/at32psif.c | |||
| @@ -358,7 +358,19 @@ static struct platform_driver psif_driver = { | |||
| 358 | .suspend = psif_suspend, | 358 | .suspend = psif_suspend, |
| 359 | .resume = psif_resume, | 359 | .resume = psif_resume, |
| 360 | }; | 360 | }; |
| 361 | module_platform_driver(psif_driver); | 361 | |
| 362 | static int __init psif_init(void) | ||
| 363 | { | ||
| 364 | return platform_driver_probe(&psif_driver, psif_probe); | ||
| 365 | } | ||
| 366 | |||
| 367 | static void __exit psif_exit(void) | ||
| 368 | { | ||
| 369 | platform_driver_unregister(&psif_driver); | ||
| 370 | } | ||
| 371 | |||
| 372 | module_init(psif_init); | ||
| 373 | module_exit(psif_exit); | ||
| 362 | 374 | ||
| 363 | MODULE_AUTHOR("Hans-Christian Egtvedt <egtvedt@samfundet.no>"); | 375 | MODULE_AUTHOR("Hans-Christian Egtvedt <egtvedt@samfundet.no>"); |
| 364 | MODULE_DESCRIPTION("Atmel AVR32 PSIF PS/2 driver"); | 376 | MODULE_DESCRIPTION("Atmel AVR32 PSIF PS/2 driver"); |
diff --git a/drivers/input/touchscreen/atmel-wm97xx.c b/drivers/input/touchscreen/atmel-wm97xx.c index d016cb26d125..8034cbb20f74 100644 --- a/drivers/input/touchscreen/atmel-wm97xx.c +++ b/drivers/input/touchscreen/atmel-wm97xx.c | |||
| @@ -429,7 +429,18 @@ static struct platform_driver atmel_wm97xx_driver = { | |||
| 429 | .suspend = atmel_wm97xx_suspend, | 429 | .suspend = atmel_wm97xx_suspend, |
| 430 | .resume = atmel_wm97xx_resume, | 430 | .resume = atmel_wm97xx_resume, |
| 431 | }; | 431 | }; |
| 432 | module_platform_driver(atmel_wm97xx_driver); | 432 | |
| 433 | static int __init atmel_wm97xx_init(void) | ||
| 434 | { | ||
| 435 | return platform_driver_probe(&atmel_wm97xx_driver, atmel_wm97xx_probe); | ||
| 436 | } | ||
| 437 | module_init(atmel_wm97xx_init); | ||
| 438 | |||
| 439 | static void __exit atmel_wm97xx_exit(void) | ||
| 440 | { | ||
| 441 | platform_driver_unregister(&atmel_wm97xx_driver); | ||
| 442 | } | ||
| 443 | module_exit(atmel_wm97xx_exit); | ||
| 433 | 444 | ||
| 434 | MODULE_AUTHOR("Hans-Christian Egtvedt <egtvedt@samfundet.no>"); | 445 | MODULE_AUTHOR("Hans-Christian Egtvedt <egtvedt@samfundet.no>"); |
| 435 | MODULE_DESCRIPTION("wm97xx continuous touch driver for Atmel AT91 and AVR32"); | 446 | MODULE_DESCRIPTION("wm97xx continuous touch driver for Atmel AT91 and AVR32"); |
diff --git a/drivers/input/touchscreen/mc13783_ts.c b/drivers/input/touchscreen/mc13783_ts.c index 68f86f7dabbc..ede02743eac1 100644 --- a/drivers/input/touchscreen/mc13783_ts.c +++ b/drivers/input/touchscreen/mc13783_ts.c | |||
| @@ -240,7 +240,18 @@ static struct platform_driver mc13783_ts_driver = { | |||
| 240 | .name = MC13783_TS_NAME, | 240 | .name = MC13783_TS_NAME, |
| 241 | }, | 241 | }, |
| 242 | }; | 242 | }; |
| 243 | module_platform_driver(mc13783_ts_driver); | 243 | |
| 244 | static int __init mc13783_ts_init(void) | ||
| 245 | { | ||
| 246 | return platform_driver_probe(&mc13783_ts_driver, &mc13783_ts_probe); | ||
| 247 | } | ||
| 248 | module_init(mc13783_ts_init); | ||
| 249 | |||
| 250 | static void __exit mc13783_ts_exit(void) | ||
| 251 | { | ||
| 252 | platform_driver_unregister(&mc13783_ts_driver); | ||
| 253 | } | ||
| 254 | module_exit(mc13783_ts_exit); | ||
| 244 | 255 | ||
| 245 | MODULE_DESCRIPTION("MC13783 input touchscreen driver"); | 256 | MODULE_DESCRIPTION("MC13783 input touchscreen driver"); |
| 246 | MODULE_AUTHOR("Sascha Hauer <s.hauer@pengutronix.de>"); | 257 | MODULE_AUTHOR("Sascha Hauer <s.hauer@pengutronix.de>"); |
