[PATCH] mfd: syscon: Use module_platform_driver()

From: Kefeng Wang
Date: Mon Jun 09 2014 - 10:35:14 EST


Convert to module_platform_drive() to eliminate boilerplate code.

Signed-off-by: Kefeng Wang <wangkefeng.wang@xxxxxxxxxx>
---
drivers/mfd/syscon.c | 12 +-----------
1 files changed, 1 insertions(+), 11 deletions(-)

diff --git a/drivers/mfd/syscon.c b/drivers/mfd/syscon.c
index ca15878..6c2c874 100644
--- a/drivers/mfd/syscon.c
+++ b/drivers/mfd/syscon.c
@@ -173,17 +173,7 @@ static struct platform_driver syscon_driver = {
.id_table = syscon_ids,
};

-static int __init syscon_init(void)
-{
- return platform_driver_register(&syscon_driver);
-}
-postcore_initcall(syscon_init);
-
-static void __exit syscon_exit(void)
-{
- platform_driver_unregister(&syscon_driver);
-}
-module_exit(syscon_exit);
+module_platform_driver(syscon_driver)

MODULE_AUTHOR("Dong Aisheng <dong.aisheng@xxxxxxxxxx>");
MODULE_DESCRIPTION("System Control driver");
--
1.7.1


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/