From 425101e115946f29287c51b2ea2c3527978645aa Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Wed, 12 Sep 2012 20:15:06 +0200 Subject: serial: zoom2: Remove zoom2 serial prototypes from serial.h Remove the prototypes for zoom2_serial_deviceN from serial.h . This can't be done right away, as they are referenced from the zoom2 config file. Therefore, adjust the code so the config file only specifies number of the port. Then, replace the simple return in default_serial_console() with a switch across possible values, which returns the zoom2_serial_deviceN . With such adjustment in place, the exported prototypes in serial.h can be safely removed. Signed-off-by: Marek Vasut Cc: Marek Vasut Cc: Tom Rini --- board/logicpd/zoom2/zoom2_serial.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'board/logicpd/zoom2/zoom2_serial.c') diff --git a/board/logicpd/zoom2/zoom2_serial.c b/board/logicpd/zoom2/zoom2_serial.c index 74f165fa25..9b7aea8590 100644 --- a/board/logicpd/zoom2/zoom2_serial.c +++ b/board/logicpd/zoom2/zoom2_serial.c @@ -135,5 +135,10 @@ QUAD_INIT (3) struct serial_device *default_serial_console(void) { - return ZOOM2_DEFAULT_SERIAL_DEVICE; + switch (ZOOM2_DEFAULT_SERIAL_DEVICE) { + case 0: return &zoom2_serial_device0; + case 1: return &zoom2_serial_device1; + case 2: return &zoom2_serial_device2; + case 3: return &zoom2_serial_device3; + } } -- cgit