linux/drivers/staging/comedi
H Hartley Sweeten 6bd7645731 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>
2013-01-17 16:53:58 -08:00
..
drivers Staging: comedi: add a missing break statement 2013-01-17 13:52:37 -08:00
kcomedilib staging: comedi: use comedi_dev_from_minor() 2013-01-07 14:25:46 -08:00
Kconfig staging: comedi: Kconfig: COMEDI_NI_AT_A2150 should select COMEDI_FC 2013-01-07 14:48:24 -08:00
Makefile staging: comedi: separate out comedi_buf_* functions 2013-01-17 16:53:58 -08:00
TODO
comedi.h staging: comedi: deprecate loading firmware with comedi_config 2013-01-17 16:51:46 -08:00
comedi_buf.c staging: comedi: comedi_buf: factor out new buffer allocation code 2013-01-17 16:53:58 -08:00
comedi_compat32.c staging: comedi: Makefile: conditionally compile multi-file core module 2013-01-07 14:51:11 -08:00
comedi_compat32.h
comedi_fops.c staging: comedi: deprecate loading firmware with comedi_config 2013-01-17 16:51:46 -08:00
comedi_internal.h
comedidev.h staging: comedi: deprecate loading firmware with comedi_config 2013-01-17 16:51:46 -08:00
comedilib.h
drivers.c staging: comedi: separate out comedi_buf_* functions 2013-01-17 16:53:58 -08:00
proc.c staging: comedi: Makefile: conditionally compile multi-file core module 2013-01-07 14:51:11 -08:00
range.c