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>,
Andrew Lunn <andrew@lunn.ch>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Ray Jui <rjui@broadcom.com>,
Scott Branden <sbranden@broadcom.com>,
bcm-kernel-feedback-list@broadcom.com, netdev@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: [PATCH 7/9] net: mdio: mdio-bcm-iproc: simplify getting .driver_data
Date: Mon, 20 Sep 2021 11:05:19 +0200 [thread overview]
Message-ID: <20210920090522.23784-8-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/net/mdio/mdio-bcm-iproc.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/mdio/mdio-bcm-iproc.c b/drivers/net/mdio/mdio-bcm-iproc.c
index 77fc970cdfde..5666cfab15b9 100644
--- a/drivers/net/mdio/mdio-bcm-iproc.c
+++ b/drivers/net/mdio/mdio-bcm-iproc.c
@@ -181,8 +181,7 @@ static int iproc_mdio_remove(struct platform_device *pdev)
#ifdef CONFIG_PM_SLEEP
static int iproc_mdio_resume(struct device *dev)
{
- struct platform_device *pdev = to_platform_device(dev);
- struct iproc_mdio_priv *priv = platform_get_drvdata(pdev);
+ struct iproc_mdio_priv *priv = dev_get_drvdata(dev);
/* restore the mii clock configuration */
iproc_mdio_config_clk(priv->base);
--
2.30.2
next prev parent reply other threads:[~2021-09-20 9:06 UTC|newest]
Thread overview: 5+ 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 ` Wolfram Sang [this message]
2021-09-20 21:56 ` [PATCH 7/9] net: mdio: mdio-bcm-iproc: " Florian Fainelli
2021-09-21 5:52 ` 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-8-wsa+renesas@sang-engineering.com \
--to=wsa+renesas@sang-engineering.com \
--cc=andrew@lunn.ch \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=davem@davemloft.net \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=rjui@broadcom.com \
--cc=sbranden@broadcom.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).