linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RESEND] i2c: designware: use module_platform_driver
@ 2013-08-20  8:32 Zhangfei Gao
  2013-08-28  9:57 ` getting rid of subsys_initcall usage? (was: Re: [PATCH RESEND] i2c: designware: use module_platform_driver) Wolfram Sang
  0 siblings, 1 reply; 17+ messages in thread
From: Zhangfei Gao @ 2013-08-20  8:32 UTC (permalink / raw)
  To: linux-arm-kernel

Instead of use platform_driver_probe, use module_platform_driver
To support deferred probing
Also subsys_initcall may too early to auto set pinctl

Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
Acked-by: Baruch Siach <baruch@tkos.co.il>
---
 drivers/i2c/busses/i2c-designware-platdrv.c |   14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c
index 4c5fada..36ceebc 100644
--- a/drivers/i2c/busses/i2c-designware-platdrv.c
+++ b/drivers/i2c/busses/i2c-designware-platdrv.c
@@ -236,6 +236,7 @@ static SIMPLE_DEV_PM_OPS(dw_i2c_dev_pm_ops, dw_i2c_suspend, dw_i2c_resume);
 MODULE_ALIAS("platform:i2c_designware");
 
 static struct platform_driver dw_i2c_driver = {
+	.probe		= dw_i2c_probe,
 	.remove		= dw_i2c_remove,
 	.driver		= {
 		.name	= "i2c_designware",
@@ -245,18 +246,7 @@ static struct platform_driver dw_i2c_driver = {
 		.pm	= &dw_i2c_dev_pm_ops,
 	},
 };
-
-static int __init dw_i2c_init_driver(void)
-{
-	return platform_driver_probe(&dw_i2c_driver, dw_i2c_probe);
-}
-subsys_initcall(dw_i2c_init_driver);
-
-static void __exit dw_i2c_exit_driver(void)
-{
-	platform_driver_unregister(&dw_i2c_driver);
-}
-module_exit(dw_i2c_exit_driver);
+module_platform_driver(dw_i2c_driver);
 
 MODULE_AUTHOR("Baruch Siach <baruch@tkos.co.il>");
 MODULE_DESCRIPTION("Synopsys DesignWare I2C bus adapter");
-- 
1.7.9.5

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

end of thread, other threads:[~2013-10-18  7:32 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-20  8:32 [PATCH RESEND] i2c: designware: use module_platform_driver Zhangfei Gao
2013-08-28  9:57 ` getting rid of subsys_initcall usage? (was: Re: [PATCH RESEND] i2c: designware: use module_platform_driver) Wolfram Sang
2013-08-29  8:58   ` Linus Walleij
2013-08-29 10:55     ` zhangfei gao
2013-08-29 17:11       ` Linus Walleij
2013-08-30  5:48       ` Tony Lindgren
2013-08-30  6:29         ` zhangfei gao
2013-08-30  8:27           ` Tony Lindgren
2013-09-12  1:12             ` zhangfei gao
2013-10-08  2:46               ` zhangfei gao
2013-10-08  5:26                 ` Wolfram Sang
2013-10-08 20:53             ` Wolfram Sang
2013-10-08 22:10               ` Tony Lindgren
2013-10-17 23:34                 ` Tony Lindgren
2013-10-18  7:32                 ` Wolfram Sang
2013-10-09  0:58               ` getting rid of subsys_initcall usage? zhangfei
2013-08-30  1:51   ` zhangfei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).