Skip to content

Commit 56ef68a

Browse files
Alban Bedelgregkh
authored andcommitted
gpiolib: acpi: Fix gpio count with string references
[ Upstream commit c62e065 ] 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 <alban.bedel@lht.dlh.de> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> Link: https://patch.msgid.link/20260129145944.3372777-1-alban.bedel@lht.dlh.de Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent daaf4fe commit 56ef68a

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
@@ -1351,6 +1351,7 @@ static int acpi_gpio_package_count(const union acpi_object *obj)
13511351
while (element < end) {
13521352
switch (element->type) {
13531353
case ACPI_TYPE_LOCAL_REFERENCE:
1354+
case ACPI_TYPE_STRING:
13541355
element += 3;
13551356
fallthrough;
13561357
case ACPI_TYPE_INTEGER:

0 commit comments

Comments
 (0)