diff options
author | Marek Vasut <marex@denx.de> | 2012-09-07 14:35:31 +0200 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2012-10-15 11:53:48 -0700 |
commit | 89143fb3b0cc9897b7aa9ec8b6028a6c624887d4 (patch) | |
tree | 9e816e97bf358e4796387444ef44c665a5b192f2 /common | |
parent | 78322d63eac41957a41cd26d9b2e904da4a42fa1 (diff) | |
download | u-boot-imx-89143fb3b0cc9897b7aa9ec8b6028a6c624887d4.zip u-boot-imx-89143fb3b0cc9897b7aa9ec8b6028a6c624887d4.tar.gz u-boot-imx-89143fb3b0cc9897b7aa9ec8b6028a6c624887d4.tar.bz2 |
serial: Rename .init() and .uninit() in serial_device
Rename .init() to .start() and .uninit() to .stop() in struct
serial_device. This allows aligning struct serial_device with
closer to struct stdio_dev. The real goal here is to allow
these two structures to converge together and eventually make
one to be a superset of the other.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Tom Rini <trini@ti.com>
Diffstat (limited to 'common')
-rw-r--r-- | common/serial.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/common/serial.c b/common/serial.c index 4f2bc7f..c4b111c 100644 --- a/common/serial.c +++ b/common/serial.c @@ -35,7 +35,7 @@ static struct serial_device *serial_current; void serial_register(struct serial_device *dev) { #ifdef CONFIG_NEEDS_MANUAL_RELOC - dev->init += gd->reloc_off; + dev->start += gd->reloc_off; dev->setbrg += gd->reloc_off; dev->getc += gd->reloc_off; dev->tstc += gd->reloc_off; @@ -144,8 +144,8 @@ void serial_stdio_init(void) strcpy(dev.name, s->name); dev.flags = DEV_FLAGS_OUTPUT | DEV_FLAGS_INPUT; - dev.start = s->init; - dev.stop = s->uninit; + dev.start = s->start; + dev.stop = s->stop; dev.putc = s->putc; dev.puts = s->puts; dev.getc = s->getc; @@ -176,7 +176,7 @@ void serial_reinit_all(void) struct serial_device *s; for (s = serial_devices; s; s = s->next) - s->init(); + s->start(); } static struct serial_device *get_current(void) @@ -196,7 +196,7 @@ static struct serial_device *get_current(void) int serial_init(void) { - return get_current()->init(); + return get_current()->start(); } void serial_setbrg(void) @@ -296,9 +296,9 @@ int uart_post_test(int flags) /* Disable loop back */ s->loop(0); - /* XXX: There is no serial_uninit() !? */ - if (s->uninit) - s->uninit(); + /* XXX: There is no serial_stop() !? */ + if (s->stop) + s->stop(); } done: |