From: H Hartley Sweeten Date: Wed, 9 Jan 2013 20:26:26 +0000 (-0700) Subject: staging: comedi: comedi_buf: factor out new buffer allocation code X-Git-Tag: v3.9-rc1~127^2~440 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6bd764573179f3f7c165b1ee093aff2d7ad3c59e;p=pandora-kernel.git 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 Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed