staging: comedi: s626: cleanup ioremap()
authorH Hartley Sweeten <hartleys@visionengravers.com>
Mon, 24 Sep 2012 20:23:22 +0000 (13:23 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Sep 2012 16:37:30 +0000 (09:37 -0700)
commit4f6c7bf992bc6f1bbf38b08e9b3c8a21865888f2
tree70b75e10b94a99f92dd82f342dbecc720624f631
parent58f4a8fce1d6f1e42543376c85839576992e6100
staging: comedi: s626: cleanup ioremap()

The local variable 'resourceStart' is only used in the ioremap()
to hold the PCI bar 0 base address. Just use the pci_resource_start()
directly in the ioremap().

Also, instead of assuming the resource size for the ioremap, use
pci_resource_len() to get the actual size.

Remove the kernel noise when the ioremap fails and change the error
code from -ENODEV to -ENOMEM.

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/drivers/s626.c
drivers/staging/comedi/drivers/s626.h