public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] twl4030_charger: use module_platform_driver_probe()
@ 2013-03-05  4:01 Jingoo Han
  2013-04-01  6:05 ` Anton Vorontsov
  0 siblings, 1 reply; 2+ messages in thread
From: Jingoo Han @ 2013-03-05  4:01 UTC (permalink / raw)
  To: 'Anton Vorontsov'
  Cc: 'David Woodhouse', linux-kernel, 'Jingoo Han'

This patch uses module_platform_driver_probe() macro which makes
the code smaller and simpler.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
 drivers/power/twl4030_charger.c |   12 +-----------
 1 files changed, 1 insertions(+), 11 deletions(-)

diff --git a/drivers/power/twl4030_charger.c b/drivers/power/twl4030_charger.c
index a69d0d1..bed4581 100644
--- a/drivers/power/twl4030_charger.c
+++ b/drivers/power/twl4030_charger.c
@@ -636,17 +636,7 @@ static struct platform_driver twl4030_bci_driver = {
 	.remove	= __exit_p(twl4030_bci_remove),
 };
 
-static int __init twl4030_bci_init(void)
-{
-	return platform_driver_probe(&twl4030_bci_driver, twl4030_bci_probe);
-}
-module_init(twl4030_bci_init);
-
-static void __exit twl4030_bci_exit(void)
-{
-	platform_driver_unregister(&twl4030_bci_driver);
-}
-module_exit(twl4030_bci_exit);
+module_platform_driver_probe(twl4030_bci_driver, twl4030_bci_probe);
 
 MODULE_AUTHOR("Gražvydas Ignotas");
 MODULE_DESCRIPTION("TWL4030 Battery Charger Interface driver");
-- 
1.7.2.5



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] twl4030_charger: use module_platform_driver_probe()
  2013-03-05  4:01 [PATCH] twl4030_charger: use module_platform_driver_probe() Jingoo Han
@ 2013-04-01  6:05 ` Anton Vorontsov
  0 siblings, 0 replies; 2+ messages in thread
From: Anton Vorontsov @ 2013-04-01  6:05 UTC (permalink / raw)
  To: Jingoo Han; +Cc: 'David Woodhouse', linux-kernel

On Tue, Mar 05, 2013 at 01:01:36PM +0900, Jingoo Han wrote:
> This patch uses module_platform_driver_probe() macro which makes
> the code smaller and simpler.
> 
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>
> ---

Applied, thanks!

Anton

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-04-01  6:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-05  4:01 [PATCH] twl4030_charger: use module_platform_driver_probe() Jingoo Han
2013-04-01  6:05 ` Anton Vorontsov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox