lkml.org 
[lkml]   [2022]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.15 340/667] media: staging: media: rkvdec: Make use of the helper function devm_platform_ioremap_resource()
    Date
    From: Cai Huoqing <caihuoqing@baidu.com>

    [ Upstream commit 5a3683d60e56f4faa9552d3efafd87ef106dd393 ]

    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>
    ---
    drivers/staging/media/rkvdec/rkvdec.c | 4 +---
    1 file changed, 1 insertion(+), 3 deletions(-)

    diff --git a/drivers/staging/media/rkvdec/rkvdec.c b/drivers/staging/media/rkvdec/rkvdec.c
    index 3f3f96488d74..4fd4a2907da7 100644
    --- a/drivers/staging/media/rkvdec/rkvdec.c
    +++ b/drivers/staging/media/rkvdec/rkvdec.c
    @@ -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);

    --
    2.35.1


    \
     
     \ /
      Last update: 2022-06-07 21:19    [W:4.026 / U:0.044 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site