提交 c8a24bfb 编写于 作者: C Cai Huoqing 提交者: Zheng Zengkai

media: staging: media: rkvdec: Make use of the helper function devm_platform_ioremap_resource()

stable inclusion
from stable-v5.10.121
commit 82239e30ab04e1bc2c6b6a4519509e404d44ea15
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5L6CQ

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=82239e30ab04e1bc2c6b6a4519509e404d44ea15

--------------------------------

[ Upstream commit 5a3683d6 ]

Use the devm_platform_ioremap_resource() helper instead of
calling platform_get_resource() and devm_ioremap_resource()
separately
Signed-off-by: NCai Huoqing <caihuoqing@baidu.com>
Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: NMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
上级 30eeda73
...@@ -1000,7 +1000,6 @@ static const char * const rkvdec_clk_names[] = { ...@@ -1000,7 +1000,6 @@ static const char * const rkvdec_clk_names[] = {
static int rkvdec_probe(struct platform_device *pdev) static int rkvdec_probe(struct platform_device *pdev)
{ {
struct rkvdec_dev *rkvdec; struct rkvdec_dev *rkvdec;
struct resource *res;
unsigned int i; unsigned int i;
int ret, irq; int ret, irq;
...@@ -1032,8 +1031,7 @@ static int rkvdec_probe(struct platform_device *pdev) ...@@ -1032,8 +1031,7 @@ static int rkvdec_probe(struct platform_device *pdev)
*/ */
clk_set_rate(rkvdec->clocks[0].clk, 500 * 1000 * 1000); clk_set_rate(rkvdec->clocks[0].clk, 500 * 1000 * 1000);
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); rkvdec->regs = devm_platform_ioremap_resource(pdev, 0);
rkvdec->regs = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(rkvdec->regs)) if (IS_ERR(rkvdec->regs))
return PTR_ERR(rkvdec->regs); return PTR_ERR(rkvdec->regs);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册