]> git.baikalelectronics.ru Git - kernel.git/commit
serial: sunhv: Initialize lock for non-registered console
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 2 Apr 2020 17:20:26 +0000 (20:20 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 16 Apr 2020 14:16:52 +0000 (16:16 +0200)
commit07cee33f1a8fd237a9a3476afad4767f60f61adf
tree490c728a55e16b8f1ecda764c065cdf650c0f148
parentd253e9dce640758c66e3a1e7481d802c5c07c8ad
serial: sunhv: Initialize lock for non-registered console

The commit e4b5942f8567
("serial: core: Allow detach and attach serial device for console")
changed a bit logic behind lock initialization since for most of the console
driver it's supposed to have lock already initialized even if console is not
enabled. However, it's not the case for Sparc HV console.

Initialize lock explicitly in the ->probe().

Note, there is still an open question should or shouldn't not this driver
register console properly.

Fixes: e4b5942f8567 ("serial: core: Allow detach and attach serial device for console")
Reported-by: Anatoly Pugachev <matorola@gmail.com>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Anatoly Pugachev <matorola@gmail.com>
Link: https://lore.kernel.org/r/20200402172026.79478-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/sunhv.c