drivers: initialize libgpiod v1 request config

Ubuntu noble still ships libgpiod 1.x, which selects the local-gpio v1
implementation. That path declared struct gpiod_line_request_config
without initializing the whole structure before passing it to libgpiod,
leaving padding or future fields undefined under stricter toolchains.

Zero-initialize the request configuration before filling the fields
cdba uses, matching the defensive style needed for older supported
distributions and newer compilers.

Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
This commit is contained in:
Bjorn Andersson committed 2026-07-05 18:29:05 +00:00
1 parent 2175378afe
commit 1bead0f004
1 file changed
+1 -1
+1 -1
View File
@@ -25,7 +25,7 @@ int local_gpio_init(struct local_gpio *local_gpio)
int i;
for (i = 0; i < GPIO_COUNT; ++i) {
struct gpiod_line_request_config cfg;
struct gpiod_line_request_config cfg = { 0 };
if (!local_gpio->options->gpios[i].present)
continue;