From: Dmitry Osipenko <digetx@gmail.com>
To: Yangtao Li <tiny.windzz@gmail.com>,
ssantosh@kernel.org, paul@crapouillou.net,
matthias.bgg@gmail.com, rogerq@ti.com, tony@atomide.com,
lukasz.luba@arm.com, kgene@kernel.org, krzk@kernel.org,
thierry.reding@gmail.com, jonathanh@nvidia.com,
allison@lohutok.net, tglx@linutronix.de, yong.wu@mediatek.com,
jroedel@suse.de, evgreen@chromium.org, rfontana@redhat.com,
pdeschrijver@nvidia.com, john@phrozen.org,
alexios.zavras@intel.com, sboyd@kernel.org,
kstewart@linuxfoundation.org, info@metux.net,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, linux-omap@vger.kernel.org,
linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
linux-tegra@vger.kernel.org
Subject: Re: [PATCH 4/9] memory: tegra: convert to devm_platform_ioremap_resource
Date: Mon, 23 Dec 2019 18:42:36 +0300 [thread overview]
Message-ID: <04758814-8e22-79b9-8ed1-ac0c31762d21@gmail.com> (raw)
In-Reply-To: <20191222185034.4665-4-tiny.windzz@gmail.com>
22.12.2019 21:50, Yangtao Li пишет:
> Use devm_platform_ioremap_resource() to simplify code.
>
> Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
> ---
> drivers/memory/tegra/mc.c | 4 +---
> drivers/memory/tegra/tegra124-emc.c | 4 +---
> drivers/memory/tegra/tegra186.c | 4 +---
> drivers/memory/tegra/tegra20-emc.c | 4 +---
> 4 files changed, 4 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/memory/tegra/mc.c b/drivers/memory/tegra/mc.c
> index ec8403557ed4..71390d4ad809 100644
> --- a/drivers/memory/tegra/mc.c
> +++ b/drivers/memory/tegra/mc.c
> @@ -593,7 +593,6 @@ static __maybe_unused irqreturn_t tegra20_mc_irq(int irq, void *data)
>
> static int tegra_mc_probe(struct platform_device *pdev)
> {
> - struct resource *res;
> struct tegra_mc *mc;
> void *isr;
> u64 mask;
> @@ -619,8 +618,7 @@ static int tegra_mc_probe(struct platform_device *pdev)
> /* length of MC tick in nanoseconds */
> mc->tick = 30;
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - mc->regs = devm_ioremap_resource(&pdev->dev, res);
> + mc->regs = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(mc->regs))
> return PTR_ERR(mc->regs);
>
> diff --git a/drivers/memory/tegra/tegra124-emc.c b/drivers/memory/tegra/tegra124-emc.c
> index 464f0ceaee63..2c73260654ba 100644
> --- a/drivers/memory/tegra/tegra124-emc.c
> +++ b/drivers/memory/tegra/tegra124-emc.c
> @@ -1085,7 +1085,6 @@ static int tegra_emc_probe(struct platform_device *pdev)
> struct platform_device *mc;
> struct device_node *np;
> struct tegra_emc *emc;
> - struct resource *res;
> u32 ram_code;
> int err;
>
> @@ -1095,8 +1094,7 @@ static int tegra_emc_probe(struct platform_device *pdev)
>
> emc->dev = &pdev->dev;
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - emc->regs = devm_ioremap_resource(&pdev->dev, res);
> + emc->regs = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(emc->regs))
> return PTR_ERR(emc->regs);
>
> diff --git a/drivers/memory/tegra/tegra186.c b/drivers/memory/tegra/tegra186.c
> index 441213a35930..226d2b16036d 100644
> --- a/drivers/memory/tegra/tegra186.c
> +++ b/drivers/memory/tegra/tegra186.c
> @@ -534,7 +534,6 @@ static const struct tegra_mc_client tegra186_mc_clients[] = {
>
> static int tegra186_mc_probe(struct platform_device *pdev)
> {
> - struct resource *res;
> struct tegra_mc *mc;
> unsigned int i;
> int err = 0;
> @@ -543,8 +542,7 @@ static int tegra186_mc_probe(struct platform_device *pdev)
> if (!mc)
> return -ENOMEM;
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - mc->regs = devm_ioremap_resource(&pdev->dev, res);
> + mc->regs = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(mc->regs))
> return PTR_ERR(mc->regs);
>
> diff --git a/drivers/memory/tegra/tegra20-emc.c b/drivers/memory/tegra/tegra20-emc.c
> index 1b23b1c34476..d2efd0c658c0 100644
> --- a/drivers/memory/tegra/tegra20-emc.c
> +++ b/drivers/memory/tegra/tegra20-emc.c
> @@ -482,7 +482,6 @@ static int tegra_emc_probe(struct platform_device *pdev)
> {
> struct device_node *np;
> struct tegra_emc *emc;
> - struct resource *res;
> int irq, err;
>
> /* driver has nothing to do in a case of memory timing absence */
> @@ -518,8 +517,7 @@ static int tegra_emc_probe(struct platform_device *pdev)
> if (err)
> return err;
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - emc->regs = devm_ioremap_resource(&pdev->dev, res);
> + emc->regs = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(emc->regs))
> return PTR_ERR(emc->regs);
>
>
Looks good, thanks!
Reviewed-by: Dmitry Osipenko <digetx@gmail.com>
next prev parent reply other threads:[~2019-12-23 15:42 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-22 18:50 [PATCH 1/9] memory: emif: convert to devm_platform_ioremap_resource Yangtao Li
2019-12-22 18:50 ` [PATCH 2/9] memory: jz4780_nemc: " Yangtao Li
2019-12-23 11:44 ` Paul Cercueil
2019-12-22 18:50 ` [PATCH 3/9] memory: mvebu-devbus: " Yangtao Li
2020-01-08 9:41 ` Gregory CLEMENT
2019-12-22 18:50 ` [PATCH 4/9] memory: tegra: " Yangtao Li
2019-12-23 15:42 ` Dmitry Osipenko [this message]
2019-12-22 18:50 ` [PATCH 5/9] memory: fsl-corenet-cf: " Yangtao Li
2019-12-22 18:50 ` [PATCH 6/9] memory: ti-aemif: " Yangtao Li
2019-12-22 18:50 ` [PATCH 7/9] memory: samsung: exynos5422-dmc: " Yangtao Li
2019-12-30 9:13 ` Lukasz Luba
2019-12-30 17:56 ` Krzysztof Kozlowski
2019-12-22 18:50 ` [PATCH 8/9] memory: mtk-smi: " Yangtao Li
2019-12-27 7:24 ` Yong Wu
2019-12-22 18:50 ` [PATCH 9/9] memory: omap-gpmc: switch to platform_get_irq Yangtao Li
2019-12-23 7:25 ` Roger Quadros
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=04758814-8e22-79b9-8ed1-ac0c31762d21@gmail.com \
--to=digetx@gmail.com \
--cc=alexios.zavras@intel.com \
--cc=allison@lohutok.net \
--cc=evgreen@chromium.org \
--cc=info@metux.net \
--cc=john@phrozen.org \
--cc=jonathanh@nvidia.com \
--cc=jroedel@suse.de \
--cc=kgene@kernel.org \
--cc=krzk@kernel.org \
--cc=kstewart@linuxfoundation.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=lukasz.luba@arm.com \
--cc=matthias.bgg@gmail.com \
--cc=paul@crapouillou.net \
--cc=pdeschrijver@nvidia.com \
--cc=rfontana@redhat.com \
--cc=rogerq@ti.com \
--cc=sboyd@kernel.org \
--cc=ssantosh@kernel.org \
--cc=tglx@linutronix.de \
--cc=thierry.reding@gmail.com \
--cc=tiny.windzz@gmail.com \
--cc=tony@atomide.com \
--cc=yong.wu@mediatek.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).