Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 146259
b: refs/heads/master
c: 5f0878a
h: refs/heads/master
i:
  146257: 5be6389
  146255: bdb620c
v: v3
  • Loading branch information
Alan Cox authored and Linus Torvalds committed Jun 11, 2009
1 parent 81012b7 commit b01f687
Show file tree
Hide file tree
Showing 2 changed files with 8 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: 620df3c0a5b70656c4de6049825de214f108218e
refs/heads/master: 5f0878acba7db24323f5ba4055ec9a96895bb150
13 changes: 7 additions & 6 deletions trunk/drivers/char/tty_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 == ',')
Expand All @@ -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;
Expand Down

0 comments on commit b01f687

Please sign in to comment.