From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: linux-kernel@vger.kernel.org
Cc: linux-renesas-soc@vger.kernel.org,
Wolfram Sang <wsa+renesas@sang-engineering.com>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
Jens Axboe <axboe@kernel.dk>,
linux-ide@vger.kernel.org
Subject: [PATCH 1/1] ata: pata_samsung_cf: simplify getting .driver_data
Date: Sun, 21 Oct 2018 21:59:49 +0200 [thread overview]
Message-ID: <20181021195949.1351-2-wsa+renesas@sang-engineering.com> (raw)
In-Reply-To: <20181021195949.1351-1-wsa+renesas@sang-engineering.com>
We should get 'driver_data' from 'struct device' directly. Going via
platform_device is an unneeded step back and forth.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
Build tested only. buildbot is happy.
drivers/ata/pata_samsung_cf.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/ata/pata_samsung_cf.c b/drivers/ata/pata_samsung_cf.c
index f5bd44b8bd63..1dc3361cb5a5 100644
--- a/drivers/ata/pata_samsung_cf.c
+++ b/drivers/ata/pata_samsung_cf.c
@@ -609,17 +609,15 @@ static int __exit pata_s3c_remove(struct platform_device *pdev)
#ifdef CONFIG_PM_SLEEP
static int pata_s3c_suspend(struct device *dev)
{
- struct platform_device *pdev = to_platform_device(dev);
- struct ata_host *host = platform_get_drvdata(pdev);
+ struct ata_host *host = dev_get_drvdata(dev);
return ata_host_suspend(host, PMSG_SUSPEND);
}
static int pata_s3c_resume(struct device *dev)
{
- struct platform_device *pdev = to_platform_device(dev);
- struct ata_host *host = platform_get_drvdata(pdev);
- struct s3c_ide_platdata *pdata = dev_get_platdata(&pdev->dev);
+ struct ata_host *host = dev_get_drvdata(dev);
+ struct s3c_ide_platdata *pdata = dev_get_platdata(dev);
struct s3c_ide_info *info = host->private_data;
pata_s3c_hwinit(info, pdata);
--
2.19.0
next prev parent reply other threads:[~2018-10-21 20:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-21 19:59 [PATCH 0/1] ata: simplify getting .driver_data Wolfram Sang
2018-10-21 19:59 ` Wolfram Sang [this message]
2019-02-07 12:11 ` [PATCH 1/1] ata: pata_samsung_cf: " Bartlomiej Zolnierkiewicz
2019-02-08 13:45 ` Jens Axboe
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=20181021195949.1351-2-wsa+renesas@sang-engineering.com \
--to=wsa+renesas@sang-engineering.com \
--cc=axboe@kernel.dk \
--cc=b.zolnierkie@samsung.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).