diff options
author | Sergei Shtylyov <sshtylyov@ru.mvista.com> | 2011-10-12 11:09:09 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2011-10-14 13:18:34 -0400 |
commit | 90f0adf0936d464a337512e6cbe7929a49bf3c55 (patch) | |
tree | 3c6dcfae756bf1daa38cc0ae4f2660544885a04d /drivers/ata/pata_arasan_cf.c | |
parent | 46b9e77076a609d10b2009310a1e58281f8daaf9 (diff) |
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 <viresh.kumar@st.com>
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata/pata_arasan_cf.c')
-rw-r--r-- | drivers/ata/pata_arasan_cf.c | 6 |
1 files changed, 2 insertions, 4 deletions
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) | |||
922 | #ifdef CONFIG_PM | 922 | #ifdef CONFIG_PM |
923 | static int arasan_cf_suspend(struct device *dev) | 923 | static int arasan_cf_suspend(struct device *dev) |
924 | { | 924 | { |
925 | struct platform_device *pdev = to_platform_device(dev); | 925 | struct ata_host *host = dev_get_drvdata(dev); |
926 | struct ata_host *host = dev_get_drvdata(&pdev->dev); | ||
927 | struct arasan_cf_dev *acdev = host->ports[0]->private_data; | 926 | struct arasan_cf_dev *acdev = host->ports[0]->private_data; |
928 | 927 | ||
929 | if (acdev->dma_chan) { | 928 | if (acdev->dma_chan) { |
@@ -937,8 +936,7 @@ static int arasan_cf_suspend(struct device *dev) | |||
937 | 936 | ||
938 | static int arasan_cf_resume(struct device *dev) | 937 | static int arasan_cf_resume(struct device *dev) |
939 | { | 938 | { |
940 | struct platform_device *pdev = to_platform_device(dev); | 939 | struct ata_host *host = dev_get_drvdata(dev); |
941 | struct ata_host *host = dev_get_drvdata(&pdev->dev); | ||
942 | struct arasan_cf_dev *acdev = host->ports[0]->private_data; | 940 | struct arasan_cf_dev *acdev = host->ports[0]->private_data; |
943 | 941 | ||
944 | cf_init(acdev); | 942 | cf_init(acdev); |