gpio: dwapb: reduce allocation to single kzalloc
Instead of kzalloc + kcalloc, Combine the two using a flexible array
member.
Allows using __counted_by for extra runtime analysis. Move counting
variable to right after allocation as required by __counted_by.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Reviewed-by: Linus Walleij <linusw@kernel.org>
Link: https://patch.msgid.link/20260320005338.30355-1-rosenp@gmail.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
authored by