Commit 00345614 authored by JiSheng Zhang's avatar JiSheng Zhang Committed by Jeff Garzik

ahci_platform: use dev_get_platdata()

Use dev_get_platdata() to retrieve the struct ahci_platform_data data
from the platform.
Signed-off-by: default avatarJiSheng Zhang <jszhang3@gmail.com>
Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
parent 6d2dd054
......@@ -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 @@ static int __init ahci_probe(struct platform_device *pdev)
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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment