Skip to content

Commit

Permalink
pata_arasan_cf: remove bogus to_platform_device() calls
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sergei Shtylyov authored and Jeff Garzik committed Oct 14, 2011
1 parent 46b9e77 commit 90f0adf
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/ata/pata_arasan_cf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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);
Expand Down

0 comments on commit 90f0adf

Please sign in to comment.