lkml.org 
[lkml]   [2022]   [Jul]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v2 2/4] bus: hisi_lpc: Use devm_platform_ioremap_resource
    Date
    The struct resource is not used for anything else, so we can simplify
    the code a bit by using the helper function.

    Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Acked-by: John Garry <john.garry@huawei.com>
    Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
    ---
    v2: added tags
    drivers/bus/hisi_lpc.c | 4 +---
    1 file changed, 1 insertion(+), 3 deletions(-)

    diff --git a/drivers/bus/hisi_lpc.c b/drivers/bus/hisi_lpc.c
    index 6d432a07cbba..03d4d96ff794 100644
    --- a/drivers/bus/hisi_lpc.c
    +++ b/drivers/bus/hisi_lpc.c
    @@ -618,7 +618,6 @@ static int hisi_lpc_probe(struct platform_device *pdev)
    struct logic_pio_hwaddr *range;
    struct hisi_lpc_dev *lpcdev;
    resource_size_t io_end;
    - struct resource *res;
    int ret;

    lpcdev = devm_kzalloc(dev, sizeof(*lpcdev), GFP_KERNEL);
    @@ -627,8 +626,7 @@ static int hisi_lpc_probe(struct platform_device *pdev)

    spin_lock_init(&lpcdev->cycle_lock);

    - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
    - lpcdev->membase = devm_ioremap_resource(dev, res);
    + lpcdev->membase = devm_platform_ioremap_resource(pdev, 0);
    if (IS_ERR(lpcdev->membase))
    return PTR_ERR(lpcdev->membase);

    --
    2.35.1
    \
     
     \ /
      Last update: 2022-07-08 23:10    [W:2.916 / U:0.068 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site