]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
gpio-rcar: use devm_ioremap_resource()
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Thu, 12 Oct 2017 21:08:14 +0000 (00:08 +0300)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 31 Oct 2017 08:52:13 +0000 (09:52 +0100)
commit5a24d4b601561da08a70c065d4630bd9fadb37e8
treed35b970244b38ef6429f914f70b5bcad240cb11d
parent80057cb417b2873cf645ac85568118c32f038f4c
gpio-rcar: use devm_ioremap_resource()

Using devm_ioremap_resource() has several advantages over devm_ioremap():
- it checks the passed resource's validity;
- it calls devm_request_mem_region() to check for the resource overlap;
- it prints an error message in case of error.

We can call devm_ioremap_resource() instead of devm_ioremap_nocache()
as ioremap() and ioremap_nocache()  are implemented identically on ARM.
Doing this saves 2 LoCs and 80 bytes (AArch64 gcc 4.8.5).

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-rcar.c