public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH 2/5] serial: Make default_serial_console() a weak function
Date: Sun, 11 Nov 2007 13:40:40 +0100	[thread overview]
Message-ID: <11947848441344-git-send-email-matthias.fuchs@esd-electronics.com> (raw)
In-Reply-To: <200711111304.10462.matthias.fuchs@esd-electronics.com>

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 |    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_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)
-- 
1.5.3

  parent reply	other threads:[~2007-11-11 12:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200711091606.07963.matthias.fuchs@esd-electronics.com>
2007-11-09 15:33 ` [U-Boot-Users] [PATCH 3/3] ppc4xx: Add initial esd PMC440 board support Stefan Roese
2007-11-11 12:04   ` Matthias Fuchs
2007-11-11 12:40     ` [U-Boot-Users] [PATCH 1/5] Add Epson RX8025 RTC support Matthias Fuchs
2007-11-11 12:40     ` Matthias Fuchs [this message]
2007-11-11 12:40     ` [U-Boot-Users] [PATCH 3/5] ppc4xx: Add initial esd PMC440 board files Matthias Fuchs
2007-11-11 12:40     ` [U-Boot-Users] [PATCH 4/5] ppc4xx: Add FPGA support and BSP command for PMC440 boards Matthias Fuchs
2007-11-12 14:58       ` Matthias Fuchs
2007-11-11 12:40     ` [U-Boot-Users] [PATCH 5/5] ppc4xx: Complete PMC440 board support Matthias Fuchs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11947848441344-git-send-email-matthias.fuchs@esd-electronics.com \
    --to=matthias.fuchs@esd-electronics.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox