Thread (80 messages) 80 messages, 6 authors, 2019-11-20

Re: [PATCH v4 30/47] serial: ucc_uart: factor out soft_uart initialization

From: Timur Tabi <timur@kernel.org>
Date: 2019-11-14 05:15:29
Also in: linux-arm-kernel, linux-serial, lkml

On Fri, Nov 8, 2019 at 7:03 AM Rasmus Villemoes
[off-list ref] 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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help