[PATCH 3.6.0-] mtd/spear_smi: use module_platform_driver macro

Srinivas KANDAGATLA srinivas.kandagatla at st.com
Wed Oct 10 14:39:59 EDT 2012


From: Srinivas Kandagatla <srinivas.kandagatla at st.com>

This patch removes some code duplication by using
module_platform_driver.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla at st.com>
---
 drivers/mtd/devices/spear_smi.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)

diff --git a/drivers/mtd/devices/spear_smi.c b/drivers/mtd/devices/spear_smi.c
index 6796036..e5f0699 100644
--- a/drivers/mtd/devices/spear_smi.c
+++ b/drivers/mtd/devices/spear_smi.c
@@ -1129,18 +1129,7 @@ static struct platform_driver spear_smi_driver = {
 	.suspend = spear_smi_suspend,
 	.resume = spear_smi_resume,
 };
-
-static int spear_smi_init(void)
-{
-	return platform_driver_register(&spear_smi_driver);
-}
-module_init(spear_smi_init);
-
-static void spear_smi_exit(void)
-{
-	platform_driver_unregister(&spear_smi_driver);
-}
-module_exit(spear_smi_exit);
+module_platform_driver(spear_smi_driver);
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Ashish Priyadarshi, Shiraz Hashim <shiraz.hashim at st.com>");
-- 
1.7.0.4




More information about the linux-mtd mailing list