Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 312432
b: refs/heads/master
c: fbd2415
h: refs/heads/master
v: v3
  • Loading branch information
Shuah Khan authored and Ingo Molnar committed Jun 6, 2012
1 parent 979393c commit c10171f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f841d792e38f75f5e25b0b66f7b5d235d180a735
refs/heads/master: fbd24153c48b8425b09c161a020483cd77da870e
12 changes: 6 additions & 6 deletions trunk/arch/x86/kernel/early_printk.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,22 +119,22 @@ static __init void early_serial_init(char *s)
unsigned char c;
unsigned divisor;
unsigned baud = DEFAULT_BAUD;
char *e;
ssize_t ret;

if (*s == ',')
++s;

if (*s) {
unsigned port;
if (!strncmp(s, "0x", 2)) {
early_serial_base = simple_strtoul(s, &e, 16);
ret = kstrtoint(s, 16, &early_serial_base);
} else {
static const int __initconst bases[] = { 0x3f8, 0x2f8 };

if (!strncmp(s, "ttyS", 4))
s += 4;
port = simple_strtoul(s, &e, 10);
if (port > 1 || s == e)
ret = kstrtouint(s, 10, &port);
if (ret || port > 1)
port = 0;
early_serial_base = bases[port];
}
Expand All @@ -149,8 +149,8 @@ static __init void early_serial_init(char *s)
outb(0x3, early_serial_base + MCR); /* DTR + RTS */

if (*s) {
baud = simple_strtoul(s, &e, 0);
if (baud == 0 || s == e)
ret = kstrtouint(s, 0, &baud);
if (ret || baud == 0)
baud = DEFAULT_BAUD;
}

Expand Down

0 comments on commit c10171f

Please sign in to comment.