diff options
author | Yangtao Li <frank.li@vivo.com> | 2023-07-04 17:55:43 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-07-27 09:59:52 +0200 |
commit | 405f3d102c465d329195e0046daf8121b4ab9998 (patch) | |
tree | 989ea859d8bf83f77ed4b76b87923c6fc04c2fe4 /drivers/staging/axis-fifo | |
parent | db4479215cb9bf1bf22843a3183b7876ddcd1e0f (diff) |
staging: axis-fifo: Use devm_platform_get_and_ioremap_resource()
Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230704095543.32812-1-frank.li@vivo.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/axis-fifo')
-rw-r--r-- | drivers/staging/axis-fifo/axis-fifo.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/staging/axis-fifo/axis-fifo.c b/drivers/staging/axis-fifo/axis-fifo.c index 98db47cb4fa4..0bfe272ba819 100644 --- a/drivers/staging/axis-fifo/axis-fifo.c +++ b/drivers/staging/axis-fifo/axis-fifo.c @@ -839,16 +839,8 @@ static int axis_fifo_probe(struct platform_device *pdev) * ---------------------------- */ - /* get iospace for the device */ - r_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!r_mem) { - dev_err(fifo->dt_device, "invalid address\n"); - rc = -ENODEV; - goto err_initial; - } - - /* request physical memory */ - fifo->base_addr = devm_ioremap_resource(fifo->dt_device, r_mem); + /* get iospace for the device and request physical memory */ + fifo->base_addr = devm_platform_get_and_ioremap_resource(pdev, 0, &r_mem); if (IS_ERR(fifo->base_addr)) { rc = PTR_ERR(fifo->base_addr); goto err_initial; |