]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
serial: Make default_serial_console() a weak function
authorMatthias Fuchs <matthias.fuchs@esd-electronics.com>
Thu, 27 Dec 2007 15:57:23 +0000 (16:57 +0100)
committerWolfgang Denk <wd@denx.de>
Wed, 9 Jan 2008 12:27:39 +0000 (13:27 +0100)
With this patch it is possible to reimplement default_serial_console()
in board specific code. This will be done in the upcomming PMC440
U-Boot port. This also allows the lwmon board maintainer to
remove the '#if !defined(CONFIG_LWMON) ...' from common/serial.c.

Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
common/serial.c

index b9916e2b5ec3a7ed3d3261363192c168d8f7690b..56010807be599a529537d0a8df508140e9989561 100644 (file)
@@ -33,7 +33,7 @@ static struct serial_device *serial_devices = NULL;
 static struct serial_device *serial_current = NULL;
 
 #if !defined(CONFIG_LWMON) && !defined(CONFIG_PXA27X)
-struct serial_device *default_serial_console (void)
+struct serial_device *__default_serial_console (void)
 {
 #if defined(CONFIG_8xx_CONS_SMC1) || defined(CONFIG_8xx_CONS_SMC2)
        return &serial_smc_device;
@@ -64,6 +64,8 @@ struct serial_device *default_serial_console (void)
 #error No default console
 #endif
 }
+
+struct serial_device *default_serial_console(void) __attribute__((weak, alias("__default_serial_console")));
 #endif
 
 int serial_register (struct serial_device *dev)