mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-01 14:44:12 +00:00
gpio: acpi: Align acpi_find_gpio() with DT version
By some reason acpi_find_gpio() and acpi_gpio_count() have compared connection ID to "gpios" when tries to check if suffix is needed or not. Don't do any assumptions about what connection ID can be and, when defined, use it only with suffix as it's done in the device tree version. Reviewed-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
c29fd9ebb2
commit
9e66504a91
1 changed files with 2 additions and 2 deletions
|
@ -599,7 +599,7 @@ struct gpio_desc *acpi_find_gpio(struct device *dev,
|
|||
|
||||
/* Try first from _DSD */
|
||||
for (i = 0; i < ARRAY_SIZE(gpio_suffixes); i++) {
|
||||
if (con_id && strcmp(con_id, "gpios")) {
|
||||
if (con_id) {
|
||||
snprintf(propname, sizeof(propname), "%s-%s",
|
||||
con_id, gpio_suffixes[i]);
|
||||
} else {
|
||||
|
@ -1089,7 +1089,7 @@ int acpi_gpio_count(struct device *dev, const char *con_id)
|
|||
|
||||
/* Try first from _DSD */
|
||||
for (i = 0; i < ARRAY_SIZE(gpio_suffixes); i++) {
|
||||
if (con_id && strcmp(con_id, "gpios"))
|
||||
if (con_id)
|
||||
snprintf(propname, sizeof(propname), "%s-%s",
|
||||
con_id, gpio_suffixes[i]);
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue