From: Zhangfei Gao <zhangfei.gao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
To: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>,
Baruch Siach <baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org>
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Zhangfei Gao
<zhangfei.gao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Subject: [PATCH RESEND] i2c: designware: use module_platform_driver
Date: Tue, 20 Aug 2013 16:32:28 +0800 [thread overview]
Message-ID: <1376987548-12366-1-git-send-email-zhangfei.gao@linaro.org> (raw)
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-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Acked-by: Baruch Siach <baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org>
---
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-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org>");
MODULE_DESCRIPTION("Synopsys DesignWare I2C bus adapter");
--
1.7.9.5
next reply other threads:[~2013-08-20 8:32 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-20 8:32 Zhangfei Gao [this message]
[not found] ` <1376987548-12366-1-git-send-email-zhangfei.gao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
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
[not found] ` <CACRpkdb1p1=3a0PM+r2ZrMN+ECv5BAZFdv2omDK5npaer4ddcw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-08-29 10:55 ` zhangfei gao
[not found] ` <CAMj5BkhQkwb+T9VepN7UrWNRSgtv=Dw-Sa-gv0orOANo55iqNw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-08-29 17:11 ` Linus Walleij
2013-08-30 5:48 ` Tony Lindgren
[not found] ` <20130830054858.GR7656-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2013-08-30 6:29 ` zhangfei gao
[not found] ` <CAMj5BkiDExikXi3JcVhO7RN8_82eGYhq3i6oPf5Wbipy=N+iHQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-08-30 8:27 ` Tony Lindgren
[not found] ` <20130830082712.GT7656-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2013-09-12 1:12 ` zhangfei gao
[not found] ` <CAMj5BkgqBCh0316NmoP_XMXvJTVQxxvUvs63wZfS_TvNLdqAfg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-10-08 2:46 ` zhangfei gao
[not found] ` <CAMj5Bki+BS=3sWCRdrDOEKpt6Bj+4vm0zKCJ4YBAudcqbAZySw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-10-08 5:26 ` Wolfram Sang
2013-10-08 20:53 ` Wolfram Sang
2013-10-08 22:10 ` Tony Lindgren
[not found] ` <20131008221056.GW8313-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1376987548-12366-1-git-send-email-zhangfei.gao@linaro.org \
--to=zhangfei.gao-qsej5fyqhm4dnm+yrofe0a@public.gmane.org \
--cc=baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).