Skip to content

Commit 633cd7f

Browse files
Alban BedelUlrich Hecht
authored andcommitted
gpiolib: acpi: Fix gpio count with string references
[ Upstream commit c62e0658d458d8f100445445c3ddb106f3824a45 ] Since commit 9880702d123f2 ("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]> Signed-off-by: Sasha Levin <[email protected]>
1 parent f267b3f commit 633cd7f

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/gpio/gpiolib-acpi.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1217,6 +1217,7 @@ static int acpi_gpio_package_count(const union acpi_object *obj)
12171217
while (element < end) {
12181218
switch (element->type) {
12191219
case ACPI_TYPE_LOCAL_REFERENCE:
1220+
case ACPI_TYPE_STRING:
12201221
element += 3;
12211222
/* Fallthrough */
12221223
case ACPI_TYPE_INTEGER:

0 commit comments

Comments
 (0)