[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20201029105004.GC30677@b29397-desktop>
Date: Thu, 29 Oct 2020 10:50:34 +0000
From: Peter Chen <peter.chen@....com>
To: Chunfeng Yun <chunfeng.yun@...iatek.com>
CC: Kishon Vijay Abraham I <kishon@...com>,
Vinod Koul <vkoul@...nel.org>,
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"
<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>,
dl-linux-imx <linux-imx@....com>,
Lubomir Rintel <lkundrak@...sk>,
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>,
Roger Quadros <rogerq@...com>, Jyri Sarha <jsarha@...com>,
Sanket Parmar <sparmar@...ence.com>,
Anil Varughese <aniljoy@...ence.com>, Jun Li <jun.li@....com>,
Ma Feng <mafeng.ma@...wei.com>,
Wei Yongjun <weiyongjun1@...wei.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"linux-amlogic@...ts.infradead.org"
<linux-amlogic@...ts.infradead.org>,
"linux-mediatek@...ts.infradead.org"
<linux-mediatek@...ts.infradead.org>
Subject: Re: [PATCH 04/17] phy: cadence: convert to
devm_platform_ioremap_resource
On 20-10-29 10:54:26, Chunfeng Yun wrote:
> Use devm_platform_ioremap_resource to simplify code
>
> Signed-off-by: Chunfeng Yun <chunfeng.yun@...iatek.com>
> ---
> drivers/phy/cadence/cdns-dphy.c | 4 +---
> drivers/phy/cadence/phy-cadence-salvo.c | 4 +---
> drivers/phy/cadence/phy-cadence-sierra.c | 4 +---
> 3 files changed, 3 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/phy/cadence/cdns-dphy.c b/drivers/phy/cadence/cdns-dphy.c
> index 90c4e9b5aac8..ba042e39cfaf 100644
> --- a/drivers/phy/cadence/cdns-dphy.c
> +++ b/drivers/phy/cadence/cdns-dphy.c
> @@ -314,7 +314,6 @@ static int cdns_dphy_probe(struct platform_device *pdev)
> {
> struct phy_provider *phy_provider;
> struct cdns_dphy *dphy;
> - struct resource *res;
> int ret;
>
> dphy = devm_kzalloc(&pdev->dev, sizeof(*dphy), GFP_KERNEL);
> @@ -326,8 +325,7 @@ static int cdns_dphy_probe(struct platform_device *pdev)
> if (!dphy->ops)
> return -EINVAL;
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - dphy->regs = devm_ioremap_resource(&pdev->dev, res);
> + dphy->regs = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(dphy->regs))
> return PTR_ERR(dphy->regs);
>
> diff --git a/drivers/phy/cadence/phy-cadence-salvo.c b/drivers/phy/cadence/phy-cadence-salvo.c
> index 88e239adc3b8..51c0b98f5fd7 100644
> --- a/drivers/phy/cadence/phy-cadence-salvo.c
> +++ b/drivers/phy/cadence/phy-cadence-salvo.c
> @@ -263,7 +263,6 @@ static int cdns_salvo_phy_probe(struct platform_device *pdev)
> struct phy_provider *phy_provider;
> struct device *dev = &pdev->dev;
> struct cdns_salvo_phy *salvo_phy;
> - struct resource *res;
> const struct of_device_id *match;
> struct cdns_salvo_data *data;
>
> @@ -281,8 +280,7 @@ static int cdns_salvo_phy_probe(struct platform_device *pdev)
> if (IS_ERR(salvo_phy->clk))
> return PTR_ERR(salvo_phy->clk);
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - salvo_phy->base = devm_ioremap_resource(dev, res);
> + salvo_phy->base = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(salvo_phy->base))
> return PTR_ERR(salvo_phy->base);
>
> diff --git a/drivers/phy/cadence/phy-cadence-sierra.c b/drivers/phy/cadence/phy-cadence-sierra.c
> index 453ef26fa1c7..26a0badabe38 100644
> --- a/drivers/phy/cadence/phy-cadence-sierra.c
> +++ b/drivers/phy/cadence/phy-cadence-sierra.c
> @@ -479,7 +479,6 @@ static int cdns_sierra_phy_probe(struct platform_device *pdev)
> const struct of_device_id *match;
> struct cdns_sierra_data *data;
> unsigned int id_value;
> - struct resource *res;
> int i, ret, node = 0;
> void __iomem *base;
> struct clk *clk;
> @@ -502,8 +501,7 @@ static int cdns_sierra_phy_probe(struct platform_device *pdev)
> sp->dev = dev;
> sp->init_data = data;
>
> - 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)) {
> dev_err(dev, "missing \"reg\"\n");
> return PTR_ERR(base);
> --
> 2.18.0
Acked-by: Peter Chen <peter.chen@....com> for phy-cadence-salvo.c.
--
Thanks,
Peter Chen
Powered by blists - more mailing lists