]> git.baikalelectronics.ru Git - kernel.git/commit
serial: imx: Initialize lock for non-registered console
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 25 May 2020 10:59:52 +0000 (13:59 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 May 2020 08:55:35 +0000 (10:55 +0200)
commit8294de1d737e9ed675c04fa64648fcfb987a4e5a
tree49527a5f8dcf0f1e845c0503235fee12aa73cb42
parentf614189df0053cce2911e1a5c44a67e82c77ae1d
serial: imx: 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 Freescale IMX 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: Guenter Roeck <linux@roeck-us.net>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20200525105952.13744-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/imx.c