diff options
author | Marek Vasut <marex@denx.de> | 2012-09-09 18:48:28 +0200 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2012-10-15 11:53:48 -0700 |
commit | 90bad891e18cd77273ee951e61623d768255bcda (patch) | |
tree | 203eaa4424c779a3eb529b963e604aa106688278 /arch/powerpc | |
parent | 89143fb3b0cc9897b7aa9ec8b6028a6c624887d4 (diff) |
serial: Properly spell out the structure member names of serial_driver
Properly spell out the whole structure member names when an initialized
varible is instantiated from the struct serial_driver. In case the
structure definition for struct serial_driver undergoes reordering,
there will be no impact on variables defined based on this structure.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Marek Vasut <marek.vasut@gmail.com>
Cc: Tom Rini <trini@ti.com>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Stefan Roese <sr@denx.de>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: C Nauman <cnauman@diagraph.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Michal Simek <monstr@monstr.eu>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/cpu/mpc512x/serial.c | 18 | ||||
-rw-r--r-- | arch/powerpc/cpu/mpc5xxx/serial.c | 32 | ||||
-rw-r--r-- | arch/powerpc/cpu/mpc8xx/serial.c | 32 |
3 files changed, 41 insertions, 41 deletions
diff --git a/arch/powerpc/cpu/mpc512x/serial.c b/arch/powerpc/cpu/mpc512x/serial.c index 7c53346ea03..f4f52ad3576 100644 --- a/arch/powerpc/cpu/mpc512x/serial.c +++ b/arch/powerpc/cpu/mpc512x/serial.c @@ -319,15 +319,15 @@ int serial_getcts_dev(unsigned int idx) serial_puts_dev(port, s); \ } -#define INIT_PSC_SERIAL_STRUCTURE(port, name) { \ - name, \ - serial##port##_init, \ - serial##port##_uninit, \ - serial##port##_setbrg, \ - serial##port##_getc, \ - serial##port##_tstc, \ - serial##port##_putc, \ - serial##port##_puts, \ +#define INIT_PSC_SERIAL_STRUCTURE(port, __name) { \ + .name = __name, \ + .start = serial##port##_init, \ + .stop = serial##port##_uninit, \ + .setbrg = serial##port##_setbrg, \ + .getc = serial##port##_getc, \ + .tstc = serial##port##_tstc, \ + .putc = serial##port##_putc, \ + .puts = serial##port##_puts, \ } #if defined(CONFIG_SYS_PSC1) diff --git a/arch/powerpc/cpu/mpc5xxx/serial.c b/arch/powerpc/cpu/mpc5xxx/serial.c index aa09f67ccf3..9bebff85123 100644 --- a/arch/powerpc/cpu/mpc5xxx/serial.c +++ b/arch/powerpc/cpu/mpc5xxx/serial.c @@ -338,14 +338,14 @@ int serial1_tstc(void) struct serial_device serial0_device = { - "serial0", - serial0_init, - NULL, - serial0_setbrg, - serial0_getc, - serial0_tstc, - serial0_putc, - serial0_puts, + .name = "serial0", + .start = serial0_init, + .stop = NULL, + .setbrg = serial0_setbrg, + .getc = serial0_getc, + .tstc = serial0_tstc, + .putc = serial0_putc, + .puts = serial0_puts, }; __weak struct serial_device *default_serial_console(void) @@ -355,14 +355,14 @@ __weak struct serial_device *default_serial_console(void) struct serial_device serial1_device = { - "serial1", - serial1_init, - NULL, - serial1_setbrg, - serial1_getc, - serial1_tstc, - serial1_putc, - serial1_puts, + .name = "serial1", + .start = serial1_init, + .stop = NULL, + .setbrg = serial1_setbrg, + .getc = serial1_getc, + .tstc = serial1_tstc, + .putc = serial1_putc, + .puts = serial1_puts, }; #endif /* CONFIG_SERIAL_MULTI */ diff --git a/arch/powerpc/cpu/mpc8xx/serial.c b/arch/powerpc/cpu/mpc8xx/serial.c index 9239b24d204..dc9b3236cbc 100644 --- a/arch/powerpc/cpu/mpc8xx/serial.c +++ b/arch/powerpc/cpu/mpc8xx/serial.c @@ -390,14 +390,14 @@ smc_tstc(void) struct serial_device serial_smc_device = { - "serial_smc", - smc_init, - NULL, - smc_setbrg, - smc_getc, - smc_tstc, - smc_putc, - smc_puts, + .name = "serial_smc", + .start = smc_init, + .stop = NULL, + .setbrg = smc_setbrg, + .getc = smc_getc, + .tstc = smc_tstc, + .putc = smc_putc, + .puts = smc_puts, }; #endif /* CONFIG_8xx_CONS_SMC1 || CONFIG_8xx_CONS_SMC2 */ @@ -660,14 +660,14 @@ scc_tstc(void) struct serial_device serial_scc_device = { - "serial_scc", - scc_init, - NULL, - scc_setbrg, - scc_getc, - scc_tstc, - scc_putc, - scc_puts, + .name = "serial_scc", + .start = scc_init, + .stop = NULL, + .setbrg = scc_setbrg, + .getc = scc_getc, + .tstc = scc_tstc, + .putc = scc_putc, + .puts = scc_puts, }; #endif /* CONFIG_8xx_CONS_SCCx */ |