linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ata: ahci_platform: fix DT probing
@ 2011-11-16  3:00 Rob Herring
  2011-11-16 11:54 ` Anton Vorontsov
  0 siblings, 1 reply; 2+ messages in thread
From: Rob Herring @ 2011-11-16  3:00 UTC (permalink / raw)
  To: Jeff Garzik
  Cc: Rob Herring, Richard Zhu, Anton Vorontsov, linux-ide,
	linux-kernel

From: Rob Herring <rob.herring@calxeda.com>

The change in commit 904c04feaf13ed "ahci_platform: Add the board_ids..."
doesn't work for the DT probing case as platform_get_device_id returns
NULL. Pick the default ahci_port_info in this case.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Richard Zhu <richard.zhu@linaro.org>
Cc: Anton Vorontsov <avorontsov@mvista.com>
Cc: Jeff Garzik <jgarzik@pobox.com>
Cc: linux-ide@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
 drivers/ata/ahci_platform.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c
index ec55595..43b8758 100644
--- a/drivers/ata/ahci_platform.c
+++ b/drivers/ata/ahci_platform.c
@@ -67,7 +67,7 @@ static int __init ahci_probe(struct platform_device *pdev)
 	struct device *dev = &pdev->dev;
 	struct ahci_platform_data *pdata = dev_get_platdata(dev);
 	const struct platform_device_id *id = platform_get_device_id(pdev);
-	struct ata_port_info pi = ahci_port_info[id->driver_data];
+	struct ata_port_info pi = ahci_port_info[id ? id->driver_data : 0];
 	const struct ata_port_info *ppi[] = { &pi, NULL };
 	struct ahci_host_priv *hpriv;
 	struct ata_host *host;
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ata: ahci_platform: fix DT probing
  2011-11-16  3:00 [PATCH] ata: ahci_platform: fix DT probing Rob Herring
@ 2011-11-16 11:54 ` Anton Vorontsov
  0 siblings, 0 replies; 2+ messages in thread
From: Anton Vorontsov @ 2011-11-16 11:54 UTC (permalink / raw)
  To: Rob Herring
  Cc: Jeff Garzik, Rob Herring, Richard Zhu, linux-ide, linux-kernel

On Tue, Nov 15, 2011 at 09:00:56PM -0600, Rob Herring wrote:
> From: Rob Herring <rob.herring@calxeda.com>
> 
> The change in commit 904c04feaf13ed "ahci_platform: Add the board_ids..."
> doesn't work for the DT probing case as platform_get_device_id returns
> NULL. Pick the default ahci_port_info in this case.
> 
> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
> Cc: Richard Zhu <richard.zhu@linaro.org>
> Cc: Anton Vorontsov <avorontsov@mvista.com>
> Cc: Jeff Garzik <jgarzik@pobox.com>
> Cc: linux-ide@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> ---

Acked-by: Anton Vorontsov <cbouatmailru@gmail.com>

Thanks!

-- 
Anton Vorontsov
Email: cbouatmailru@gmail.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-11-16 11:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-16  3:00 [PATCH] ata: ahci_platform: fix DT probing Rob Herring
2011-11-16 11:54 ` Anton Vorontsov

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