Skip to content

Commit c62e065

Browse files
Alban BedelBartosz Golaszewski
authored andcommitted
gpiolib: acpi: Fix gpio count with string references
Since commit 9880702 ("ACPI: property: Support using strings in reference properties") it is possible to use strings instead of local references. This work fine with single GPIO but not with arrays as acpi_gpio_package_count() didn't handle this case. Update it to handle strings like local references to cover this case as well. Signed-off-by: Alban Bedel <[email protected]> Reviewed-by: Mika Westerberg <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Bartosz Golaszewski <[email protected]>
1 parent 18f7fcd commit c62e065

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/gpio/gpiolib-acpi-core.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1359,6 +1359,7 @@ static int acpi_gpio_package_count(const union acpi_object *obj)
13591359
while (element < end) {
13601360
switch (element->type) {
13611361
case ACPI_TYPE_LOCAL_REFERENCE:
1362+
case ACPI_TYPE_STRING:
13621363
element += 3;
13631364
fallthrough;
13641365
case ACPI_TYPE_INTEGER:

0 commit comments

Comments
 (0)