From: shawnguo@kernel.org (Shawn Guo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] bus: imx-weim: Fix deferred probing
Date: Mon, 23 Nov 2015 13:09:43 +0800 [thread overview]
Message-ID: <20151123050943.GE13744@tiger> (raw)
In-Reply-To: <5623FD68.4070801@gmail.com>
On Sun, Oct 18, 2015 at 10:13:28PM +0200, Heiner Kallweit wrote:
> With CONFIG_DELAY_DEVICE_PROBES being set the weim driver
> isn't loadad because module_platform_driver_probe is
> incompatible with deferred probing.
It seems that DELAY_DEVICE_PROBES did not make its way to mainline?
Shawn
>
> Fix this by using builtin_platform_driver instead.
> Going with deferred probing also means we have to drop
> the __init annotations.
>
> Successfully tested on a I.MX6-based system.
>
> I send the patch to linux-arm-kernel as the kernel MAINTAINERS
> file doesn't list a dedicated maintainer.
>
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
> ---
> drivers/bus/imx-weim.c | 11 ++++++-----
> 1 file changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/bus/imx-weim.c b/drivers/bus/imx-weim.c
> index e98d15e..7c425d3 100644
> --- a/drivers/bus/imx-weim.c
> +++ b/drivers/bus/imx-weim.c
> @@ -59,7 +59,7 @@ static const struct of_device_id weim_id_table[] = {
> };
> MODULE_DEVICE_TABLE(of, weim_id_table);
>
> -static int __init imx_weim_gpr_setup(struct platform_device *pdev)
> +static int imx_weim_gpr_setup(struct platform_device *pdev)
> {
> struct device_node *np = pdev->dev.of_node;
> struct property *prop;
> @@ -109,7 +109,7 @@ err:
> }
>
> /* Parse and set the timing for this device. */
> -static int __init weim_timing_setup(struct device_node *np, void __iomem *base,
> +static int weim_timing_setup(struct device_node *np, void __iomem *base,
> const struct imx_weim_devtype *devtype)
> {
> u32 cs_idx, value[devtype->cs_regs_count];
> @@ -135,7 +135,7 @@ static int __init weim_timing_setup(struct device_node *np, void __iomem *base,
> return 0;
> }
>
> -static int __init weim_parse_dt(struct platform_device *pdev,
> +static int weim_parse_dt(struct platform_device *pdev,
> void __iomem *base)
> {
> const struct of_device_id *of_id = of_match_device(weim_id_table,
> @@ -172,7 +172,7 @@ static int __init weim_parse_dt(struct platform_device *pdev,
> return ret;
> }
>
> -static int __init weim_probe(struct platform_device *pdev)
> +static int weim_probe(struct platform_device *pdev)
> {
> struct resource *res;
> struct clk *clk;
> @@ -209,8 +209,9 @@ static struct platform_driver weim_driver = {
> .name = "imx-weim",
> .of_match_table = weim_id_table,
> },
> + .probe = weim_probe,
> };
> -module_platform_driver_probe(weim_driver, weim_probe);
> +builtin_platform_driver(weim_driver);
>
> MODULE_AUTHOR("Freescale Semiconductor Inc.");
> MODULE_DESCRIPTION("i.MX EIM Controller Driver");
> --
> 2.6.1
>
next prev parent reply other threads:[~2015-11-23 5:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-18 20:13 [PATCH] bus: imx-weim: Fix deferred probing Heiner Kallweit
2015-11-23 5:09 ` Shawn Guo [this message]
2015-11-23 6:41 ` Heiner Kallweit
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=20151123050943.GE13744@tiger \
--to=shawnguo@kernel.org \
--cc=linux-arm-kernel@lists.infradead.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).