Commit 1f1b31f3 authored by Pavel Machek's avatar Pavel Machek Committed by Linus Torvalds

[PATCH] Fix ttyS0 vs. ttyS00 confusion

According to devices.txt, serial ports are reffered as ttyS0 (and not
ttyS00).  It would be nice to use that convention in printks, too.
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent d93c43ec
...@@ -1055,7 +1055,7 @@ simrs_init (void) ...@@ -1055,7 +1055,7 @@ simrs_init (void)
ia64_ssc_connect_irq(KEYBOARD_INTR, state->irq); ia64_ssc_connect_irq(KEYBOARD_INTR, state->irq);
} }
printk(KERN_INFO "ttyS%02d at 0x%04lx (irq = %d) is a %s\n", printk(KERN_INFO "ttyS%d at 0x%04lx (irq = %d) is a %s\n",
state->line, state->line,
state->port, state->irq, state->port, state->irq,
uart_config[state->type].name); uart_config[state->type].name);
......
...@@ -2592,7 +2592,7 @@ static int __init rs_8xx_init(void) ...@@ -2592,7 +2592,7 @@ static int __init rs_8xx_init(void)
state->icount.rx = state->icount.tx = 0; state->icount.rx = state->icount.tx = 0;
state->icount.frame = state->icount.parity = 0; state->icount.frame = state->icount.parity = 0;
state->icount.overrun = state->icount.brk = 0; state->icount.overrun = state->icount.brk = 0;
printk(KERN_INFO "ttyS%02d at 0x%04x is a %s\n", printk(KERN_INFO "ttyS%d at 0x%04x is a %s\n",
i, (unsigned int)(state->port), i, (unsigned int)(state->port),
(state->smc_scc_num & NUM_IS_SCC) ? "SCC" : "SMC"); (state->smc_scc_num & NUM_IS_SCC) ? "SCC" : "SMC");
#ifdef CONFIG_SERIAL_CONSOLE #ifdef CONFIG_SERIAL_CONSOLE
......
...@@ -430,7 +430,7 @@ static _INLINE_ void check_modem_status(struct async_struct *info) ...@@ -430,7 +430,7 @@ static _INLINE_ void check_modem_status(struct async_struct *info)
if ((info->flags & ASYNC_CHECK_CD) && (dstatus & SER_DCD)) { if ((info->flags & ASYNC_CHECK_CD) && (dstatus & SER_DCD)) {
#if (defined(SERIAL_DEBUG_OPEN) || defined(SERIAL_DEBUG_INTR)) #if (defined(SERIAL_DEBUG_OPEN) || defined(SERIAL_DEBUG_INTR))
printk("ttyS%02d CD now %s...", info->line, printk("ttyS%d CD now %s...", info->line,
(!(status & SER_DCD)) ? "on" : "off"); (!(status & SER_DCD)) ? "on" : "off");
#endif #endif
if (!(status & SER_DCD)) if (!(status & SER_DCD))
...@@ -2095,7 +2095,7 @@ static int __init rs_init(void) ...@@ -2095,7 +2095,7 @@ static int __init rs_init(void)
continue; continue;
*/ */
printk(KERN_INFO "ttyS%02d is the amiga builtin serial port\n", printk(KERN_INFO "ttyS%d is the amiga builtin serial port\n",
state->line); state->line);
/* Hardware set up */ /* Hardware set up */
......
...@@ -2379,7 +2379,7 @@ scrn[1] = '\0'; ...@@ -2379,7 +2379,7 @@ scrn[1] = '\0';
| CyPARITY| CyFRAME| CyOVERRUN; | CyPARITY| CyFRAME| CyOVERRUN;
/* info->timeout */ /* info->timeout */
printk("ttyS%1d ", info->line); printk("ttyS%d ", info->line);
port_num++;info++; port_num++;info++;
if(!(port_num & 7)){ if(!(port_num & 7)){
printk("\n "); printk("\n ");
......
...@@ -2592,7 +2592,7 @@ int rs_360_init(void) ...@@ -2592,7 +2592,7 @@ int rs_360_init(void)
state->icount.rx = state->icount.tx = 0; state->icount.rx = state->icount.tx = 0;
state->icount.frame = state->icount.parity = 0; state->icount.frame = state->icount.parity = 0;
state->icount.overrun = state->icount.brk = 0; state->icount.overrun = state->icount.brk = 0;
printk(KERN_INFO "ttyS%02d at irq 0x%02x is an %s\n", printk(KERN_INFO "ttyS%d at irq 0x%02x is an %s\n",
i, (unsigned int)(state->irq), i, (unsigned int)(state->irq),
(state->smc_scc_num & NUM_IS_SCC) ? "SCC" : "SMC"); (state->smc_scc_num & NUM_IS_SCC) ? "SCC" : "SMC");
......
...@@ -706,7 +706,7 @@ int zs_startup(struct dec_serial * info) ...@@ -706,7 +706,7 @@ int zs_startup(struct dec_serial * info)
save_flags(flags); cli(); save_flags(flags); cli();
#ifdef SERIAL_DEBUG_OPEN #ifdef SERIAL_DEBUG_OPEN
printk("starting up ttyS%02d (irq %d)...", info->line, info->irq); printk("starting up ttyS%d (irq %d)...", info->line, info->irq);
#endif #endif
/* /*
...@@ -1356,7 +1356,7 @@ static void rs_close(struct tty_struct *tty, struct file * filp) ...@@ -1356,7 +1356,7 @@ static void rs_close(struct tty_struct *tty, struct file * filp)
} }
#ifdef SERIAL_DEBUG_OPEN #ifdef SERIAL_DEBUG_OPEN
printk("rs_close ttyS%02d, count = %d\n", info->line, info->count); printk("rs_close ttyS%d, count = %d\n", info->line, info->count);
#endif #endif
if ((tty->count == 1) && (info->count != 1)) { if ((tty->count == 1) && (info->count != 1)) {
/* /*
...@@ -1371,7 +1371,7 @@ static void rs_close(struct tty_struct *tty, struct file * filp) ...@@ -1371,7 +1371,7 @@ static void rs_close(struct tty_struct *tty, struct file * filp)
info->count = 1; info->count = 1;
} }
if (--info->count < 0) { if (--info->count < 0) {
printk("rs_close: bad serial port count for ttyS%02d: %d\n", printk("rs_close: bad serial port count for ttyS%d: %d\n",
info->line, info->count); info->line, info->count);
info->count = 0; info->count = 0;
} }
...@@ -1531,7 +1531,7 @@ static int block_til_ready(struct tty_struct *tty, struct file * filp, ...@@ -1531,7 +1531,7 @@ static int block_til_ready(struct tty_struct *tty, struct file * filp,
retval = 0; retval = 0;
add_wait_queue(&info->open_wait, &wait); add_wait_queue(&info->open_wait, &wait);
#ifdef SERIAL_DEBUG_OPEN #ifdef SERIAL_DEBUG_OPEN
printk("block_til_ready before block: ttyS%02d, count = %d\n", printk("block_til_ready before block: ttyS%d, count = %d\n",
info->line, info->count); info->line, info->count);
#endif #endif
cli(); cli();
...@@ -1565,7 +1565,7 @@ static int block_til_ready(struct tty_struct *tty, struct file * filp, ...@@ -1565,7 +1565,7 @@ static int block_til_ready(struct tty_struct *tty, struct file * filp,
break; break;
} }
#ifdef SERIAL_DEBUG_OPEN #ifdef SERIAL_DEBUG_OPEN
printk("block_til_ready blocking: ttyS%02d, count = %d\n", printk("block_til_ready blocking: ttyS%d, count = %d\n",
info->line, info->count); info->line, info->count);
#endif #endif
schedule(); schedule();
...@@ -1576,7 +1576,7 @@ static int block_til_ready(struct tty_struct *tty, struct file * filp, ...@@ -1576,7 +1576,7 @@ static int block_til_ready(struct tty_struct *tty, struct file * filp,
info->count++; info->count++;
info->blocked_open--; info->blocked_open--;
#ifdef SERIAL_DEBUG_OPEN #ifdef SERIAL_DEBUG_OPEN
printk("block_til_ready after blocking: ttyS%02d, count = %d\n", printk("block_til_ready after blocking: ttyS%d, count = %d\n",
info->line, info->count); info->line, info->count);
#endif #endif
if (retval) if (retval)
...@@ -1896,7 +1896,7 @@ int __init zs_init(void) ...@@ -1896,7 +1896,7 @@ int __init zs_init(void)
info->tqueue.data = info; info->tqueue.data = info;
init_waitqueue_head(&info->open_wait); init_waitqueue_head(&info->open_wait);
init_waitqueue_head(&info->close_wait); init_waitqueue_head(&info->close_wait);
printk("ttyS%02d at 0x%08x (irq = %d)", info->line, printk("ttyS%d at 0x%08x (irq = %d)", info->line,
info->port, info->irq); info->port, info->irq);
printk(" is a Z85C30 SCC\n"); printk(" is a Z85C30 SCC\n");
tty_register_device(serial_driver, info->line, NULL); tty_register_device(serial_driver, info->line, NULL);
......
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