staging: comedi: comedi_fops: cleanup comedi_poll()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 19 Dec 2012 22:39:44 +0000 (15:39 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 Jan 2013 22:25:47 +0000 (14:25 -0800)
commitca081b1d7e2f355b54a6fa1e63f84b8ceb9597de
tree78e5f3869aa71bac778c8f28e7ccaecfb9953b61
parent0e700923bf63b4afb7bb213f140d5a6e28c32aa6
staging: comedi: comedi_fops: cleanup comedi_poll()

Consolidate the local variables 'read_subdev' and 'write_subdev' into a
single local variable 's'.

Use comedi_dev_from_minor() to simplify the return -ENODEV tests.

Use a goto in the !dev->attached test so that the mutex_unlock() call
is in a common place.

Cleanup the formating of the || in the read and write subdevice poll
code.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/comedi_fops.c