[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1326267956.15588.4.camel@phoenix>
Date: Wed, 11 Jan 2012 15:45:56 +0800
From: Axel Lin <axel.lin@...il.com>
To: linux-kernel@...r.kernel.org
Cc: Ashish Jangam <ashish.jangam@...tcummins.com>,
Anton Vorontsov <cbouatmailru@...il.com>,
David Dajun Chen <dchen@...semi.com>
Subject: [PATCH 3/3] power_supply: da9052-battery: Convert to use
module_platform_driver
Use the module_platform_driver() macro which makes the code smaller and a bit
simpler.
Signed-off-by: Axel Lin <axel.lin@...il.com>
---
drivers/power/da9052-battery.c | 12 +-----------
1 files changed, 1 insertions(+), 11 deletions(-)
diff --git a/drivers/power/da9052-battery.c b/drivers/power/da9052-battery.c
index daf52a4..d648ba9 100644
--- a/drivers/power/da9052-battery.c
+++ b/drivers/power/da9052-battery.c
@@ -648,17 +648,7 @@ static struct platform_driver da9052_bat_driver = {
},
};
-static int __init da9052_bat_init(void)
-{
- return platform_driver_register(&da9052_bat_driver);
-}
-module_init(da9052_bat_init);
-
-static void __exit da9052_bat_exit(void)
-{
- platform_driver_unregister(&da9052_bat_driver);
-}
-module_exit(da9052_bat_exit);
+module_platform_driver(da9052_bat_driver);
MODULE_DESCRIPTION("DA9052 BAT Device Driver");
MODULE_AUTHOR("David Dajun Chen <dchen@...semi.com>");
--
1.7.5.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists