From b01f687d7a3cf6ef153679e45b17db63c3799a94 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Thu, 11 Jun 2009 12:46:41 +0100 Subject: [PATCH] --- yaml --- r: 146259 b: refs/heads/master c: 5f0878acba7db24323f5ba4055ec9a96895bb150 h: refs/heads/master i: 146257: 5be6389710020beb082420a852a614d2ca64c852 146255: bdb620ccae6665a60e466f73473c52c3cc294767 v: v3 --- [refs] | 2 +- trunk/drivers/char/tty_io.c | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index 5e2df2cd0d1a..c0966dc42068 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 620df3c0a5b70656c4de6049825de214f108218e +refs/heads/master: 5f0878acba7db24323f5ba4055ec9a96895bb150 diff --git a/trunk/drivers/char/tty_io.c b/trunk/drivers/char/tty_io.c index 66b99a2049e3..6c817398232e 100644 --- a/trunk/drivers/char/tty_io.c +++ b/trunk/drivers/char/tty_io.c @@ -295,7 +295,7 @@ 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; + char *str, *stp; for (str = name; *str; str++) if ((*str >= '0' && *str <= '9') || *str == ',') @@ -311,13 +311,14 @@ struct tty_driver *tty_find_polling_driver(char *name, int *line) list_for_each_entry(p, &tty_drivers, tty_drivers) { if (strncmp(name, p->name, len) != 0) continue; - if (*str == ',') - str++; - if (*str == '\0') - str = NULL; + stp = str; + if (*stp == ',') + stp++; + if (*stp == '\0') + stp = NULL; if (tty_line >= 0 && tty_line <= p->num && p->ops && - p->ops->poll_init && !p->ops->poll_init(p, tty_line, str)) { + p->ops->poll_init && !p->ops->poll_init(p, tty_line, stp)) { res = tty_driver_kref_get(p); *line = tty_line; break;