ata: ahci_platform: fix DT probing
Subsystems (2)
PATCH 1/1 ata: ahci_platform: fix DT probing
From: Rob Herring <[email protected]>
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 <[email protected]>
Cc Richard Zhu <[email protected]>
Cc Anton Vorontsov <[email protected]>
Cc Jeff Garzik <[email protected]>
--- drivers/ata/ahci_platform.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/ata/ahci_platform.c +1 -1
@@ -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;
Signature · 1 line
1.7.5.4
Quoted 6 lines · Rob Herring
From: Rob Herring <[email protected]>
The change in commit
904c04feaf13ed"ahci_platform: Add theboard_ids..." doesn't work for the DT probing case asplatform_get_device_idreturns NULL. Pick the defaultahci_port_infoin this case.
Quoted 7 lines
Signed-off-by Rob Herring <[email protected]>Cc Richard Zhu <[email protected]>Cc Anton Vorontsov <[email protected]>Cc Jeff Garzik <[email protected]>---
Acked-by Anton Vorontsov <[email protected]>
Thanks!
Signature · 2 lines
Anton Vorontsov Email: [email protected]