mirror of https://gitee.com/openkylin/linux.git
pinctrl: sh-pfc: Validate pins/marks in pin groups at build time
Add a build-time check, to ensure the number of pins and pin marks in a pin group matches. This helps catching bugs early. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
This commit is contained in:
parent
124cde98f8
commit
9925e87957
|
@ -41,7 +41,8 @@ struct sh_pfc_pin {
|
|||
.name = #alias, \
|
||||
.pins = n##_pins, \
|
||||
.mux = n##_mux, \
|
||||
.nr_pins = ARRAY_SIZE(n##_pins), \
|
||||
.nr_pins = ARRAY_SIZE(n##_pins) + \
|
||||
BUILD_BUG_ON_ZERO(sizeof(n##_pins) != sizeof(n##_mux)), \
|
||||
}
|
||||
#define SH_PFC_PIN_GROUP(n) SH_PFC_PIN_GROUP_ALIAS(n, n)
|
||||
|
||||
|
|
Loading…
Reference in New Issue