From: "Uwe Kleine-König" <u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
To: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org,
linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 2/9] i2c: i2c-imx: replace platform_driver_probe to support deferred probing
Date: Wed, 9 Oct 2013 09:34:23 +0200 [thread overview]
Message-ID: <20131009073423.GS10079@pengutronix.de> (raw)
In-Reply-To: <1381264542-29396-3-git-send-email-wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
On Tue, Oct 08, 2013 at 10:35:34PM +0200, Wolfram Sang wrote:
> 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-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
> Cc: kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org
Acked-by: Uwe Kleine-König <u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Thanks
Uwe
> ---
> drivers/i2c/busses/i2c-imx.c | 11 ++++++-----
> 1 file changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
> index ccf4665..1d7efa3 100644
> --- a/drivers/i2c/busses/i2c-imx.c
> +++ b/drivers/i2c/busses/i2c-imx.c
> @@ -365,7 +365,7 @@ static void i2c_imx_stop(struct imx_i2c_struct *i2c_imx)
> clk_disable_unprepare(i2c_imx->clk);
> }
>
> -static void __init i2c_imx_set_clk(struct imx_i2c_struct *i2c_imx,
> +static void i2c_imx_set_clk(struct imx_i2c_struct *i2c_imx,
> unsigned int rate)
> {
> struct imx_i2c_clk_pair *i2c_clk_div = i2c_imx->hwdata->clk_div;
> @@ -589,7 +589,7 @@ static struct i2c_algorithm i2c_imx_algo = {
> .functionality = i2c_imx_func,
> };
>
> -static int __init i2c_imx_probe(struct platform_device *pdev)
> +static int i2c_imx_probe(struct platform_device *pdev)
> {
> const struct of_device_id *of_id = of_match_device(i2c_imx_dt_ids,
> &pdev->dev);
> @@ -697,7 +697,7 @@ static int __init i2c_imx_probe(struct platform_device *pdev)
> return 0; /* Return OK */
> }
>
> -static int __exit i2c_imx_remove(struct platform_device *pdev)
> +static int i2c_imx_remove(struct platform_device *pdev)
> {
> struct imx_i2c_struct *i2c_imx = platform_get_drvdata(pdev);
>
> @@ -715,7 +715,8 @@ static int __exit i2c_imx_remove(struct platform_device *pdev)
> }
>
> static struct platform_driver i2c_imx_driver = {
> - .remove = __exit_p(i2c_imx_remove),
> + .probe = i2c_imx_probe,
> + .remove = i2c_imx_remove,
> .driver = {
> .name = DRIVER_NAME,
> .owner = THIS_MODULE,
> @@ -726,7 +727,7 @@ static struct platform_driver i2c_imx_driver = {
>
> static int __init i2c_adap_imx_init(void)
> {
> - return platform_driver_probe(&i2c_imx_driver, i2c_imx_probe);
> + return platform_driver_register(&i2c_imx_driver);
> }
> subsys_initcall(i2c_adap_imx_init);
>
> --
> 1.8.4.rc3
>
>
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
next prev parent reply other threads:[~2013-10-09 7:34 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 [this message]
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 ` [PATCH 4/9] i2c: i2c-stu300: " Wolfram Sang
2013-10-09 13:37 ` 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=20131009073423.GS10079@pengutronix.de \
--to=u.kleine-koenig-bicnvbalz9megne8c9+irq@public.gmane.org \
--cc=kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-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).