summaryrefslogtreecommitdiffstats
path: root/drivers/staging/comedi/comedi_fops.c
diff options
context:
space:
mode:
authorH Hartley Sweeten2013-01-09 21:26:26 +0100
committerGreg Kroah-Hartman2013-01-18 01:53:58 +0100
commit6bd764573179f3f7c165b1ee093aff2d7ad3c59e (patch)
tree20760eb69560c6ed39338908ae2839bdcb71c720 /drivers/staging/comedi/comedi_fops.c
parentstaging: comedi: comedi_buf: factor out common code to free the async buffer (diff)
downloadkernel-qcow2-linux-6bd764573179f3f7c165b1ee093aff2d7ad3c59e.tar.gz
kernel-qcow2-linux-6bd764573179f3f7c165b1ee093aff2d7ad3c59e.tar.xz
kernel-qcow2-linux-6bd764573179f3f7c165b1ee093aff2d7ad3c59e.zip
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: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi/comedi_fops.c')
0 files changed, 0 insertions, 0 deletions