From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: linux-ide@vger.kernel.org, jgarzik@pobox.com, viresh.kumar@st.com
Subject: [PATCH] pata_arasan_cf: remove bogus to_platform_device() calls
Date: Wed, 12 Oct 2011 19:09:09 +0400 [thread overview]
Message-ID: <201110121909.09664.sshtylyov@ru.mvista.com> (raw)
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()...
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
---
This patch is against the recent Linus' tree.
drivers/ata/pata_arasan_cf.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
Index: linux-2.6/drivers/ata/pata_arasan_cf.c
===================================================================
--- linux-2.6.orig/drivers/ata/pata_arasan_cf.c
+++ linux-2.6/drivers/ata/pata_arasan_cf.c
@@ -922,8 +922,7 @@ static int __devexit arasan_cf_remove(st
#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 devi
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);
next reply other threads:[~2011-10-12 15:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-12 15:09 Sergei Shtylyov [this message]
2011-10-13 3:33 ` [PATCH] pata_arasan_cf: remove bogus to_platform_device() calls Viresh Kumar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201110121909.09664.sshtylyov@ru.mvista.com \
--to=sshtylyov@ru.mvista.com \
--cc=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.org \
--cc=viresh.kumar@st.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.