summaryrefslogtreecommitdiffstats
path: root/drivers/tty/amiserial.c
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2013-11-22 16:47:27 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-11-25 08:54:25 -0800
commit3dcf344bef2e9b9910817b210783d79c383bc849 (patch)
tree0c8ad08d279da470c48069fa4040c50d70bbd1da /drivers/tty/amiserial.c
parentdc1dc2f8a5dd863bf2e79f338fc3ae29e99c683a (diff)
downloadlinux-3dcf344bef2e9b9910817b210783d79c383bc849.tar.bz2
TTY: amiserial, add missing platform check
When booting a multi-platform m68k kernel on a non-Amiga with "console=ttyS0" on the kernel command line, it crashes with: Unable to handle kernel access at virtual address 81dff01c Oops: 00000000 PC: [<001e09a8>] serial_console_write+0xc/0x70 Add the missing platform check to amiserial_console_init() to fix this. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/amiserial.c')
-rw-r--r--drivers/tty/amiserial.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/tty/amiserial.c b/drivers/tty/amiserial.c
index 2b86f8e0fb58..71630a2af42c 100644
--- a/drivers/tty/amiserial.c
+++ b/drivers/tty/amiserial.c
@@ -1855,6 +1855,9 @@ static struct console sercons = {
*/
static int __init amiserial_console_init(void)
{
+ if (!MACH_IS_AMIGA)
+ return -ENODEV;
+
register_console(&sercons);
return 0;
}