n_hdlc: cleanup messages during registration

1) n_hdlc prints two lines during registration. Squeeze it into one.
2) prefix the error message with "N_HDLC: ", so that it's clear which
   ldisc failed to register.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20200219084118.26491-5-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Jiri Slaby 2020-02-19 09:40:59 +01:00 committed by Greg Kroah-Hartman
parent aebe5fc3b5
commit cda3756ca5

View File

@ -899,13 +899,13 @@ static int __init n_hdlc_init(void)
else if (maxframe > 65535)
maxframe = 65535;
pr_info("HDLC line discipline maxframe=%d\n", maxframe);
status = tty_register_ldisc(N_HDLC, &n_hdlc_ldisc);
if (!status)
pr_info("N_HDLC line discipline registered.\n");
pr_info("N_HDLC line discipline registered with maxframe=%d\n",
maxframe);
else
pr_err("error registering line discipline: %d\n", status);
pr_err("N_HDLC: error registering line discipline: %d\n",
status);
return status;