Commit 80a501a4 authored by Jeeeun Evans's avatar Jeeeun Evans Committed by Mauro Carvalho Chehab

media: staging: media: imx: Use devm_platform_ioremap_resource().

This patch fixes a warning by coccicheck:
drivers/staging/media/imx/imx7-mipi-csis.c:973:1-12: WARNING: Use devm_platform_ioremap_resource for state -> regs

Use devm_platform_ioremap_resource helper which wraps platform_get_resource()
and devm_ioremap_resource() together.
Signed-off-by: default avatarJeeeun Evans <jeeeunevans@gmail.com>
Reviewed-by: default avatarRui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent e1444e9b
...@@ -947,7 +947,6 @@ static void mipi_csis_debugfs_exit(struct csi_state *state) ...@@ -947,7 +947,6 @@ static void mipi_csis_debugfs_exit(struct csi_state *state)
static int mipi_csis_probe(struct platform_device *pdev) static int mipi_csis_probe(struct platform_device *pdev)
{ {
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
struct resource *mem_res;
struct csi_state *state; struct csi_state *state;
int ret; int ret;
...@@ -969,8 +968,7 @@ static int mipi_csis_probe(struct platform_device *pdev) ...@@ -969,8 +968,7 @@ static int mipi_csis_probe(struct platform_device *pdev)
mipi_csis_phy_init(state); mipi_csis_phy_init(state);
mipi_csis_phy_reset(state); mipi_csis_phy_reset(state);
mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); state->regs = devm_platform_ioremap_resource(pdev, 0);
state->regs = devm_ioremap_resource(dev, mem_res);
if (IS_ERR(state->regs)) if (IS_ERR(state->regs))
return PTR_ERR(state->regs); return PTR_ERR(state->regs);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment