pinctrl: renesas: rza2: Embed pins in the priv struct

Turn the separately allocated pinctrl_pin_desc array into a flexible
array member of struct rza2_pinctrl_priv, annotated with
__counted_by(npins).  Compute the pin count before allocation so
struct_size() can size the combined object, and the two allocations can
be collapsed into one.

Change npins to unsigned int to avoid potential overflow/underflow
errors.

Assisted-by: Claude:Opus-4.7
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20260527202317.5347-1-rosenp@gmail.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
This commit is contained in:
Rosen Penev 2026-05-27 13:23:17 -07:00 • committed by Geert Uytterhoeven
commit 5a653cedec