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>
This commit is contained in:
Dmitry Torokhov
2012-01-10 15:08:01 -08:00
parent da733563be
commit d3d25808df
8 changed files with 102 additions and 10 deletions

View File

@@ -140,13 +140,25 @@ static int __exit amimouse_remove(struct platform_device *pdev)
}
static struct platform_driver amimouse_driver = {
.probe = amimouse_probe,
.remove = __exit_p(amimouse_remove),
.driver = {
.name = "amiga-mouse",
.owner = THIS_MODULE,
},
};
module_platform_driver(amimouse_driver);
static int __init amimouse_init(void)
{
return platform_driver_probe(&amimouse_driver, amimouse_probe);
}
module_init(amimouse_init);
static void __exit amimouse_exit(void)
{
platform_driver_unregister(&amimouse_driver);
}
module_exit(amimouse_exit);
MODULE_ALIAS("platform:amiga-mouse");