Skip to contentSkip to conversation

ahci_platform: use dev_get_platdata()

PATCH New JiSheng Zhang 1 participant 1 message Oct 31, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 ahci_platform: use dev_get_platdata()

Use dev_get_platdata() to retrieve the struct ahci_platform_data data from the platform.

---
 drivers/ata/ahci_platform.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/ata/ahci_platform.c +2 -2
index c03277d..45edba9 100644
@@ -65,7 +65,7 @@ static struct scsi_host_template ahci_platform_sht = {
 static int __init ahci_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
-	struct ahci_platform_data *pdata = dev->platform_data;
+	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];
 	const struct ata_port_info *ppi[] = { &pi, NULL };
@@ -191,7 +191,7 @@ err0:
 static int __devexit ahci_remove(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
-	struct ahci_platform_data *pdata = dev->platform_data;
+	struct ahci_platform_data *pdata = dev_get_platdata(dev);
 	struct ata_host *host = dev_get_drvdata(dev);
 
 	ata_host_detach(host);
Signature · 1 line
1.7.6.3