Skip to content

Commit

Permalink
media: staging: media: rkvdec: Make use of the helper function devm_p…
Browse files Browse the repository at this point in the history
…latform_ioremap_resource()

[ Upstream commit 5a3683d ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
caihuoqing1990 authored and gregkh committed Jun 9, 2022
1 parent 5c24566 commit 82239e3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/staging/media/rkvdec/rkvdec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1000,7 +1000,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;

Expand Down Expand Up @@ -1032,8 +1031,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);

Expand Down

0 comments on commit 82239e3

Please sign in to comment.