Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls

From: Dmitry Torokhov
Date: Thu Mar 23 2017 - 11:55:39 EST


On Thu, Mar 23, 2017 at 12:11:06PM +0100, Uwe Kleine-König wrote:
> Hello,
>
> On Thu, Mar 23, 2017 at 11:20:39AM +0100, Geert Uytterhoeven wrote:
> > But having the error breaks setups where the GPIO is optional and does
> > not exist.
>
> so the right way forward is to check harder in the situation where
> -ENOSYS was returned before to determine if there is really no GPIO to
> be used. "Oh, there are hints that there is no GPIO (GPIOLIB=n), so lets
> assume there isn't." is wrong.
>
> Can we please properly fix the problem instead of papering over it?

I think I once already said what would need to _attempt_ to fix it
"properly". You would need to implement custom parsing of ACPI tables in
GPIOLIB (what if they disable ACPI by mistake?), do the same for OF,
call board's manufacturer hotline to ensure that they indeed did not
forget to describe GPIOs, etc, etc.

Or you could trust that person responsible for selecting kernel
configuration has a clue, and if GPIOLIB is disabled it was disabled for
a reason.

--
Dmitry