From: Krzysztof Kozlowski <krzk@kernel.org>
To: Chunfeng Yun <chunfeng.yun@mediatek.com>
Cc: Ondrej Jirman <megous@megous.com>,
Peter Chen <peter.chen@nxp.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>,
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,
NXP Linux Team <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,
Rikard Falkeborn <rikard.falkeborn@gmail.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
linux-amlogic@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, 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>, Li Jun <jun.li@nxp.com>
Subject: Re: [PATCH 14/17] phy: samsung: convert to devm_platform_ioremap_resource
Date: Thu, 29 Oct 2020 17:50:29 +0100 [thread overview]
Message-ID: <20201029165029.GA84818@kozik-lap> (raw)
In-Reply-To: <1603940079-8131-14-git-send-email-chunfeng.yun@mediatek.com>
On Thu, Oct 29, 2020 at 10:54:36AM +0800, Chunfeng Yun wrote:
> Use devm_platform_ioremap_resource to simplify code
>
> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> ---
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Best regards,
Krzysztof
> drivers/phy/samsung/phy-exynos-pcie.c | 7 ++-----
> drivers/phy/samsung/phy-exynos5-usbdrd.c | 4 +---
> drivers/phy/samsung/phy-exynos5250-sata.c | 5 +----
> drivers/phy/samsung/phy-samsung-usb2.c | 4 +---
> 4 files changed, 5 insertions(+), 15 deletions(-)
>
> diff --git a/drivers/phy/samsung/phy-exynos-pcie.c b/drivers/phy/samsung/phy-exynos-pcie.c
> index 7e28b1aea0d1..c98fff5c1ac8 100644
> --- a/drivers/phy/samsung/phy-exynos-pcie.c
> +++ b/drivers/phy/samsung/phy-exynos-pcie.c
> @@ -232,7 +232,6 @@ static int exynos_pcie_phy_probe(struct platform_device *pdev)
> struct exynos_pcie_phy *exynos_phy;
> struct phy *generic_phy;
> struct phy_provider *phy_provider;
> - struct resource *res;
> const struct exynos_pcie_phy_data *drv_data;
>
> drv_data = of_device_get_match_data(dev);
> @@ -243,13 +242,11 @@ static int exynos_pcie_phy_probe(struct platform_device *pdev)
> if (!exynos_phy)
> return -ENOMEM;
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - exynos_phy->phy_base = devm_ioremap_resource(dev, res);
> + exynos_phy->phy_base = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(exynos_phy->phy_base))
> return PTR_ERR(exynos_phy->phy_base);
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
> - exynos_phy->blk_base = devm_ioremap_resource(dev, res);
> + exynos_phy->blk_base = devm_platform_ioremap_resource(pdev, 1);
> if (IS_ERR(exynos_phy->blk_base))
> return PTR_ERR(exynos_phy->blk_base);
>
> diff --git a/drivers/phy/samsung/phy-exynos5-usbdrd.c b/drivers/phy/samsung/phy-exynos5-usbdrd.c
> index cfa9b8b7e5ac..ee0848fe8432 100644
> --- a/drivers/phy/samsung/phy-exynos5-usbdrd.c
> +++ b/drivers/phy/samsung/phy-exynos5-usbdrd.c
> @@ -829,7 +829,6 @@ static int exynos5_usbdrd_phy_probe(struct platform_device *pdev)
> struct device_node *node = dev->of_node;
> struct exynos5_usbdrd_phy *phy_drd;
> struct phy_provider *phy_provider;
> - struct resource *res;
> const struct exynos5_usbdrd_phy_drvdata *drv_data;
> struct regmap *reg_pmu;
> u32 pmu_offset;
> @@ -843,8 +842,7 @@ static int exynos5_usbdrd_phy_probe(struct platform_device *pdev)
> dev_set_drvdata(dev, phy_drd);
> phy_drd->dev = dev;
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - phy_drd->reg_phy = devm_ioremap_resource(dev, res);
> + phy_drd->reg_phy = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(phy_drd->reg_phy))
> return PTR_ERR(phy_drd->reg_phy);
>
> diff --git a/drivers/phy/samsung/phy-exynos5250-sata.c b/drivers/phy/samsung/phy-exynos5250-sata.c
> index 4dd7324d91b2..9ec234243f7c 100644
> --- a/drivers/phy/samsung/phy-exynos5250-sata.c
> +++ b/drivers/phy/samsung/phy-exynos5250-sata.c
> @@ -162,7 +162,6 @@ static int exynos_sata_phy_probe(struct platform_device *pdev)
> {
> struct exynos_sata_phy *sata_phy;
> struct device *dev = &pdev->dev;
> - struct resource *res;
> struct phy_provider *phy_provider;
> struct device_node *node;
> int ret = 0;
> @@ -171,9 +170,7 @@ static int exynos_sata_phy_probe(struct platform_device *pdev)
> if (!sata_phy)
> return -ENOMEM;
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -
> - sata_phy->regs = devm_ioremap_resource(dev, res);
> + sata_phy->regs = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(sata_phy->regs))
> return PTR_ERR(sata_phy->regs);
>
> diff --git a/drivers/phy/samsung/phy-samsung-usb2.c b/drivers/phy/samsung/phy-samsung-usb2.c
> index a3ed3ff04690..f79f605cff79 100644
> --- a/drivers/phy/samsung/phy-samsung-usb2.c
> +++ b/drivers/phy/samsung/phy-samsung-usb2.c
> @@ -143,7 +143,6 @@ static int samsung_usb2_phy_probe(struct platform_device *pdev)
> const struct samsung_usb2_phy_config *cfg;
> struct device *dev = &pdev->dev;
> struct phy_provider *phy_provider;
> - struct resource *mem;
> struct samsung_usb2_phy_driver *drv;
> int i, ret;
>
> @@ -167,8 +166,7 @@ static int samsung_usb2_phy_probe(struct platform_device *pdev)
> drv->cfg = cfg;
> drv->dev = dev;
>
> - mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - drv->reg_phy = devm_ioremap_resource(dev, mem);
> + drv->reg_phy = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(drv->reg_phy)) {
> dev_err(dev, "Failed to map register memory (phy)\n");
> return PTR_ERR(drv->reg_phy);
> --
> 2.18.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-10-29 16:51 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
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 [this message]
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=20201029165029.GA84818@kozik-lap \
--to=krzk@kernel.org \
--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=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=peter.chen@nxp.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).