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>
This commit is contained in:
parent
71b4da2b37
commit
1135ee4af7
|
@ -281,14 +281,9 @@ static int __init egpio_probe(struct platform_device *pdev)
|
||||||
ei->chained_irq = res->start;
|
ei->chained_irq = res->start;
|
||||||
|
|
||||||
/* Map egpio chip into virtual address space. */
|
/* Map egpio chip into virtual address space. */
|
||||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
ei->base_addr = devm_platform_ioremap_resource(pdev, 0);
|
||||||
if (!res)
|
if (IS_ERR(ei->base_addr))
|
||||||
goto fail;
|
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))
|
if ((pdata->bus_width != 16) && (pdata->bus_width != 32))
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
Loading…
Reference in New Issue