Commit da645f3b authored by Al Viro's avatar Al Viro Committed by Richard Weinberger

um: switch line_remove() to setup_one_line()

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent 8998af2b
...@@ -640,14 +640,11 @@ int line_id(char **str, int *start_out, int *end_out) ...@@ -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 line_remove(struct line *lines, unsigned int num, int n, char **error_out)
{ {
int err; if (n >= num) {
char config[sizeof("conxxxx=none\0")]; *error_out = "Device number out of range";
return -EINVAL;
sprintf(config, "%d=none", n); }
err = line_setup(lines, num, config, error_out); return setup_one_line(lines, n, "none", INIT_ONE, error_out);
if (err >= 0)
err = 0;
return err;
} }
struct tty_driver *register_lines(struct line_driver *line_driver, struct tty_driver *register_lines(struct line_driver *line_driver,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment