From 39a192231b065bb026c170d9384b622009796a3d Mon Sep 17 00:00:00 2001 From: Ovidiu Panait Date: Fri, 24 Jul 2020 14:12:22 +0300 Subject: drivers: serial: Make serial_initialize return int serial_initialize is called only during the common init sequence, after relocation (in common/board_r.c). Because it has a void return value, it has to wrapped in initr_serial. In order to be able to get rid of this indirection, make serial_initialize return int. Remove extern from prototype in order to silence the following checkpatch warning: check: extern prototypes should be avoided in .h files Reviewed-by: Simon Glass Signed-off-by: Ovidiu Panait --- drivers/serial/serial.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'drivers/serial/serial.c') diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c index da017dc5b3..53358acb81 100644 --- a/drivers/serial/serial.c +++ b/drivers/serial/serial.c @@ -170,7 +170,7 @@ void serial_register(struct serial_device *dev) * serial port to the serial core. That serial port is then used as a * default output. */ -void serial_initialize(void) +int serial_initialize(void) { atmel_serial_initialize(); mcf_serial_initialize(); @@ -183,6 +183,8 @@ void serial_initialize(void) mtk_serial_initialize(); serial_assign(default_serial_console()->name); + + return 0; } static int serial_stub_start(struct stdio_dev *sdev) -- cgit v1.2.3