public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: shawn.guo@freescale.com (Shawn Guo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH RFC 2/5] ata: ahci_imx: avoid reprobing ahci_imx driver when using DT
Date: Thu, 17 Apr 2014 16:45:44 +0800	[thread overview]
Message-ID: <20140417084543.GB22160@dragon> (raw)
In-Reply-To: <E1WaLRK-0002yJ-T1@rmk-PC.arm.linux.org.uk>

On Wed, Apr 16, 2014 at 09:43:30AM +0100, Russell King wrote:
> Avoid matching our child platform device, which can happen as we copy the
> DT node to the child device.  This allows the child platform device to be
> matched against the ahci-imx driver and should this happen, it will cause
> another platform device to be allocated, resulting in failure.

This is not the case anymore, since commit 90870d7 (ahci-imx: Port to
library-ised ahci_platform) is merged into v3.15-rc1.

Shawn

> 
> Ideally, we shouldn't be copying the of_node, but this is unavoidable as
> prevents ahci_platform() obtaining its resources.
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
>  drivers/ata/ahci_imx.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/ata/ahci_imx.c b/drivers/ata/ahci_imx.c
> index 6a56a561a80b..26ee412127b3 100644
> --- a/drivers/ata/ahci_imx.c
> +++ b/drivers/ata/ahci_imx.c
> @@ -213,6 +213,10 @@ static int imx_ahci_probe(struct platform_device *pdev)
>  	unsigned int reg_val;
>  	int ret;
>  
> +	/* Prevent our child ahci device coming back to us */
> +	if (!strcmp(dev_name(&pdev->dev), "ahci"))
> +		return -ENODEV;
> +
>  	of_id = of_match_device(imx_ahci_of_match, dev);
>  	if (!of_id)
>  		return -EINVAL;
> -- 
> 1.8.3.1
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 
> 

  reply	other threads:[~2014-04-17  8:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-16  8:42 [PATCH 0/5] imx ahci DT updates + cubox-i eSATA support Russell King - ARM Linux
2014-04-16  8:43 ` [PATCH RFC 1/5] ata: ahci_imx: warn when disabling ahci link Russell King
2014-04-16  8:43 ` [PATCH RFC 2/5] ata: ahci_imx: avoid reprobing ahci_imx driver when using DT Russell King
2014-04-17  8:45   ` Shawn Guo [this message]
2014-04-17 18:37     ` Russell King - ARM Linux
2014-04-16  8:43 ` [PATCH RFC 3/5] ata: ahci_imx: allow hardware parameters to be specified in DT Russell King
2014-04-16  8:43 ` [PATCH RFC 4/5] ARM: cubox-i: add eSATA DT configuration Russell King
2014-04-16  8:43 ` [PATCH RFC 5/5] ahci_imx: add disable for spread-spectrum Russell King
2014-04-16 22:46   ` Rob Herring
2014-04-16 22:57     ` Russell King - ARM Linux
2014-04-16 23:02       ` Russell King - ARM Linux
2014-06-06 16:40         ` Russell King - ARM Linux
2014-06-06 19:50           ` Rob Herring
2014-06-17  9:47             ` Russell King - ARM Linux

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=20140417084543.GB22160@dragon \
    --to=shawn.guo@freescale.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