Revert "serial: sunhv: Initialize lock for non-registered console"
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Sat, 11 Jul 2020 13:53:42 +0000 (16:53 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 Jul 2020 16:21:49 +0000 (18:21 +0200)
This reverts commit 0f87aa66e8c314f95c00eeff978c8a0b41e05d50.

There has been a quick fix against uninitialised lock revealed by
the commit f743061a85f5 ("serial: core: Initialise spin lock before use
in uart_configure_port()"). Since we have now better fix in serial core,
this may be safely reverted.

Fixes: 0f87aa66e8c3 ("serial: sunhv: Initialize lock for non-registered console")
Depends-on: f743061a85f5 ("serial: core: Initialise spin lock before use in uart_configure_port()")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20200711135346.71171-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/sunhv.c

index e35073e93a5b4710a56039a3e36ed15a00dc9b90..eafada8fb6fad8755104ffa4fdc7cb40c8cc1d6e 100644 (file)
@@ -567,9 +567,6 @@ static int hv_probe(struct platform_device *op)
        sunserial_console_match(&sunhv_console, op->dev.of_node,
                                &sunhv_reg, port->line, false);
 
-       /* We need to initialize lock even for non-registered console */
-       spin_lock_init(&port->lock);
-
        err = uart_add_one_port(&sunhv_reg, port);
        if (err)
                goto out_unregister_driver;