n_hdlc: add helper for buffers allocation
authorJiri Slaby <jslaby@suse.cz>
Wed, 19 Feb 2020 08:41:09 +0000 (09:41 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Feb 2020 09:24:33 +0000 (10:24 +0100)
commit740708abbba281480f2986418c8acf2b540f0e98
tree6f9ac5292a651c4ac2055d49f360f4775e6e64bd
parent844cc5f9e530da7502b0de69f0268b1fb0dd7ce3
n_hdlc: add helper for buffers allocation

Given both rx and tx allocations do the same, add a new helper
(n_hdlc_alloc_buf) and use it for both of them. This cleans up
n_hdlc_alloc slightly.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20200219084118.26491-15-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/n_hdlc.c