From 90f0adf0936d464a337512e6cbe7929a49bf3c55 Mon Sep 17 00:00:00 2001 From: Sergei Shtylyov Date: Wed, 12 Oct 2011 19:09:09 +0400 Subject: pata_arasan_cf: remove bogus to_platform_device() calls The suspend()/resume() methods already get the right 'struct device' to get the driver data from -- there's no need to get to the 'struct platform_device' that contains that 'struct device' just to call dev_get_drvdata()... Acked-by: Viresh Kumar Signed-off-by: Sergei Shtylyov Signed-off-by: Jeff Garzik --- drivers/ata/pata_arasan_cf.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'drivers/ata') diff --git a/drivers/ata/pata_arasan_cf.c b/drivers/ata/pata_arasan_cf.c index 719bb73a73e0..e8574bba3ee4 100644 --- a/drivers/ata/pata_arasan_cf.c +++ b/drivers/ata/pata_arasan_cf.c @@ -922,8 +922,7 @@ static int __devexit arasan_cf_remove(struct platform_device *pdev) #ifdef CONFIG_PM static int arasan_cf_suspend(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct ata_host *host = dev_get_drvdata(&pdev->dev); + struct ata_host *host = dev_get_drvdata(dev); struct arasan_cf_dev *acdev = host->ports[0]->private_data; if (acdev->dma_chan) { @@ -937,8 +936,7 @@ static int arasan_cf_suspend(struct device *dev) static int arasan_cf_resume(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct ata_host *host = dev_get_drvdata(&pdev->dev); + struct ata_host *host = dev_get_drvdata(dev); struct arasan_cf_dev *acdev = host->ports[0]->private_data; cf_init(acdev); -- cgit v1.2.3-58-ga151