summaryrefslogtreecommitdiff
path: root/drivers/ata/ahci_platform.c
diff options
context:
space:
mode:
authorRob Herring <rob.herring@calxeda.com>2011-11-16 07:00:56 +0400
committerJeff Garzik <jgarzik@redhat.com>2011-11-17 11:10:49 +0400
commitff956135008bca99b5e38f48f0d10a2c04fef2d6 (patch)
tree651bd0c98ed22e52ac53181cdfa0c280bd81c0c8 /drivers/ata/ahci_platform.c
parentcfcfc9eca2bcbd26a8e206baeb005b055dbf8e37 (diff)
downloadlinux-ff956135008bca99b5e38f48f0d10a2c04fef2d6.tar.xz
[libata] ahci_platform: fix DT probing
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> Acked-by: Anton Vorontsov <cbouatmailru@gmail.com> Cc: Richard Zhu <richard.zhu@linaro.org> Cc: linux-ide@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata/ahci_platform.c')
-rw-r--r--drivers/ata/ahci_platform.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c
index ec555951176e..43b875810d1b 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;