From: Peter Chen <peter.chen@nxp.com>
To: Chunfeng Yun <chunfeng.yun@mediatek.com>
Cc: Kishon Vijay Abraham I <kishon@ti.com>,
Vinod Koul <vkoul@kernel.org>, Maxime Ripard <mripard@kernel.org>,
Chen-Yu Tsai <wens@csie.org>, Kevin Hilman <khilman@baylibre.com>,
Neil Armstrong <narmstrong@baylibre.com>,
Jerome Brunet <jbrunet@baylibre.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
Ray Jui <rjui@broadcom.com>,
Scott Branden <sbranden@broadcom.com>,
"bcm-kernel-feedback-list@broadcom.com"
<bcm-kernel-feedback-list@broadcom.com>,
Florian Fainelli <f.fainelli@gmail.com>,
Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
dl-linux-imx <linux-imx@nxp.com>, Lubomir Rintel <lkundrak@v3.sk>,
Matthias Brugger <matthias.bgg@gmail.com>,
Randy Dunlap <rdunlap@infradead.org>,
Krzysztof Kozlowski <krzk@kernel.org>,
Colin Ian King <colin.king@canonical.com>,
Ondrej Jirman <megous@megous.com>,
Rikard Falkeborn <rikard.falkeborn@gmail.com>,
Icenowy Zheng <icenowy@aosc.io>,
Remi Pommarel <repk@triplefau.lt>,
Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
Yue Wang <yue.wang@amlogic.com>,
Hanjie Lin <hanjie.lin@amlogic.com>,
Joe Perches <joe@perches.com>,
Bharat Gooty <bharat.gooty@broadcom.com>,
Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>,
Roger Quadros <rogerq@ti.com>, Jyri Sarha <jsarha@ti.com>,
Sanket Parmar <sparmar@cadence.com>,
Anil Varughese <aniljoy@cadence.com>, Jun Li <jun.li@nxp.com>,
Ma Feng <mafeng.ma@huawei.com>,
Wei Yongjun <weiyongjun1@huawei.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-amlogic@lists.infradead.org"
<linux-amlogic@lists.infradead.org>,
"linux-mediatek@lists.infradead.org"
<linux-mediatek@lists.infradead.org>
Subject: Re: [PATCH 05/17] phy: freescale: convert to devm_platform_ioremap_resource
Date: Thu, 29 Oct 2020 10:51:08 +0000 [thread overview]
Message-ID: <20201029105039.GD30677@b29397-desktop> (raw)
In-Reply-To: <1603940079-8131-5-git-send-email-chunfeng.yun@mediatek.com>
On 20-10-29 10:54:27, Chunfeng Yun wrote:
> Use devm_platform_ioremap_resource to simplify code
>
> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> ---
> drivers/phy/freescale/phy-fsl-imx8-mipi-dphy.c | 4 +---
> drivers/phy/freescale/phy-fsl-imx8mq-usb.c | 4 +---
> 2 files changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/phy/freescale/phy-fsl-imx8-mipi-dphy.c b/drivers/phy/freescale/phy-fsl-imx8-mipi-dphy.c
> index 9f2c1da14f5a..a95572b397ca 100644
> --- a/drivers/phy/freescale/phy-fsl-imx8-mipi-dphy.c
> +++ b/drivers/phy/freescale/phy-fsl-imx8-mipi-dphy.c
> @@ -434,7 +434,6 @@ static int mixel_dphy_probe(struct platform_device *pdev)
> struct device_node *np = dev->of_node;
> struct phy_provider *phy_provider;
> struct mixel_dphy_priv *priv;
> - struct resource *res;
> struct phy *phy;
> void __iomem *base;
>
> @@ -449,8 +448,7 @@ static int mixel_dphy_probe(struct platform_device *pdev)
> if (!priv->devdata)
> return -EINVAL;
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - base = devm_ioremap_resource(dev, res);
> + base = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(base))
> return PTR_ERR(base);
>
> diff --git a/drivers/phy/freescale/phy-fsl-imx8mq-usb.c b/drivers/phy/freescale/phy-fsl-imx8mq-usb.c
> index 62d6d6849ad6..0b9ee2b1716f 100644
> --- a/drivers/phy/freescale/phy-fsl-imx8mq-usb.c
> +++ b/drivers/phy/freescale/phy-fsl-imx8mq-usb.c
> @@ -152,7 +152,6 @@ static int imx8mq_usb_phy_probe(struct platform_device *pdev)
> struct phy_provider *phy_provider;
> struct device *dev = &pdev->dev;
> struct imx8mq_usb_phy *imx_phy;
> - struct resource *res;
> const struct phy_ops *phy_ops;
>
> imx_phy = devm_kzalloc(dev, sizeof(*imx_phy), GFP_KERNEL);
> @@ -165,8 +164,7 @@ static int imx8mq_usb_phy_probe(struct platform_device *pdev)
> return PTR_ERR(imx_phy->clk);
> }
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - imx_phy->base = devm_ioremap_resource(dev, res);
> + imx_phy->base = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(imx_phy->base))
> return PTR_ERR(imx_phy->base);
>
Reviewed-by: Peter Chen <peter.chen@nxp.com>
--
Thanks,
Peter Chen
next prev parent reply other threads:[~2020-10-29 10:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1603940079-8131-1-git-send-email-chunfeng.yun@mediatek.com>
[not found] ` <1603940079-8131-2-git-send-email-chunfeng.yun@mediatek.com>
2020-10-29 8:24 ` [PATCH 02/17] phy: amlogic: convert to devm_platform_ioremap_resource Remi Pommarel
2020-10-30 3:46 ` Chunfeng Yun
[not found] ` <1603940079-8131-15-git-send-email-chunfeng.yun@mediatek.com>
2020-10-29 10:20 ` [PATCH 15/17] phy: phy-stm32-usbphyc: " Amelie DELAUNAY
[not found] ` <1603940079-8131-4-git-send-email-chunfeng.yun@mediatek.com>
2020-10-29 10:50 ` [PATCH 04/17] phy: cadence: " Peter Chen
[not found] ` <1603940079-8131-5-git-send-email-chunfeng.yun@mediatek.com>
2020-10-29 10:51 ` Peter Chen [this message]
[not found] ` <1603940079-8131-14-git-send-email-chunfeng.yun@mediatek.com>
2020-10-29 16:50 ` [PATCH 14/17] phy: samsung: " Krzysztof Kozlowski
[not found] ` <1603940079-8131-3-git-send-email-chunfeng.yun@mediatek.com>
2020-10-30 3:49 ` [PATCH 03/17] phy: broadcom: convert to devm_platform_ioremap_resource(_byname) Florian Fainelli
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=20201029105039.GD30677@b29397-desktop \
--to=peter.chen@nxp.com \
--cc=aniljoy@cadence.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=bharat.gooty@broadcom.com \
--cc=chunfeng.yun@mediatek.com \
--cc=colin.king@canonical.com \
--cc=f.fainelli@gmail.com \
--cc=festevam@gmail.com \
--cc=hanjie.lin@amlogic.com \
--cc=icenowy@aosc.io \
--cc=jbrunet@baylibre.com \
--cc=joe@perches.com \
--cc=jsarha@ti.com \
--cc=jun.li@nxp.com \
--cc=kernel@pengutronix.de \
--cc=khilman@baylibre.com \
--cc=kishon@ti.com \
--cc=krzk@kernel.org \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=lkundrak@v3.sk \
--cc=lorenzo.pieralisi@arm.com \
--cc=mafeng.ma@huawei.com \
--cc=martin.blumenstingl@googlemail.com \
--cc=matthias.bgg@gmail.com \
--cc=megous@megous.com \
--cc=mripard@kernel.org \
--cc=narmstrong@baylibre.com \
--cc=rayagonda.kokatanur@broadcom.com \
--cc=rdunlap@infradead.org \
--cc=repk@triplefau.lt \
--cc=rikard.falkeborn@gmail.com \
--cc=rjui@broadcom.com \
--cc=rogerq@ti.com \
--cc=s.hauer@pengutronix.de \
--cc=sbranden@broadcom.com \
--cc=shawnguo@kernel.org \
--cc=sparmar@cadence.com \
--cc=vkoul@kernel.org \
--cc=weiyongjun1@huawei.com \
--cc=wens@csie.org \
--cc=yue.wang@amlogic.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