Commit 725a2277f8b537a932bffb4c4bb2288d05c84a74
Committed by
David Woodhouse
1 parent
a6fb35d379
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
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: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Showing 2 changed files with 2 additions and 24 deletions Side-by-side Diff
drivers/mtd/devices/docg3.c
... | ... | @@ -2144,18 +2144,7 @@ |
2144 | 2144 | .remove = __exit_p(docg3_release), |
2145 | 2145 | }; |
2146 | 2146 | |
2147 | -static int __init docg3_init(void) | |
2148 | -{ | |
2149 | - return platform_driver_probe(&g3_driver, docg3_probe); | |
2150 | -} | |
2151 | -module_init(docg3_init); | |
2152 | - | |
2153 | - | |
2154 | -static void __exit docg3_exit(void) | |
2155 | -{ | |
2156 | - platform_driver_unregister(&g3_driver); | |
2157 | -} | |
2158 | -module_exit(docg3_exit); | |
2147 | +module_platform_driver_probe(g3_driver, docg3_probe); | |
2159 | 2148 | |
2160 | 2149 | MODULE_LICENSE("GPL"); |
2161 | 2150 | MODULE_AUTHOR("Robert Jarzmik <robert.jarzmik@free.fr>"); |
drivers/mtd/nand/docg4.c
... | ... | @@ -1397,18 +1397,7 @@ |
1397 | 1397 | .remove = __exit_p(cleanup_docg4), |
1398 | 1398 | }; |
1399 | 1399 | |
1400 | -static int __init docg4_init(void) | |
1401 | -{ | |
1402 | - return platform_driver_probe(&docg4_driver, probe_docg4); | |
1403 | -} | |
1404 | - | |
1405 | -static void __exit docg4_exit(void) | |
1406 | -{ | |
1407 | - platform_driver_unregister(&docg4_driver); | |
1408 | -} | |
1409 | - | |
1410 | -module_init(docg4_init); | |
1411 | -module_exit(docg4_exit); | |
1400 | +module_platform_driver_probe(docg4_driver, probe_docg4); | |
1412 | 1401 | |
1413 | 1402 | MODULE_LICENSE("GPL"); |
1414 | 1403 | MODULE_AUTHOR("Mike Dunn"); |