mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 04:04:43 +01:00
gpiolib: acpi: Fix gpio count with string references
Since commit 9880702d12 ("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>
This commit is contained in:
parent
18f7fcd5e6
commit
c62e0658d4
1 changed files with 1 additions and 0 deletions
|
|
@ -1359,6 +1359,7 @@ static int acpi_gpio_package_count(const union acpi_object *obj)
|
|||
while (element < end) {
|
||||
switch (element->type) {
|
||||
case ACPI_TYPE_LOCAL_REFERENCE:
|
||||
case ACPI_TYPE_STRING:
|
||||
element += 3;
|
||||
fallthrough;
|
||||
case ACPI_TYPE_INTEGER:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue