drivers/tty/hvc: don't free hvc_console_setup after init

commit 501fed45b7 upstream.

When 'console=hvc0' is specified to the kernel parameter in x86 KVM guest,
hvc console is setup within a kthread. However, that will cause SEGV
and the boot will fail when the driver is builtin to the kernel,
because currently hvc_console_setup() is annotated with '__init'. This
patch removes '__init' to boot the guest successfully with 'console=hvc0'.

Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama@hds.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Tomoki Sekiyama 2014-05-02 18:58:24 -04:00 committed by Greg Kroah-Hartman
parent 774e1e67ef
commit e7f46ff2cf
1 changed files with 1 additions and 1 deletions

View File

@ -190,7 +190,7 @@ static struct tty_driver *hvc_console_device(struct console *c, int *index)
return hvc_driver;
}
static int __init hvc_console_setup(struct console *co, char *options)
static int hvc_console_setup(struct console *co, char *options)
{
if (co->index < 0 || co->index >= MAX_NR_HVC_CONSOLES)
return -ENODEV;