Skip to content

Commit

Permalink
um: switch line_remove() to setup_one_line()
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Richard Weinberger <richard@nod.at>
  • Loading branch information
Al Viro authored and Richard Weinberger committed Mar 24, 2012
1 parent 8998af2 commit da645f3
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions arch/um/drivers/line.c
Original file line number Diff line number Diff line change
Expand Up @@ -640,14 +640,11 @@ int line_id(char **str, int *start_out, int *end_out)

int line_remove(struct line *lines, unsigned int num, int n, char **error_out)
{
int err;
char config[sizeof("conxxxx=none\0")];

sprintf(config, "%d=none", n);
err = line_setup(lines, num, config, error_out);
if (err >= 0)
err = 0;
return err;
if (n >= num) {
*error_out = "Device number out of range";
return -EINVAL;
}
return setup_one_line(lines, n, "none", INIT_ONE, error_out);
}

struct tty_driver *register_lines(struct line_driver *line_driver,
Expand Down

0 comments on commit da645f3

Please sign in to comment.