mirror of
https://github.com/linux-msm/cdba.git
synced 2026-10-06 21:32:09 -07:00
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:
1 parent
2175378afe
commit
1bead0f004
1 file changed
+1
-1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user