lkml.org 
[lkml]   [2017]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 4/4] tty/serial: sh-sci: remove uneeded IS_ERR_OR_NULL calls
On Thu, Mar 23, 2017 at 1:34 PM, Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:

> Maybe we can make gpiod_get_optional look like this:
>
> if (!dev->of_node && isnt_a_acpi_device(dev) && !IS_ENABLED(GPIOLIB))
> 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

\
 
 \ /
  Last update: 2017-03-23 14:42    [W:0.091 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site