From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Jinjie Ruan <ruanjinjie@huawei.com>
Cc: tomi.valkeinen@ideasonboard.com,
maarten.lankhorst@linux.intel.com, mripard@kernel.org,
tzimmermann@suse.de, airlied@gmail.com, daniel@ffwll.ch,
michal.simek@amd.com, dri-devel@lists.freedesktop.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] drm: zynqmp_dp: Use devm_platform_ioremap_resource_byname()
Date: Wed, 28 Aug 2024 16:51:03 +0300 [thread overview]
Message-ID: <20240828135103.GC27131@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20240828084929.2527228-1-ruanjinjie@huawei.com>
Hi Jinjie,
Thank you for the patch.
On Wed, Aug 28, 2024 at 04:49:29PM +0800, Jinjie Ruan wrote:
> platform_get_resource_byname() and devm_ioremap_resource() can be
> replaced by devm_platform_ioremap_resource_byname(), which can
> simplify the code logic a bit, No functional change here.
>
> Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tomi, feel free to push this to drm-misc.
> ---
> drivers/gpu/drm/xlnx/zynqmp_dp.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/xlnx/zynqmp_dp.c b/drivers/gpu/drm/xlnx/zynqmp_dp.c
> index 129beac4c073..4eb19ac95bdb 100644
> --- a/drivers/gpu/drm/xlnx/zynqmp_dp.c
> +++ b/drivers/gpu/drm/xlnx/zynqmp_dp.c
> @@ -1715,7 +1715,6 @@ int zynqmp_dp_probe(struct zynqmp_dpsub *dpsub)
> struct platform_device *pdev = to_platform_device(dpsub->dev);
> struct drm_bridge *bridge;
> struct zynqmp_dp *dp;
> - struct resource *res;
> int ret;
>
> dp = kzalloc(sizeof(*dp), GFP_KERNEL);
> @@ -1729,8 +1728,7 @@ int zynqmp_dp_probe(struct zynqmp_dpsub *dpsub)
> INIT_WORK(&dp->hpd_work, zynqmp_dp_hpd_work_func);
>
> /* Acquire all resources (IOMEM, IRQ and PHYs). */
> - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "dp");
> - dp->iomem = devm_ioremap_resource(dp->dev, res);
> + dp->iomem = devm_platform_ioremap_resource_byname(pdev, "dp");
> if (IS_ERR(dp->iomem)) {
> ret = PTR_ERR(dp->iomem);
> goto err_free;
--
Regards,
Laurent Pinchart
prev parent reply other threads:[~2024-08-28 13:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-28 8:49 Jinjie Ruan
2024-08-28 13:51 ` Laurent Pinchart [this message]
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=20240828135103.GC27131@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=airlied@gmail.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=michal.simek@amd.com \
--cc=mripard@kernel.org \
--cc=ruanjinjie@huawei.com \
--cc=tomi.valkeinen@ideasonboard.com \
--cc=tzimmermann@suse.de \
/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
all inboxes | Powered by JetHome®