linux-amlogic.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Peter Chen <peter.chen@nxp.com>
To: Chunfeng Yun <chunfeng.yun@mediatek.com>
Cc: Ondrej Jirman <megous@megous.com>,
	Neil Armstrong <narmstrong@baylibre.com>,
	Anil Varughese <aniljoy@cadence.com>,
	Wei Yongjun <weiyongjun1@huawei.com>,
	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	Fabio Estevam <festevam@gmail.com>,
	Jerome Brunet <jbrunet@baylibre.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Kevin Hilman <khilman@baylibre.com>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Kishon Vijay Abraham I <kishon@ti.com>,
	Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>,
	Chen-Yu Tsai <wens@csie.org>,
	"bcm-kernel-feedback-list@broadcom.com"
	<bcm-kernel-feedback-list@broadcom.com>,
	dl-linux-imx <linux-imx@nxp.com>, Icenowy Zheng <icenowy@aosc.io>,
	Bharat Gooty <bharat.gooty@broadcom.com>,
	Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
	Ray Jui <rjui@broadcom.com>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Maxime Ripard <mripard@kernel.org>,
	Yue Wang <yue.wang@amlogic.com>, Lubomir Rintel <lkundrak@v3.sk>,
	Remi Pommarel <repk@triplefau.lt>,
	"linux-mediatek@lists.infradead.org"
	<linux-mediatek@lists.infradead.org>,
	Rikard Falkeborn <rikard.falkeborn@gmail.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	"linux-amlogic@lists.infradead.org"
	<linux-amlogic@lists.infradead.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	Roger Quadros <rogerq@ti.com>,
	Hanjie Lin <hanjie.lin@amlogic.com>,
	Ma Feng <mafeng.ma@huawei.com>,
	Scott Branden <sbranden@broadcom.com>,
	Randy Dunlap <rdunlap@infradead.org>, Jyri Sarha <jsarha@ti.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Vinod Koul <vkoul@kernel.org>,
	Sanket Parmar <sparmar@cadence.com>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Joe Perches <joe@perches.com>,
	Colin Ian King <colin.king@canonical.com>,
	Shawn Guo <shawnguo@kernel.org>, Jun Li <jun.li@nxp.com>
Subject: Re: [PATCH 04/17] phy: cadence: convert to devm_platform_ioremap_resource
Date: Thu, 29 Oct 2020 10:50:34 +0000	[thread overview]
Message-ID: <20201029105004.GC30677@b29397-desktop> (raw)
In-Reply-To: <1603940079-8131-4-git-send-email-chunfeng.yun@mediatek.com>

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@mediatek.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@nxp.com> for phy-cadence-salvo.c.

-- 

Thanks,
Peter Chen
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

  reply	other threads:[~2020-10-29 10:50 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-29  2:54 [PATCH 01/17] phy: allwinner: convert to devm_platform_ioremap_resource(_byname) Chunfeng Yun
2020-10-29  2:54 ` [PATCH 02/17] phy: amlogic: convert to devm_platform_ioremap_resource Chunfeng Yun
2020-10-29  8:24   ` Remi Pommarel
2020-10-30  3:46     ` Chunfeng Yun
2020-10-29  2:54 ` [PATCH 03/17] phy: broadcom: convert to devm_platform_ioremap_resource(_byname) Chunfeng Yun
2020-10-30  3:49   ` Florian Fainelli
2020-10-29  2:54 ` [PATCH 04/17] phy: cadence: convert to devm_platform_ioremap_resource Chunfeng Yun
2020-10-29 10:50   ` Peter Chen [this message]
2020-10-29  2:54 ` [PATCH 05/17] phy: freescale: " Chunfeng Yun
2020-10-29 10:51   ` Peter Chen
2020-10-29  2:54 ` [PATCH 06/17] phy: lantiq: " Chunfeng Yun
2020-10-29  2:54 ` [PATCH 07/17] phy: marvell: " Chunfeng Yun
2020-10-29  2:54 ` [PATCH 08/17] phy: phy-xgene: " Chunfeng Yun
2020-10-29  2:54 ` [PATCH 09/17] phy: phy-mtk-ufs: " Chunfeng Yun
2020-10-29  2:54 ` [PATCH 10/17] phy: qualcomm: convert to devm_platform_ioremap_resource(_byname) Chunfeng Yun
2020-10-29  2:54 ` [PATCH 11/17] phy: phy-ralink-usb: convert to devm_platform_ioremap_resource Chunfeng Yun
2020-10-29  2:54 ` [PATCH 12/17] phy: renesas: " Chunfeng Yun
2020-10-29  2:54 ` [PATCH 13/17] phy: rockchip: " Chunfeng Yun
2020-10-29  2:54 ` [PATCH 14/17] phy: samsung: " Chunfeng Yun
2020-10-29 16:50   ` Krzysztof Kozlowski
2020-10-29  2:54 ` [PATCH 15/17] phy: phy-stm32-usbphyc: " Chunfeng Yun
2020-10-29 10:20   ` Amelie DELAUNAY
2020-10-29  2:54 ` [PATCH 16/17] phy: tegra: convert to devm_platform_ioremap_resource(_byname) Chunfeng Yun
2020-10-29  2:54 ` [PATCH 17/17] phy: ti: " Chunfeng Yun

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=20201029105004.GC30677@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;
as well as URLs for NNTP newsgroup(s).