]> asedeno.scripts.mit.edu Git - linux.git/commit
tty: serial: msm_serial: Remove __init from msm_console_setup()
authorJeffrey Hugo <jhugo@codeaurora.org>
Sun, 17 Feb 2019 05:05:52 +0000 (22:05 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Feb 2019 12:42:08 +0000 (13:42 +0100)
commitbe24c270185930997b55e20a859a954b2f4eaa46
treee9136c459a84882e56f9c2fe9cb6b731e0e40f18
parent5086e0a409a0c1b25af444b70766089a6359cc85
tty: serial: msm_serial: Remove __init from msm_console_setup()

Due to the complexities of modern Qualcomm SoCs, about a half dozen drivers
must successfully probe before the clocks for the console are present, and
the console can successfully probe.  Depending on several random factors
such as probe order and modules vs builtin, msm_serial may not be able to
successfully probe for some, at which point, __init annotated functions
may become unmapped.  If this occurs, msm_console_setup() will be called
from the probe path, but will no longer exist, resulting in a kernel
panic.

Resolve this issue by removing the __init annotation from
msm_console_setup().

Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/msm_serial.c