From: Matthias Fuchs Date: Fri, 9 Nov 2007 16:05:16 +0100 Subject: [U-Boot-Users] [PATCH 2/3] serial: Make default_serial_console() a weak function Message-ID: <200711091605.16873.matthias.fuchs@esd-electronics.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de serial: Make default_serial_console() a weak function 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 --- commit e2166ace3e44dd42196d2c0ce41367ec9950ffb8 tree bbb33e6e98b5d844178eb33ac2da4ac2b85f9d37 parent a03f5c336a82564932e6d4e00a26cebb5f4e8694 author Matthias Fuchs Fri, 09 Nov 2007 15:51:37 +0100 committer Matthias Fuchs Fri, 09 Nov 2007 15:51:37 +0100 common/serial.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/common/serial.c b/common/serial.c index b9916e2..5601080 100644 --- a/common/serial.c +++ b/common/serial.c @@ -33,7 +33,7 @@ static struct serial_device *serial_devi 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_con #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)