Commit 044a3571 authored by Cai Huoqing's avatar Cai Huoqing Committed by Mauro Carvalho Chehab
Browse files

media: rc: st_rc: 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: default avatarCai Huoqing <caihuoqing@baidu.com>
Reviewed-by: default avatarPatrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent dfa974f5
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -231,7 +231,6 @@ static int st_rc_probe(struct platform_device *pdev)
	int ret = -EINVAL;
	struct rc_dev *rdev;
	struct device *dev = &pdev->dev;
	struct resource *res;
	struct st_rc_device *rc_dev;
	struct device_node *np = pdev->dev.of_node;
	const char *rx_mode;
@@ -274,9 +273,7 @@ static int st_rc_probe(struct platform_device *pdev)
		goto err;
	}

	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);

	rc_dev->base = devm_ioremap_resource(dev, res);
	rc_dev->base = devm_platform_ioremap_resource(pdev, 0);
	if (IS_ERR(rc_dev->base)) {
		ret = PTR_ERR(rc_dev->base);
		goto err;