Skip to content

Commit

Permalink
ACPI / gpio: do not fall back to parsing _CRS when we get a deferral
Browse files Browse the repository at this point in the history
If, while locating GPIOs by name, we get probe deferral, we should
immediately report it to caller rather than trying to fall back to parsing
unnamed GPIOs from _CRS block.

Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-and-Tested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
dtor authored and linusw committed Mar 30, 2017
1 parent 8a146fb commit 693bdaa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/gpio/gpiolib-acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -577,8 +577,10 @@ struct gpio_desc *acpi_find_gpio(struct device *dev,
}

desc = acpi_get_gpiod_by_index(adev, propname, idx, &info);
if (!IS_ERR(desc) || (PTR_ERR(desc) == -EPROBE_DEFER))
if (!IS_ERR(desc))
break;
if (PTR_ERR(desc) == -EPROBE_DEFER)
return ERR_CAST(desc);
}

/* Then from plain _CRS GPIOs */
Expand Down

0 comments on commit 693bdaa

Please sign in to comment.