Commit 9925e879 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven

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: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: default avatarSimon Horman <horms+renesas@verge.net.au>
parent 124cde98
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment