Skip to content

Commit d4fc46f

Browse files
jwrdegoedelinusw
authored andcommitted
gpiolib: acpi: Make acpi_gpiochip_alloc_event always return AE_OK
acpi_gpiochip_alloc_event is used to loop over all _AEI resources, if we fail to bind an event handler to one of them, that is not a reason to not try the other resources. This commit modifies acpi_gpiochip_alloc_event to always return AE_OK, so that we will always try to add an event handler for all _AEI resources. Signed-off-by: Hans de Goede <[email protected]> Link: https://lore.kernel.org/r/[email protected] Acked-by: Mika Westerberg <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
1 parent 787b64a commit d4fc46f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/gpio/gpiolib-acpi.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ static void acpi_gpiochip_request_irqs(struct acpi_gpio_chip *acpi_gpio)
194194
acpi_gpiochip_request_irq(acpi_gpio, event);
195195
}
196196

197+
/* Always returns AE_OK so that we keep looping over the resources */
197198
static acpi_status acpi_gpiochip_alloc_event(struct acpi_resource *ares,
198199
void *context)
199200
{
@@ -233,7 +234,7 @@ static acpi_status acpi_gpiochip_alloc_event(struct acpi_resource *ares,
233234
dev_err(chip->parent,
234235
"Failed to request GPIO for pin 0x%04X, err %ld\n",
235236
pin, PTR_ERR(desc));
236-
return AE_ERROR;
237+
return AE_OK;
237238
}
238239

239240
ret = gpiochip_lock_as_irq(chip, pin);
@@ -293,7 +294,7 @@ static acpi_status acpi_gpiochip_alloc_event(struct acpi_resource *ares,
293294
fail_free_desc:
294295
gpiochip_free_own_desc(desc);
295296

296-
return AE_ERROR;
297+
return AE_OK;
297298
}
298299

299300
/**

0 commit comments

Comments
 (0)