lkml.org 
[lkml]   [2019]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v4 30/47] serial: ucc_uart: factor out soft_uart initialization
On Fri, Nov 8, 2019 at 7:03 AM Rasmus Villemoes
<linux@rasmusvillemoes.dk> wrote:
>
> - /*
> - * Determine if we need Soft-UART mode
> - */
> if (of_find_property(np, "soft-uart", NULL)) {
> dev_dbg(&ofdev->dev, "using Soft-UART mode\n");
> soft_uart = 1;
> + } else {
> + return 0;
> }

How about:

if (!of_find_property(np, "soft-uart", NULL))
return 0;

And I think you should be able to get rid of the "soft_uart" variable.

\
 
 \ /
  Last update: 2019-11-14 06:16    [W:0.446 / U:0.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site