diff options
author | Cai Huoqing <caihuoqing@baidu.com> | 2021-09-01 07:54:03 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2021-09-30 10:07:50 +0200 |
commit | b2fb212d9e3070d0d457a39e29dcf61899c3a2c5 (patch) | |
tree | 10ed5e00c91f78e7175e68eda9d6f56ef8113eec /drivers/media/platform | |
parent | 028ac5439f74dd1238a79aea9da035497fd94635 (diff) | |
download | linux-stable-b2fb212d9e3070d0d457a39e29dcf61899c3a2c5.tar.gz linux-stable-b2fb212d9e3070d0d457a39e29dcf61899c3a2c5.tar.bz2 linux-stable-b2fb212d9e3070d0d457a39e29dcf61899c3a2c5.zip |
media: mx2_emmaprp: 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>
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')
-rw-r--r-- | drivers/media/platform/mx2_emmaprp.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/media/platform/mx2_emmaprp.c b/drivers/media/platform/mx2_emmaprp.c index 08a5473b5610..3ce84d0f078c 100644 --- a/drivers/media/platform/mx2_emmaprp.c +++ b/drivers/media/platform/mx2_emmaprp.c @@ -804,7 +804,6 @@ static int emmaprp_probe(struct platform_device *pdev) { struct emmaprp_dev *pcdev; struct video_device *vfd; - struct resource *res; int irq, ret; pcdev = devm_kzalloc(&pdev->dev, sizeof(*pcdev), GFP_KERNEL); @@ -822,8 +821,7 @@ static int emmaprp_probe(struct platform_device *pdev) if (IS_ERR(pcdev->clk_emma_ahb)) return PTR_ERR(pcdev->clk_emma_ahb); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - pcdev->base_emma = devm_ioremap_resource(&pdev->dev, res); + pcdev->base_emma = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(pcdev->base_emma)) return PTR_ERR(pcdev->base_emma); |