aboutsummaryrefslogtreecommitdiff
path: root/net/lapb/lapb_out.c
diff options
context:
space:
mode:
authorIan Abbott <abbotti@mev.co.uk>2015-11-18 17:55:04 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-12-21 15:58:54 -0800
commit06181de14ff09b274b699ee2dd39fe5e37efb419 (patch)
tree66eba4cfa2f1d2b7874a5a3dc084b0657a5aade3 /net/lapb/lapb_out.c
parentb4717ff608c180115ace1d307e7f452e114ca29c (diff)
staging: comedi: rearrange comedi_write() code
Rearrange the code in `comedi_write()` to reduce the amount of indentation. The code never reiterates the `while` loop once `count` has become non-zero, so we can check that in the `while` condition to save an indentation level. (Note that `nbytes` has been checked to be non-zero before entering the loop, so we can remove that check.) Move the code that makes the subdevice "become non-busy" outside the `while` loop, using a new flag variable `become_nonbusy` to decide whether it needs to be done. This simplifies the wait queue handling so there is a single place where the task is removed from the wait queue, and we can remove the `on_wait_queue` flag variable. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/lapb/lapb_out.c')
0 files changed, 0 insertions, 0 deletions