From: Wolfram Sang <wsa@the-dreams.de>
To: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org,
Linus Walleij <linus.walleij@linaro.org>,
linux-i2c@vger.kernel.org, Wolfram Sang <wsa@the-dreams.de>
Subject: [PATCH 4/9] i2c: i2c-stu300: replace platform_driver_probe to support deferred probing
Date: Tue, 8 Oct 2013 22:35:36 +0200 [thread overview]
Message-ID: <1381264542-29396-5-git-send-email-wsa@the-dreams.de> (raw)
In-Reply-To: <1381264542-29396-1-git-send-email-wsa@the-dreams.de>
Subsystems like pinctrl and gpio rightfully make use of deferred probing at
core level. Now, deferred drivers won't be retried if they don't have a .probe
function specified in the driver struct. Fix this driver to have that, so the
devices it supports won't get lost in a deferred probe.
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Cc: Linus Walleij <linus.walleij@linaro.org>
---
drivers/i2c/busses/i2c-stu300.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/i2c/busses/i2c-stu300.c b/drivers/i2c/busses/i2c-stu300.c
index f8f6f2e..04a17b9 100644
--- a/drivers/i2c/busses/i2c-stu300.c
+++ b/drivers/i2c/busses/i2c-stu300.c
@@ -859,8 +859,7 @@ static const struct i2c_algorithm stu300_algo = {
.functionality = stu300_func,
};
-static int __init
-stu300_probe(struct platform_device *pdev)
+static int stu300_probe(struct platform_device *pdev)
{
struct stu300_dev *dev;
struct i2c_adapter *adap;
@@ -966,8 +965,7 @@ static SIMPLE_DEV_PM_OPS(stu300_pm, stu300_suspend, stu300_resume);
#define STU300_I2C_PM NULL
#endif
-static int __exit
-stu300_remove(struct platform_device *pdev)
+static int stu300_remove(struct platform_device *pdev)
{
struct stu300_dev *dev = platform_get_drvdata(pdev);
@@ -989,13 +987,14 @@ static struct platform_driver stu300_i2c_driver = {
.pm = STU300_I2C_PM,
.of_match_table = stu300_dt_match,
},
- .remove = __exit_p(stu300_remove),
+ .probe = stu300_probe,
+ .remove = stu300_remove,
};
static int __init stu300_init(void)
{
- return platform_driver_probe(&stu300_i2c_driver, stu300_probe);
+ return platform_driver_register(&stu300_i2c_driver);
}
static void __exit stu300_exit(void)
--
1.8.4.rc3
next prev parent reply other threads:[~2013-10-08 20:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-08 20:35 [PATCH 0/9] fix deferred probing issue of platform_driver_probe Wolfram Sang
2013-10-08 20:35 ` [PATCH 1/9] i2c: i2c-designware-platdrv: replace platform_driver_probe to support deferred probing Wolfram Sang
[not found] ` <1381264542-29396-2-git-send-email-wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
2013-10-14 1:09 ` zhangfei gao
2013-10-08 20:35 ` [PATCH 2/9] i2c: i2c-imx: " Wolfram Sang
[not found] ` <1381264542-29396-3-git-send-email-wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
2013-10-09 7:34 ` Uwe Kleine-König
2013-10-08 20:35 ` [PATCH 3/9] i2c: i2c-mxs: " Wolfram Sang
[not found] ` <1381264542-29396-4-git-send-email-wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
2013-10-08 20:58 ` Marek Vasut
2013-10-08 20:35 ` Wolfram Sang [this message]
2013-10-09 13:37 ` [PATCH 4/9] i2c: i2c-stu300: " Linus Walleij
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=1381264542-29396-5-git-send-email-wsa@the-dreams.de \
--to=wsa@the-dreams.de \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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).