diff options
author | Cai Huoqing <caihuoqing@baidu.com> | 2021-09-01 07:07:24 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2021-09-30 10:07:48 +0200 |
commit | e4aa275f73103b619159d6ea7036985010dbf73a (patch) | |
tree | a1aa727a12ba35efa17cbcd08683e66f6a81c4be /drivers/media/platform | |
parent | 15486e0934eb47ff4230f0f8908c2ec0f945a910 (diff) | |
download | linux-stable-e4aa275f73103b619159d6ea7036985010dbf73a.tar.gz linux-stable-e4aa275f73103b619159d6ea7036985010dbf73a.tar.bz2 linux-stable-e4aa275f73103b619159d6ea7036985010dbf73a.zip |
media: am437x: 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/am437x/am437x-vpfe.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/media/platform/am437x/am437x-vpfe.c b/drivers/media/platform/am437x/am437x-vpfe.c index 48bb0c93729c..2dfae9bc0bba 100644 --- a/drivers/media/platform/am437x/am437x-vpfe.c +++ b/drivers/media/platform/am437x/am437x-vpfe.c @@ -2393,7 +2393,6 @@ static int vpfe_probe(struct platform_device *pdev) struct vpfe_config *vpfe_cfg; struct vpfe_device *vpfe; struct vpfe_ccdc *ccdc; - struct resource *res; int ret; vpfe = devm_kzalloc(&pdev->dev, sizeof(*vpfe), GFP_KERNEL); @@ -2411,8 +2410,7 @@ static int vpfe_probe(struct platform_device *pdev) vpfe->cfg = vpfe_cfg; ccdc = &vpfe->ccdc; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - ccdc->ccdc_cfg.base_addr = devm_ioremap_resource(&pdev->dev, res); + ccdc->ccdc_cfg.base_addr = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(ccdc->ccdc_cfg.base_addr)) { ret = PTR_ERR(ccdc->ccdc_cfg.base_addr); goto probe_out_cleanup; |