diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2008-08-29 18:55:37 +1000 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2008-08-29 18:55:37 +1000 |
commit | e12702350c2a0f44aa198a64b3ee7206059e270c (patch) | |
tree | 093397e8fbe0b710c98cf75016839d69a70d41af | |
parent | f207c5e3dee3e700cc5e658797fbb4e32ada8b43 (diff) |
Revert "kgdboc,tty: Fix tty polling search to use name correctly"
This reverts commit 8a89d640448c261c248594511c72db0569725058.
Conflicts:
drivers/char/tty_io.c
-rw-r--r-- | drivers/char/tty_io.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index 2c7263e26c8e..52b0057b7116 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c @@ -294,23 +294,13 @@ struct tty_driver *tty_find_polling_driver(char *name, int *line) { struct tty_driver *p, *res = NULL; int tty_line = 0; - int len; char *str; - for (str = name; *str; str++) - if ((*str >= '0' && *str <= '9') || *str == ',') - break; - if (!*str) - return NULL; - - len = str - name; - tty_line = strict_strtoul(str, &str, 10); - mutex_lock(&tty_mutex); /* Search through the tty devices to look for a match */ list_for_each_entry(p, &tty_drivers, tty_drivers) { - if (strncmp(name, p->name, len) != 0) - continue; + str = name + strlen(p->name); + tty_line = simple_strtoul(str, &str, 10); if (*str == ',') str++; if (*str == '\0') |