You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
media: rcar_fdp1: Make use of the helper function devm_platform_ioremap_resource()
[ Upstream commit 736cce12fa ]
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>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Stable-dep-of: c766c90faf93 ("media: rcar_fdp1: Fix refcount leak in probe and remove function")
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
bf91fb6c1e
commit
ee24c9e232
@@ -2260,7 +2260,6 @@ static int fdp1_probe(struct platform_device *pdev)
|
||||
struct fdp1_dev *fdp1;
|
||||
struct video_device *vfd;
|
||||
struct device_node *fcp_node;
|
||||
struct resource *res;
|
||||
struct clk *clk;
|
||||
unsigned int i;
|
||||
|
||||
@@ -2287,8 +2286,7 @@ static int fdp1_probe(struct platform_device *pdev)
|
||||
platform_set_drvdata(pdev, fdp1);
|
||||
|
||||
/* Memory-mapped registers */
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
fdp1->regs = devm_ioremap_resource(&pdev->dev, res);
|
||||
fdp1->regs = devm_platform_ioremap_resource(pdev, 0);
|
||||
if (IS_ERR(fdp1->regs))
|
||||
return PTR_ERR(fdp1->regs);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user