linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: hkallweit1@gmail.com (Heiner Kallweit)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] bus: imx-weim: Fix deferred probing
Date: Mon, 23 Nov 2015 07:41:41 +0100	[thread overview]
Message-ID: <5652B525.9090302@gmail.com> (raw)
In-Reply-To: <20151123050943.GE13744@tiger>

Am 23.11.2015 um 06:09 schrieb Shawn Guo:
> 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?
> 
Yes, seems like it broke quite a lot of systems and I found some
discussions where Greg KH expressed his wish to have it removed again.
The patch therefore isn't needed.

Heiner

> 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
>>
> 

      reply	other threads:[~2015-11-23  6:41 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
2015-11-23  6:41   ` Heiner Kallweit [this message]

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=5652B525.9090302@gmail.com \
    --to=hkallweit1@gmail.com \
    --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).