lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1321412456-31107-1-git-send-email-robherring2@gmail.com>
Date:	Tue, 15 Nov 2011 21:00:56 -0600
From:	Rob Herring <robherring2@...il.com>
To:	Jeff Garzik <jgarzik@...ox.com>
Cc:	Rob Herring <rob.herring@...xeda.com>,
	Richard Zhu <richard.zhu@...aro.org>,
	Anton Vorontsov <avorontsov@...sta.com>,
	linux-ide@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] ata: ahci_platform: fix DT probing

From: Rob Herring <rob.herring@...xeda.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@...xeda.com>
Cc: Richard Zhu <richard.zhu@...aro.org>
Cc: Anton Vorontsov <avorontsov@...sta.com>
Cc: Jeff Garzik <jgarzik@...ox.com>
Cc: linux-ide@...r.kernel.org
Cc: linux-kernel@...r.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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ