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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2017-03-23 at 13:21 -0700, Dmitry Torokhov wrote:
> 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: Hans.

Hans, do have any objections on this? Would you ideally give your
Tested-by?

> 
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
> ---
>  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
> 
> 

-- 
Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Intel Finland Oy
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux