linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ACPI / gpio: do not fall back to parsing _CRS when we get a deferral
@ 2017-03-23 20:21 Dmitry Torokhov
  2017-03-28 13:25 ` Linus Walleij
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Dmitry Torokhov @ 2017-03-23 20:21 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Alexandre Courbot, Mika Westerberg, Andy Shevchenko,
	Rafael J. Wysocki, linux-gpio, linux-kernel

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.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
 drivers/gpio/gpiolib-acpi.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c
index a3faefa44f68..d3f9f028a37b 100644
--- a/drivers/gpio/gpiolib-acpi.c
+++ b/drivers/gpio/gpiolib-acpi.c
@@ -572,8 +572,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 */
-- 
2.12.1.500.gab5fba24ee-goog


-- 
Dmitry

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-03-30  9:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-23 20:21 [PATCH] ACPI / gpio: do not fall back to parsing _CRS when we get a deferral Dmitry Torokhov
2017-03-28 13:25 ` Linus Walleij
2017-03-28 13:32   ` Mika Westerberg
2017-03-28 15:03   ` Andy Shevchenko
2017-03-28 15:04 ` Andy Shevchenko
2017-03-29 16:33   ` Hans de Goede
2017-03-29 16:42     ` Andy Shevchenko
2017-03-30  9:08 ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).