[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1604642930-29019-5-git-send-email-chunfeng.yun@mediatek.com>
Date: Fri, 6 Nov 2020 14:08:38 +0800
From: Chunfeng Yun <chunfeng.yun@...iatek.com>
To: Kishon Vijay Abraham I <kishon@...com>,
Vinod Koul <vkoul@...nel.org>
CC: Maxime Ripard <mripard@...nel.org>, Chen-Yu Tsai <wens@...e.org>,
Kevin Hilman <khilman@...libre.com>,
Neil Armstrong <narmstrong@...libre.com>,
Jerome Brunet <jbrunet@...libre.com>,
Martin Blumenstingl <martin.blumenstingl@...glemail.com>,
Ray Jui <rjui@...adcom.com>,
Scott Branden <sbranden@...adcom.com>,
<bcm-kernel-feedback-list@...adcom.com>,
Florian Fainelli <f.fainelli@...il.com>,
Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Fabio Estevam <festevam@...il.com>,
NXP Linux Team <linux-imx@....com>,
Lubomir Rintel <lkundrak@...sk>,
Chunfeng Yun <chunfeng.yun@...iatek.com>,
Matthias Brugger <matthias.bgg@...il.com>,
Randy Dunlap <rdunlap@...radead.org>,
Krzysztof Kozlowski <krzk@...nel.org>,
Colin Ian King <colin.king@...onical.com>,
Ondrej Jirman <megous@...ous.com>,
Rikard Falkeborn <rikard.falkeborn@...il.com>,
Icenowy Zheng <icenowy@...c.io>,
Remi Pommarel <repk@...plefau.lt>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
Yue Wang <yue.wang@...ogic.com>,
Hanjie Lin <hanjie.lin@...ogic.com>,
Joe Perches <joe@...ches.com>,
Bharat Gooty <bharat.gooty@...adcom.com>,
Rayagonda Kokatanur <rayagonda.kokatanur@...adcom.com>,
Peter Chen <peter.chen@....com>, Roger Quadros <rogerq@...com>,
Jyri Sarha <jsarha@...com>,
Sanket Parmar <sparmar@...ence.com>,
Anil Varughese <aniljoy@...ence.com>, Li Jun <jun.li@....com>,
Ma Feng <mafeng.ma@...wei.com>,
Wei Yongjun <weiyongjun1@...wei.com>,
<linux-kernel@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-amlogic@...ts.infradead.org>,
<linux-mediatek@...ts.infradead.org>
Subject: [PATCH v2 05/17] phy: freescale: convert to devm_platform_ioremap_resource
Use devm_platform_ioremap_resource to simplify code
Signed-off-by: Chunfeng Yun <chunfeng.yun@...iatek.com>
Reviewed-by: Peter Chen <peter.chen@....com>
---
v2: add Reviewed-by Peter
---
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);
--
2.18.0
Powered by blists - more mailing lists