From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Walleij Subject: Re: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls Date: Thu, 23 Mar 2017 14:41:53 +0100 Message-ID: References: <20170320103113.tpveoq2onzrwmkdt@pengutronix.de> <20170320110718.e44s2gip36m75bqj@pengutronix.de> <20170323101045.u3uigdu5xfwjmjc7@pengutronix.de> <20170323111106.7ogh6g2oa3m4cqc6@pengutronix.de> <20170323123437.uqdwhfmmsjke3f7s@pengutronix.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <20170323123437.uqdwhfmmsjke3f7s@pengutronix.de> Sender: linux-kernel-owner@vger.kernel.org To: =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , Dmitry Torokhov Cc: Geert Uytterhoeven , Richard Genoud , Greg Kroah-Hartman , Geert Uytterhoeven , Nicolas Ferre , Boris Brezillon , "linux-arm-kernel@lists.infradead.org" , "linux-serial@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Janusz Uzycki , "linux-gpio@vger.kernel.org" List-Id: linux-gpio@vger.kernel.org On Thu, Mar 23, 2017 at 1:34 PM, Uwe Kleine-K=C3=B6nig wrote: > Maybe we can make gpiod_get_optional look like this: > > if (!dev->of_node && isnt_a_acpi_device(dev) && !IS_ENABLED(GPIOL= IB)) > return NULL; > else > return -ENOSYS; > > I don't know how isnt_a_acpi_device looks like, probably it involves > CONFIG_ACPI and/or dev->acpi_node. > > This should be safe and still comfortable for legacy platforms, isn't it? I like the looks of this. Can we revert Dmitry's patch and apply something like this instead? Dmitry, how do you feel about this? Yours, Linus Walleij