ACPI / gpio: do not fall back to parsing _CRS when we get a deferral
PATCH 1/1 ACPI / gpio: do not fall back to parsing _CRS when we get a deferral
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.
--- drivers/gpio/gpiolib-acpi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpio/gpiolib-acpi.c +3 -1
@@ -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 */
Signature · 5 lines
2.12.1.500.gab5fba24ee-goog -- Dmitry
Quoted 5 lines · Dmitry Torokhov
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
_CRSblock.Signed-off-by Dmitry Torokhov <[email protected]>
Can I get some indication from Mika/Rafael/Andy whether this is correct?
Yours,
Linus Walleij
Mika Westerberg
Acked-byQuoted 10 lines · Linus Walleij
Quoted 5 lines · Dmitry Torokhov
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
_CRSblock.Signed-off-by Dmitry Torokhov <[email protected]>Can I get some indication from Mika/Rafael/Andy whether this is correct?
Sorry, I saw the patch but then forgot to ack it.
Quoted 8 lines · Linus Walleij
Quoted 5 lines · Dmitry Torokhov
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_CRSblock.
Quoted 4 lines
Quoted 1 line
Signed-off-by Dmitry Torokhov <[email protected]>Can I get some indication from Mika/Rafael/Andy whether this is correct?
While Mika agrees on the change, I would like nevertheless to hear Hans' opinion or even Tested-by tag since it was his fix around those lines.
Signature · 2 lines
Andy Shevchenko <[email protected]> Intel Finland Oy
Quoted 4 lines · Dmitry Torokhov
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_CRSblock.
+Cc: Hans.
Hans, do have any objections on this? Would you ideally give your Tested-by?
Quoted 29 lines
Signed-off-by Dmitry Torokhov <[email protected]>---
drivers/gpio/gpiolib-acpi.c | 4 +++-1 file changed, 3 insertions(+), 1 deletion(-)drivers/gpio/gpiolib-acpi.c +0
-0@@ -572,8 +572,10 @@ struct gpio_desc *acpi_find_gpio(struct device *dev, }
desc =acpi_get_gpiod_by_index(adev, propname, idx, &info);drivers/gpio/gpiolib-acpi.c +1
-2-if (!IS_ERR (desc) || (PTR_ERR (desc) == -EPROBE_DEFER )) +if (!IS_ERR (desc))break;
drivers/gpio/gpiolib-acpi.c +2
-0+if (PTR_ERR (desc) == -EPROBE_DEFER ) +return ERR_CAST (desc);}
/* Then from plain_CRSGPIOs */
--
2.12.1.500.gab5fba24ee-goog
Signature · 2 lines
Andy Shevchenko <[email protected]> Intel Finland Oy
HI,
Quoted 10 lines · Andy Shevchenko
Quoted 4 lines · Dmitry Torokhov
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_CRSblock.+Cc: Hans.
Hans, do have any objections on this? Would you ideally give your Tested-by?
Looks good to me and also does not seem to break anything on my test devices, so:
Regards,
Hans
Quoted 31 lines
Quoted 30 lines
Signed-off-by Dmitry Torokhov <[email protected]>--- drivers/gpio/gpiolib-acpi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/gpio/gpiolib-acpi.c +3
-3@@ -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
Quoted 11 lines · Hans de Goede
HI,
Quoted 8 lines · Andy Shevchenko
Quoted 4 lines · Dmitry Torokhov
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_CRSblock.+Cc: Hans.
Quoted 7 lines
Quoted 2 lines
Hans, do have any objections on this? Would you ideally give your Tested-by?
Looks good to me and also does not seem to break anything on my test devices, so:
Acked-and-Tested-by Hans de Goede <[email protected]>
Thanks!
Linus, I'm fully satisfied :-)
Quoted 39 lines
Regards,
Hans
Quoted 33 lines
Quoted 33 lines
Signed-off-by Dmitry Torokhov <[email protected]>---
drivers/gpio/gpiolib-acpi.c | 4 +++-1 file changed, 3 insertions(+), 1 deletion(-)drivers/gpio/gpiolib- renamed from drivers/gpio/gpiolib-acpi.c +0
-0
acpi.c
indexa3faefa44f68..d3f9f028a37b100644drivers/gpio/gpiolib-acpi.c +0
-0@@ -572,8 +572,10 @@ struct gpio_desc *acpi_find_gpio(structdevice
*dev,
}desc = acpi_get_gpiod_by_index(adev, propname, idx,
&info);drivers/gpio/gpiolib-acpi.c +1
-2-if (!IS_ERR (desc) || (PTR_ERR (desc) == -EPROBE_DEFER )) +if (!IS_ERR (desc))break;
drivers/gpio/gpiolib-acpi.c +2
-0+if (PTR_ERR (desc) == -EPROBE_DEFER ) +return ERR_CAST (desc);}
/* Then from plain
_CRSGPIOs */
--
2.12.1.500.gab5fba24ee-goog
Signature · 2 lines
Andy Shevchenko <[email protected]> Intel Finland Oy
Quoted 5 lines · Dmitry Torokhov
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
_CRSblock.Signed-off-by Dmitry Torokhov <[email protected]>
Patch applied and tagged for stable with all ACKs and Tested-by's.
Yours,
Linus Walleij