From: Chun-Kuang Hu <chunkuang.hu@kernel.org>
To: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
Collabora Kernel ML <kernel@collabora.com>,
Yongqiang Niu <yongqiang.niu@mediatek.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
Nicolas Boichat <drinkcat@chromium.org>,
Hsin-Yi Wang <hsinyi@chromium.org>,
Chun-Kuang Hu <chunkuang.hu@kernel.org>,
Linux ARM <linux-arm-kernel@lists.infradead.org>,
"moderated list:ARM/Mediatek SoC support"
<linux-mediatek@lists.infradead.org>
Subject: Re: [PATCH 2/4] soc: mediatek: mmsys: Use devm_platform_ioremap_resource()
Date: Wed, 7 Oct 2020 07:21:33 +0800 [thread overview]
Message-ID: <CAAOTY__NVjKW-WXekeZSb4RRR4G01LQrPN+m_g0EQJ9hLviN8g@mail.gmail.com> (raw)
In-Reply-To: <20201006193320.405529-3-enric.balletbo@collabora.com>
Enric Balletbo i Serra <enric.balletbo@collabora.com> 於 2020年10月7日 週三 上午3:33寫道:
>
> For the common platform_get_resource()+devm_platform_ioremap() combination,
> there is a helper, so use it and make the code a bit more compact.
Reviewed-by: Chun-Kuang Hu <chunkuang.hu@mediatek.com>
>
> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
> ---
>
> drivers/soc/mediatek/mtk-mmsys.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/soc/mediatek/mtk-mmsys.c b/drivers/soc/mediatek/mtk-mmsys.c
> index 36ad66bb221b..18f93979e14a 100644
> --- a/drivers/soc/mediatek/mtk-mmsys.c
> +++ b/drivers/soc/mediatek/mtk-mmsys.c
> @@ -306,15 +306,12 @@ static int mtk_mmsys_probe(struct platform_device *pdev)
> struct platform_device *clks;
> struct platform_device *drm;
> void __iomem *config_regs;
> - struct resource *mem;
> int ret;
>
> - mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - config_regs = devm_ioremap_resource(dev, mem);
> + config_regs = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(config_regs)) {
> ret = PTR_ERR(config_regs);
> - dev_err(dev, "Failed to ioremap mmsys-config resource: %d\n",
> - ret);
> + dev_err(dev, "Failed to ioremap mmsys registers: %d\n", ret);
> return ret;
> }
>
> --
> 2.28.0
>
next prev parent reply other threads:[~2020-10-06 23:21 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-06 19:33 [PATCH 0/4] soc: mediatek: Prepare MMSYS for DDP routing using tables Enric Balletbo i Serra
2020-10-06 19:33 ` [PATCH 1/4] soc / drm: mediatek: Move DDP component defines into mtk-mmsys.h Enric Balletbo i Serra
2020-11-27 23:35 ` Matthias Brugger
2020-10-06 19:33 ` [PATCH 2/4] soc: mediatek: mmsys: Use devm_platform_ioremap_resource() Enric Balletbo i Serra
2020-10-06 23:21 ` Chun-Kuang Hu [this message]
2020-10-07 0:01 ` Chun-Kuang Hu
2020-11-27 23:35 ` Matthias Brugger
2020-10-06 19:33 ` [PATCH 3/4] soc: mediatek: mmsys: Create struct mtk_mmsys to store context data Enric Balletbo i Serra
2020-10-06 23:24 ` Chun-Kuang Hu
2020-10-07 0:00 ` Chun-Kuang Hu
2020-10-06 19:33 ` [PATCH 4/4] soc: mediatek: mmsys: Use an array for setting the routing registers Enric Balletbo i Serra
2020-10-07 0:02 ` Chun-Kuang Hu
2020-10-08 0:01 ` Chun-Kuang Hu
2020-10-08 7:49 ` Enric Balletbo i Serra
2020-10-08 10:53 ` Matthias Brugger
2020-10-08 10:22 ` Matthias Brugger
2020-10-11 2:22 ` Chun-Kuang Hu
2020-10-15 13:32 ` Enric Balletbo i Serra
2020-11-04 10:43 ` [PATCH 0/4] soc: mediatek: Prepare MMSYS for DDP routing using tables Enric Balletbo i Serra
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=CAAOTY__NVjKW-WXekeZSb4RRR4G01LQrPN+m_g0EQJ9hLviN8g@mail.gmail.com \
--to=chunkuang.hu@kernel.org \
--cc=drinkcat@chromium.org \
--cc=enric.balletbo@collabora.com \
--cc=hsinyi@chromium.org \
--cc=kernel@collabora.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=yongqiang.niu@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).