Skip to content

Commit

Permalink
ahci_platform: use dev_get_platdata()
Browse files Browse the repository at this point in the history
Use dev_get_platdata() to retrieve the struct ahci_platform_data data
from the platform.

Signed-off-by: JiSheng Zhang <[email protected]>
Signed-off-by: Jeff Garzik <[email protected]>
  • Loading branch information
absabs authored and Jeff Garzik committed Nov 9, 2011
1 parent 6d2dd05 commit 0034561
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/ata/ahci_platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 0034561

Please sign in to comment.