lkml.org 
[lkml]   [2019]   [Oct]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH -next] staging: media: omap4iss: use devm_platform_ioremap_resource() to simplify code
Hello YueHaibing,

Thank you for the patch.

The same fix has already been submitted a week ago, and I have sent a
pull request today that includes it. I'm afraid I thus can't take this
patch. The good news is that the change was good :-)

On Wed, Oct 16, 2019 at 04:51:36PM +0800, YueHaibing wrote:
> Use devm_platform_ioremap_resource() to simplify the code a bit.
> This is detected by coccinelle.
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> drivers/staging/media/omap4iss/iss.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/drivers/staging/media/omap4iss/iss.c b/drivers/staging/media/omap4iss/iss.c
> index 1a966cb..6fb60b5 100644
> --- a/drivers/staging/media/omap4iss/iss.c
> +++ b/drivers/staging/media/omap4iss/iss.c
> @@ -908,11 +908,7 @@ static int iss_map_mem_resource(struct platform_device *pdev,
> struct iss_device *iss,
> enum iss_mem_resources res)
> {
> - struct resource *mem;
> -
> - mem = platform_get_resource(pdev, IORESOURCE_MEM, res);
> -
> - iss->regs[res] = devm_ioremap_resource(iss->dev, mem);
> + iss->regs[res] = devm_platform_ioremap_resource(pdev, res);
>
> return PTR_ERR_OR_ZERO(iss->regs[res]);
> }

--
Regards,

Laurent Pinchart

\
 
 \ /
  Last update: 2019-10-16 11:59    [W:0.027 / U:0.732 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site