]> rtime.felk.cvut.cz Git - zynq/linux.git/commitdiff
serial: uartps: Do not initialize field to zero again
authorMichal Simek <michal.simek@xilinx.com>
Mon, 3 Sep 2018 13:10:50 +0000 (15:10 +0200)
committerMichal Simek <michal.simek@xilinx.com>
Thu, 20 Sep 2018 13:23:58 +0000 (15:23 +0200)
Writing zero and NULLs to already initialized fields is not needed.
Remove this additional writes.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/xilinx_uartps.c

index 4ab50dfd4826601d4e2bf10f6bea64707371f5dd..b8fe3e60fffa6810170b088ad624f2c84ebf409d 100644 (file)
@@ -1466,15 +1466,12 @@ static int cdns_uart_probe(struct platform_device *pdev)
 
        /* At this point, we've got an empty uart_port struct, initialize it */
        spin_lock_init(&port->lock);
-       port->membase   = NULL;
-       port->irq       = 0;
        port->type      = PORT_UNKNOWN;
        port->iotype    = UPIO_MEM32;
        port->flags     = UPF_BOOT_AUTOCONF;
        port->ops       = &cdns_uart_ops;
        port->fifosize  = CDNS_UART_FIFO_SIZE;
        port->line      = id;
-       port->dev       = NULL;
 
        /*
         * Register the port.