mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
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 <[email protected]> Reviewed-by: Simon Horman <[email protected]>
This commit is contained in:
parent
124cde98f8
commit
9925e87957
1 changed files with 2 additions and 1 deletions
|
|
@ -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 a new issue