staging: comedi: comedi_fops: cleanup comedi_mmap()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 19 Dec 2012 22:45:12 +0000 (15:45 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 Jan 2013 22:25:49 +0000 (14:25 -0800)
commita52840a98bbb50a7ed881b6cc361957c58c2731d
tree4ee4238d64c59804f55e46f7f292fdc8503a877c
parent401d99de5c0b70f7d64a410ed01d19032698656c
staging: comedi: comedi_fops: cleanup comedi_mmap()

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

Change the (foo == NULL) tests to simply (!foo).

Use a local variable to hold a pointer to the async->buf_page_list[]
when doing the remap_pfn_range(). This cleans up the ugly line breaks
for the page_to_pfn(virt_to_page(...) operation.

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