diff options
author | JiSheng Zhang <jszhang3@gmail.com> | 2011-10-31 09:20:10 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2011-11-09 01:36:00 -0500 |
commit | 003456145f0d23b73f080abd1fd7981788438693 (patch) | |
tree | 2bbfae7454e43b6f10e6205b9a6ae14d65099db3 /drivers/ata | |
parent | 6d2dd054295e26dad0a84e2fe2029a1428242f8b (diff) |
ahci_platform: use dev_get_platdata()
Use dev_get_platdata() to retrieve the struct ahci_platform_data data
from the platform.
Signed-off-by: JiSheng Zhang <jszhang3@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/ahci_platform.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c index 004f2ce3dc73..ec555951176e 100644 --- a/drivers/ata/ahci_platform.c +++ b/drivers/ata/ahci_platform.c | |||
@@ -65,7 +65,7 @@ static struct scsi_host_template ahci_platform_sht = { | |||
65 | static int __init ahci_probe(struct platform_device *pdev) | 65 | static int __init ahci_probe(struct platform_device *pdev) |
66 | { | 66 | { |
67 | struct device *dev = &pdev->dev; | 67 | struct device *dev = &pdev->dev; |
68 | struct ahci_platform_data *pdata = dev->platform_data; | 68 | struct ahci_platform_data *pdata = dev_get_platdata(dev); |
69 | const struct platform_device_id *id = platform_get_device_id(pdev); | 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->driver_data]; |
71 | const struct ata_port_info *ppi[] = { &pi, NULL }; | 71 | const struct ata_port_info *ppi[] = { &pi, NULL }; |
@@ -191,7 +191,7 @@ err0: | |||
191 | static int __devexit ahci_remove(struct platform_device *pdev) | 191 | static int __devexit ahci_remove(struct platform_device *pdev) |
192 | { | 192 | { |
193 | struct device *dev = &pdev->dev; | 193 | struct device *dev = &pdev->dev; |
194 | struct ahci_platform_data *pdata = dev->platform_data; | 194 | struct ahci_platform_data *pdata = dev_get_platdata(dev); |
195 | struct ata_host *host = dev_get_drvdata(dev); | 195 | struct ata_host *host = dev_get_drvdata(dev); |
196 | 196 | ||
197 | ata_host_detach(host); | 197 | ata_host_detach(host); |