Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

authored by

Rob Herring and committed by
Jeff Garzik
ff956135 cfcfc9ec

+1 -1
+1 -1
drivers/ata/ahci_platform.c
··· 67 67 struct device *dev = &pdev->dev; 68 68 struct ahci_platform_data *pdata = dev_get_platdata(dev); 69 69 const struct platform_device_id *id = platform_get_device_id(pdev); 70 - struct ata_port_info pi = ahci_port_info[id->driver_data]; 70 + struct ata_port_info pi = ahci_port_info[id ? id->driver_data : 0]; 71 71 const struct ata_port_info *ppi[] = { &pi, NULL }; 72 72 struct ahci_host_priv *hpriv; 73 73 struct ata_host *host;