diff mbox series

ahci_qoriq: bug fix for ecc_addr

Message ID 1560319823-20418-1-git-send-email-udit.kumar@nxp.com
State Not Applicable
Delegated to: David Miller
Headers show
Series ahci_qoriq: bug fix for ecc_addr | expand

Commit Message

Udit Kumar June 12, 2019, 6:10 a.m. UTC
Original driver expect a register node with name "sata-ecc"
this node is of 64 bit wide.
In ACPI such nodes can be provided with QWordMemory, but
QWordMemory can not hold DescriptorName more than 4 characters.

Therefore this patch changes platform property retrival based
upon index instead of named.

Signed-off-by: Udit Kumar <udit.kumar@nxp.com>
---
 drivers/ata/ahci_qoriq.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/drivers/ata/ahci_qoriq.c b/drivers/ata/ahci_qoriq.c
index ea1175f..f179137 100644
--- a/drivers/ata/ahci_qoriq.c
+++ b/drivers/ata/ahci_qoriq.c
@@ -281,9 +281,7 @@  static int ahci_qoriq_probe(struct platform_device *pdev)
 	qoriq_priv->type = (enum ahci_qoriq_type)of_id->data;
 
 	if (unlikely(!ecc_initialized)) {
-		res = platform_get_resource_byname(pdev,
-						   IORESOURCE_MEM,
-						   "sata-ecc");
+		res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
 		if (res) {
 			qoriq_priv->ecc_addr =
 				devm_ioremap_resource(dev, res);