[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5f0d2112-ce82-e1b9-d421-de1f8067dbe8@gmx.de>
Date: Mon, 4 Jul 2022 11:01:15 +0200
From: Lino Sanfilippo <LinoSanfilippo@....de>
To: Andy Shevchenko <andy.shevchenko@...il.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jirislaby@...nel.org>,
Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Vladimir Zapolskiy <vz@...ia.com>,
linux-arm Mailing List <linux-arm-kernel@...ts.infradead.org>,
devicetree <devicetree@...r.kernel.org>,
"open list:SERIAL DRIVERS" <linux-serial@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Lukas Wunner <lukas@...ner.de>, p.rosenberger@...bus.com,
Lino Sanfilippo <l.sanfilippo@...bus.com>
Subject: Re: [PATCH v2 1/9] serial: core: only get RS485 termination GPIO if
supported
Hi,
On 03.07.22 20:27, Andy Shevchenko wrote:
> On Sun, Jul 3, 2022 at 7:02 PM Lino Sanfilippo <LinoSanfilippo@....de> wrote:
>>
>> From: Lino Sanfilippo <l.sanfilippo@...bus.com>
>>
>> In uart_get_rs485_mode() only try to get a termination GPIO if RS485 bus
>> termination is supported by the driver. This prevents from allocating
>> and holding a GPIO descriptor for the drivers lifetimg that will never be
>
> lifetiming
>
>> used.
>
> ...
>
>> port->rs485_term_gpio = devm_gpiod_get_optional(dev, "rs485-term",
>> GPIOD_OUT_LOW);
>> +
>> + if (port->rs485_term_gpio &&
>
> This check is incorrect. Either you need to move that after error
> checking (that's what I personally prefer), or use !IS_ERR_OR_NULL().
>
Right, a stupid mistake. I will fix this, thanks!
Regards,
Lino
Powered by blists - more mailing lists