mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Philippe CORNU <philippe.cornu@foss.st.com>
To: Yang Li <yang.lee@linux.alibaba.com>, <yannick.fertre@foss.st.com>
Cc: <raphael.gallais-pou@foss.st.com>, <airlied@gmail.com>,
	<daniel@ffwll.ch>, <mcoquelin.stm32@gmail.com>,
	<alexandre.torgue@foss.st.com>, <dri-devel@lists.freedesktop.org>,
	<linux-stm32@st-md-mailman.stormreply.com>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -next] drm/stm: dsi: Use devm_platform_ioremap_resource()
Date: Fri, 26 May 2023 13:36:42 +0200	[thread overview]
Message-ID: <f6aaa6b7-7f48-2574-ed0f-54cd3519bfbe@foss.st.com> (raw)
In-Reply-To: <20230421083402.21364-1-yang.lee@linux.alibaba.com>


On 4/21/23 10:34, Yang Li wrote:
> Convert platform_get_resource(),devm_ioremap_resource() to a single call
> to devm_platform_ioremap_resource(), as this is exactly what this function
> does.
> 
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
> ---
>   drivers/gpu/drm/stm/dw_mipi_dsi-stm.c | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c b/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c
> index 89897d5f5c72..1750b6a25e87 100644
> --- a/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c
> +++ b/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c
> @@ -444,15 +444,13 @@ static int dw_mipi_dsi_stm_probe(struct platform_device *pdev)
>   	struct device *dev = &pdev->dev;
>   	struct dw_mipi_dsi_stm *dsi;
>   	struct clk *pclk;
> -	struct resource *res;
>   	int ret;
>   
>   	dsi = devm_kzalloc(dev, sizeof(*dsi), GFP_KERNEL);
>   	if (!dsi)
>   		return -ENOMEM;
>   
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	dsi->base = devm_ioremap_resource(dev, res);
> +	dsi->base = devm_platform_ioremap_resource(pdev, 0);
>   	if (IS_ERR(dsi->base)) {
>   		ret = PTR_ERR(dsi->base);
>   		DRM_ERROR("Unable to get dsi registers %d\n", ret);

Applied on drm-misc-next.
Many thanks for your patch,
Philippe :-)

      parent reply	other threads:[~2023-05-26 11:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-21  8:34 Yang Li
2023-04-25  8:26 ` Raphael Gallais-Pou
2023-05-26 11:36 ` Philippe CORNU [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=f6aaa6b7-7f48-2574-ed0f-54cd3519bfbe@foss.st.com \
    --to=philippe.cornu@foss.st.com \
    --cc=airlied@gmail.com \
    --cc=alexandre.torgue@foss.st.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=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=raphael.gallais-pou@foss.st.com \
    --cc=yang.lee@linux.alibaba.com \
    --cc=yannick.fertre@foss.st.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

all inboxes | Powered by JetHome®