Commit 725a2277 authored by Jingoo Han's avatar Jingoo Han Committed by David Woodhouse

mtd: doc: use module_platform_driver_probe()

This patch uses module_platform_driver_probe() macro which makes
the code smaller and simpler.
Signed-off-by: default avatarJingoo Han <jg1.han@samsung.com>
Signed-off-by: default avatarArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent a6fb35d3
...@@ -2144,18 +2144,7 @@ static struct platform_driver g3_driver = { ...@@ -2144,18 +2144,7 @@ static struct platform_driver g3_driver = {
.remove = __exit_p(docg3_release), .remove = __exit_p(docg3_release),
}; };
static int __init docg3_init(void) module_platform_driver_probe(g3_driver, docg3_probe);
{
return platform_driver_probe(&g3_driver, docg3_probe);
}
module_init(docg3_init);
static void __exit docg3_exit(void)
{
platform_driver_unregister(&g3_driver);
}
module_exit(docg3_exit);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_AUTHOR("Robert Jarzmik <robert.jarzmik@free.fr>"); MODULE_AUTHOR("Robert Jarzmik <robert.jarzmik@free.fr>");
......
...@@ -1397,18 +1397,7 @@ static struct platform_driver docg4_driver = { ...@@ -1397,18 +1397,7 @@ static struct platform_driver docg4_driver = {
.remove = __exit_p(cleanup_docg4), .remove = __exit_p(cleanup_docg4),
}; };
static int __init docg4_init(void) module_platform_driver_probe(docg4_driver, probe_docg4);
{
return platform_driver_probe(&docg4_driver, probe_docg4);
}
static void __exit docg4_exit(void)
{
platform_driver_unregister(&docg4_driver);
}
module_init(docg4_init);
module_exit(docg4_exit);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mike Dunn"); MODULE_AUTHOR("Mike Dunn");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment