Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 6bd76457 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman
Browse files

staging: comedi: comedi_buf: factor out new buffer allocation code



The function comedi_buf_alloc() first frees any allocated buffer then,
optionally, allocates a new buffer.

Factor out the new buffer allocation code to a new function. This
allows reducing the indent level and makes the code a bit cleaner.

Also, cleanup to factored out code to make it a bit more concise.
Use a local variable for the current comedi_buf_page being allocated.
This cleans up the ugly line breaks used to keep the lines < 80 chars.

Move the #ifdef'ery for the page protection determination out of the
vmap() call.

Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 718c4d68
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment