Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1607873 > unrolled thread

[PATCH] ACPI / gpio: do not fall back to parsing _CRS when we get a deferral

Started byDmitry Torokhov <dmitry.torokhov@gmail.com>
First post2017-03-23 21:30 +0100
Last post2017-03-23 21:30 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] ACPI / gpio: do not fall back to parsing _CRS when we get a  deferral Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-03-23 21:30 +0100

#1607873 — [PATCH] ACPI / gpio: do not fall back to parsing _CRS when we get a deferral

FromDmitry Torokhov <dmitry.torokhov@gmail.com>
Date2017-03-23 21:30 +0100
Subject[PATCH] ACPI / gpio: do not fall back to parsing _CRS when we get a deferral
Message-ID<tohwR-7sz-3@gated-at.bofh.it>
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

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web