Commit 39a19223 authored by Ovidiu Panait's avatar Ovidiu Panait Committed by Tom Rini
Browse files

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
check: extern prototypes should be avoided in .h files
Reviewed-by: Simon Glass's avatarSimon Glass <>
Signed-off-by: default avatarOvidiu Panait <>
parent 3a4b52a9
......@@ -170,9 +170,9 @@ int serial_init(void)
/* Called after relocation */
void serial_initialize(void)
int serial_initialize(void)
return serial_init();
static void _serial_putc(struct udevice *dev, char ch)
......@@ -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)
......@@ -183,6 +183,8 @@ void serial_initialize(void)
return 0;
static int serial_stub_start(struct stdio_dev *sdev)
......@@ -42,10 +42,10 @@ extern struct serial_device eserial5_device;
extern struct serial_device eserial6_device;
extern void serial_register(struct serial_device *);
extern void serial_initialize(void);
extern void serial_stdio_init(void);
extern int serial_assign(const char *name);
extern void serial_reinit_all(void);
int serial_initialize(void);
/* For usbtty */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment