summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-htc-egpio.c
diff options
context:
space:
mode:
authorBartosz Golaszewski <bgolaszewski@baylibre.com>2019-10-02 19:53:57 +0300
committerBartosz Golaszewski <bgolaszewski@baylibre.com>2019-10-09 19:20:22 +0300
commit1135ee4af74078a92b343e0fea08814c077d512c (patch)
treec91439a063dd062f1e8d1b71b4ebd7284d7f35f9 /drivers/gpio/gpio-htc-egpio.c
parent71b4da2b370bb2b0f3391d24049417e9be0281a0 (diff)
downloadlinux-1135ee4af74078a92b343e0fea08814c077d512c.tar.xz
gpio: htc-egpio: use devm_platform_ioremap_resource()
There's no need to use the nocache variant of ioremap(). Switch to using devm_platform_ioremap_resource(). Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-htc-egpio.c')
-rw-r--r--drivers/gpio/gpio-htc-egpio.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/gpio/gpio-htc-egpio.c b/drivers/gpio/gpio-htc-egpio.c
index 6eb56f7ab9c9..2d4b0b888f66 100644
--- a/drivers/gpio/gpio-htc-egpio.c
+++ b/drivers/gpio/gpio-htc-egpio.c
@@ -281,14 +281,9 @@ static int __init egpio_probe(struct platform_device *pdev)
ei->chained_irq = res->start;
/* Map egpio chip into virtual address space. */
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!res)
+ ei->base_addr = devm_platform_ioremap_resource(pdev, 0);
+ if (IS_ERR(ei->base_addr))
goto fail;
- ei->base_addr = devm_ioremap_nocache(&pdev->dev, res->start,
- resource_size(res));
- if (!ei->base_addr)
- goto fail;
- pr_debug("EGPIO phys=%08x virt=%p\n", (u32)res->start, ei->base_addr);
if ((pdata->bus_width != 16) && (pdata->bus_width != 32))
goto fail;