diff options
author | Cai Huoqing <caihuoqing@baidu.com> | 2021-09-01 08:56:53 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2021-09-30 11:07:52 +0300 |
commit | 23f8bd25d1526079b5907bdfb7bcf6e579533e48 (patch) | |
tree | c0a2e0e76e8904c2e1a6929cd0ef54bf9cb530ad /drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c | |
parent | 092c69b2eb09137d41ca3c73c8b47cbba79062cb (diff) | |
download | linux-23f8bd25d1526079b5907bdfb7bcf6e579533e48.tar.xz |
media: sunxi: Make use of the helper function devm_platform_ioremap_resource()
Use the devm_platform_ioremap_resource() helper instead of
calling platform_get_resource() and devm_ioremap_resource()
separately
Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
Acked-by: Maxime Ripard <maxime@cerno.tech>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c')
-rw-r--r-- | drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c b/drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c index 94e98e470aff..80a10f238bbe 100644 --- a/drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c +++ b/drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c @@ -154,7 +154,6 @@ static int sun4i_csi_probe(struct platform_device *pdev) struct v4l2_subdev *subdev; struct video_device *vdev; struct sun4i_csi *csi; - struct resource *res; int ret; int irq; @@ -179,8 +178,7 @@ static int sun4i_csi_probe(struct platform_device *pdev) media_device_init(&csi->mdev); csi->v4l.mdev = &csi->mdev; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - csi->regs = devm_ioremap_resource(&pdev->dev, res); + csi->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(csi->regs)) return PTR_ERR(csi->regs); |