]> git.baikalelectronics.ru Git - kernel.git/commit
pinctrl: renesas: Factor out .pin_to_portcr() address handling
authorGeert Uytterhoeven <geert+renesas@glider.be>
Thu, 23 Dec 2021 14:56:18 +0000 (15:56 +0100)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Tue, 22 Feb 2022 08:57:18 +0000 (09:57 +0100)
commitc9dc26192ca13d50654d1fe55fc7e1fe9b8c9d16
treed33faf481ac64f3599cf2049c841efbf8fb0991e
parent66d2a5b25941b870d309805b63228b60132d5456
pinctrl: renesas: Factor out .pin_to_portcr() address handling

All implementations of the .pin_to_portcr() method implement the same
conversion from Port Control Register offset to virtual address.  Factor
it out into the two callers.
Remove the pfc parameter, as it is no longer used.

Note that the failure handling in r8a7740_pin_to_portcr() is pro forma,
as the function is never called with an invalid pin number.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/a485d4986a17259256988eb14e3a4c2b8d61c303.1640270559.git.geert+renesas@glider.be
drivers/pinctrl/renesas/pfc-r8a73a4.c
drivers/pinctrl/renesas/pfc-r8a7740.c
drivers/pinctrl/renesas/pfc-sh73a0.c
drivers/pinctrl/renesas/pinctrl.c
drivers/pinctrl/renesas/sh_pfc.h