From: Andrew Morton Signed-off-by: Andrew Morton Index: linux-2.6.17-rc4/drivers/serial/8250_kgdb.c =================================================================== --- linux-2.6.17-rc4.orig/drivers/serial/8250_kgdb.c 2006-06-09 17:16:53.000000000 +0100 +++ linux-2.6.17-rc4/drivers/serial/8250_kgdb.c 2006-06-09 17:16:55.000000000 +0100 @@ -24,6 +24,7 @@ #include #include #include +#include #include #include /* For BASE_BAUD and SERIAL_PORT_DFNS */ @@ -286,7 +287,8 @@ static void __init kgdb8250_late_init(vo /* Try and copy the old_rs_table. */ kgdb8250_copy_rs_table(); -#if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) +#if defined(CONFIG_SERIAL_8250) || \ + (defined(MODULE) && defined(CONFIG_SERIAL_8250_MODULE)) /* Take the port away from the main driver. */ serial8250_unregister_by_port(current_port); @@ -401,6 +403,7 @@ void __init kgdb8250_add_port(int i, str if (current_port != &kgdb8250_ports[i]) memcpy(&kgdb8250_ports[i], serial_req, sizeof(struct uart_port)); } +EXPORT_SYMBOL(kgdb8250_add_port); /** * kgdb8250_add_platform_port - Define a serial port for use with KGDB