pinctrl: pinctrl-single: Avoid divisions in context save/restore
authorGeert Uytterhoeven <geert+renesas@glider.be>
Thu, 7 Jun 2018 12:24:34 +0000 (14:24 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 18 Jun 2018 05:56:05 +0000 (07:56 +0200)
commit7d71b5f4b2fb5b2a38794fe029d6245c86244de6
tree48e5f2ac3dfd604237f651d2c657e3ec4d0bf72c
parent7547b5969e069520d4cf23ba43b4ac889f8bd0ef
pinctrl: pinctrl-single: Avoid divisions in context save/restore

The divisions (and multiplications) can be avoided by changing the loops
to use increments of mux_bytes instead of 1.
While at it, remove the unneeded casts when assigning void pointers.

This saves +100 bytes of kernel size on arm32/arm64.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Tony Lindgren <tony@atomide.com>
Tested-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinctrl-single.c