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>,
Neil Armstrong <narmstrong@baylibre.com>,
Kevin Hilman <khilman@baylibre.com>,
Jerome Brunet <jbrunet@baylibre.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
linux-arm-kernel@lists.infradead.org,
linux-amlogic@lists.infradead.org
Subject: [PATCH 2/9] firmware: meson: simplify getting .driver_data
Date: Mon, 20 Sep 2021 11:05:14 +0200 [thread overview]
Message-ID: <20210920090522.23784-3-wsa+renesas@sang-engineering.com> (raw)
In-Reply-To: <20210920090522.23784-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/firmware/meson/meson_sm.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/firmware/meson/meson_sm.c b/drivers/firmware/meson/meson_sm.c
index 77aa5c6398aa..714016e3aab3 100644
--- a/drivers/firmware/meson/meson_sm.c
+++ b/drivers/firmware/meson/meson_sm.c
@@ -240,12 +240,11 @@ EXPORT_SYMBOL_GPL(meson_sm_get);
static ssize_t serial_show(struct device *dev, struct device_attribute *attr,
char *buf)
{
- struct platform_device *pdev = to_platform_device(dev);
struct meson_sm_firmware *fw;
uint8_t *id_buf;
int ret;
- fw = platform_get_drvdata(pdev);
+ fw = dev_get_drvdata(dev);
id_buf = kmalloc(SM_CHIP_ID_LENGTH, GFP_KERNEL);
if (!id_buf)
--
2.30.2
next prev parent reply other threads:[~2021-09-20 9:06 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-20 9:05 [PATCH 0/9] treewide: simplify getting .driver_data Wolfram Sang
2021-09-20 9:05 ` [PATCH 1/9] dmaengine: stm32-dmamux: " Wolfram Sang
2021-09-20 9:05 ` Wolfram Sang [this message]
2021-09-20 12:22 ` [PATCH 2/9] firmware: meson: " Neil Armstrong
2021-09-20 9:05 ` [PATCH 3/9] gpio: xilinx: " Wolfram Sang
2021-09-22 9:48 ` Bartosz Golaszewski
2021-09-20 9:05 ` [PATCH 4/9] drm/msm: " Wolfram Sang
2021-09-20 9:05 ` [PATCH 5/9] drm/panfrost: " Wolfram Sang
2021-09-20 11:06 ` Alyssa Rosenzweig
2021-09-20 13:33 ` Steven Price
2021-09-20 9:05 ` [PATCH 6/9] iio: common: cros_ec_sensors: " Wolfram Sang
2021-09-23 9:16 ` Enric Balletbo i Serra
2021-09-25 14:54 ` Jonathan Cameron
2021-10-12 7:31 ` Wolfram Sang
2021-10-12 8:31 ` Jonathan Cameron
2021-09-20 9:05 ` [PATCH 7/9] net: mdio: mdio-bcm-iproc: " Wolfram Sang
2021-09-20 21:56 ` Florian Fainelli
2021-09-21 5:52 ` Wolfram Sang
2021-09-20 9:05 ` [PATCH 8/9] platform: chrome: cros_ec_sensorhub: " Wolfram Sang
2021-09-20 9:05 ` [PATCH 9/9] remoteproc: omap_remoteproc: " Wolfram Sang
2021-10-15 17:22 ` [PATCH 0/9] treewide: " Bjorn Andersson
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=20210920090522.23784-3-wsa+renesas@sang-engineering.com \
--to=wsa+renesas@sang-engineering.com \
--cc=jbrunet@baylibre.com \
--cc=khilman@baylibre.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=narmstrong@baylibre.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 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).