Skip to contentSkip to conversation

staging: media: make use of devm_platform_ioremap_resource

PATCH Laurent Pinchart 1 participant 1 message Oct 16, 2019 1 message not in the archive Media (V4L/DVB)

lore
Share & tools
lore

Laurent Pinchart

author Reviewed-by
#1 lore raw
In reply to a message not in the archive

Hello Hariprasad,

Thank you for the patch.

As the patch only touches the omap4iss driver, you could have made the subject line a bit more specific, for instance "staging: media:
omap4iss: Use devm_platform_ioremap_resource". No big deal though.

Quoted 7 lines · On Tue, Oct 08, 2019 at 12:25:51PM +0530…

From: Hariprasad Kelam <[email protected]>

fix below issue reported by coccicheck drivers/staging//media/omap4iss/iss.c:915:1-15: WARNING: Use devm_platform_ioremap_resource for iss -> regs [ res ]

The change looks good to me.

and applied to my tree for v5.5.

Quoted 21 lines
---
 drivers/staging/media/omap4iss/iss.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/staging/media/omap4iss/iss.c +1 -5
index 1a966cb..6fb60b5 100644
@@ -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]);
 }
Signature · 3 lines
Regards,

Laurent Pinchart