Commit 5a3683d6 authored by Cai Huoqing's avatar Cai Huoqing Committed by Mauro Carvalho Chehab
Browse files

media: staging: media: rkvdec: 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>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 8ed85283
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -967,7 +967,6 @@ static const char * const rkvdec_clk_names[] = {
static int rkvdec_probe(struct platform_device *pdev)
{
	struct rkvdec_dev *rkvdec;
	struct resource *res;
	unsigned int i;
	int ret, irq;

@@ -999,8 +998,7 @@ static int rkvdec_probe(struct platform_device *pdev)
	 */
	clk_set_rate(rkvdec->clocks[0].clk, 500 * 1000 * 1000);

	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
	rkvdec->regs = devm_ioremap_resource(&pdev->dev, res);
	rkvdec->regs = devm_platform_ioremap_resource(pdev, 0);
	if (IS_ERR(rkvdec->regs))
		return PTR_ERR(rkvdec->regs);