[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191016085136.22812-1-yuehaibing@huawei.com>
Date: Wed, 16 Oct 2019 16:51:36 +0800
From: YueHaibing <yuehaibing@...wei.com>
To: <laurent.pinchart@...asonboard.com>, <mchehab@...nel.org>,
<gregkh@...uxfoundation.org>
CC: <linux-media@...r.kernel.org>, <devel@...verdev.osuosl.org>,
<linux-kernel@...r.kernel.org>, YueHaibing <yuehaibing@...wei.com>
Subject: [PATCH -next] staging: media: omap4iss: use devm_platform_ioremap_resource() to simplify code
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.
Signed-off-by: YueHaibing <yuehaibing@...wei.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]);
}
--
2.7.4
Powered by blists - more mailing lists