diff options
author | Jeeeun Evans <jeeeunevans@gmail.com> | 2019-09-26 12:55:39 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-10-10 07:20:53 -0300 |
commit | 80a501a46f0887ad2a17e1bdfdd753a4e75bbe7c (patch) | |
tree | b2fdab5f7c1569b0d47feb3bd913297694825bc6 /drivers/staging/media/imx | |
parent | e1444e9b0424c70def6352580762d660af50e03f (diff) |
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: Jeeeun Evans <jeeeunevans@gmail.com>
Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/staging/media/imx')
-rw-r--r-- | drivers/staging/media/imx/imx7-mipi-csis.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/media/imx/imx7-mipi-csis.c b/drivers/staging/media/imx/imx7-mipi-csis.c index 73d8354e618c..bf21db38441f 100644 --- a/drivers/staging/media/imx/imx7-mipi-csis.c +++ b/drivers/staging/media/imx/imx7-mipi-csis.c @@ -947,7 +947,6 @@ static void mipi_csis_debugfs_exit(struct csi_state *state) static int mipi_csis_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - struct resource *mem_res; struct csi_state *state; int ret; @@ -969,8 +968,7 @@ static int mipi_csis_probe(struct platform_device *pdev) mipi_csis_phy_init(state); mipi_csis_phy_reset(state); - mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - state->regs = devm_ioremap_resource(dev, mem_res); + state->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(state->regs)) return PTR_ERR(state->regs); |