diff options
author | Cai Huoqing <caihuoqing@baidu.com> | 2021-09-01 07:52:01 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2021-09-30 10:07:50 +0200 |
commit | 028ac5439f74dd1238a79aea9da035497fd94635 (patch) | |
tree | c168ac0b01e0844c756d032f00515e4425192af8 /drivers/media/platform | |
parent | af2450254052e0da8c42501ee3e2801cc5a6c1f3 (diff) | |
download | linux-stable-028ac5439f74dd1238a79aea9da035497fd94635.tar.gz linux-stable-028ac5439f74dd1238a79aea9da035497fd94635.tar.bz2 linux-stable-028ac5439f74dd1238a79aea9da035497fd94635.zip |
media: mtk-jpeg: 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/mtk-jpeg/mtk_jpeg_core.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c b/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c index a89c7b206eef..af994b9913a6 100644 --- a/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c +++ b/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c @@ -1341,7 +1341,6 @@ static inline void mtk_jpeg_clk_release(struct mtk_jpeg_dev *jpeg) static int mtk_jpeg_probe(struct platform_device *pdev) { struct mtk_jpeg_dev *jpeg; - struct resource *res; int jpeg_irq; int ret; @@ -1355,8 +1354,7 @@ static int mtk_jpeg_probe(struct platform_device *pdev) jpeg->variant = of_device_get_match_data(jpeg->dev); INIT_DELAYED_WORK(&jpeg->job_timeout_work, mtk_jpeg_job_timeout_work); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - jpeg->reg_base = devm_ioremap_resource(&pdev->dev, res); + jpeg->reg_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(jpeg->reg_base)) { ret = PTR_ERR(jpeg->reg_base); return ret; |