staging: comedi: amplc_dio200_pci: use pci_ioremap_bar()
authorIan Abbott <abbotti@mev.co.uk>
Fri, 12 Apr 2013 12:00:49 +0000 (13:00 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 12 Apr 2013 22:12:42 +0000 (15:12 -0700)
commitc400c1e1c42d4acff3e1dc0dade184f01b45e8a2
treed82b060a79046cb271a1581c24544534365e9f08
parentfed9fd2cc6ac2b01f928bef3ce62a9d8058f514d
staging: comedi: amplc_dio200_pci: use pci_ioremap_bar()

Use `pci_ioremap_bar()` to ioremap the PCI memory resources.  That
function just takes the PCI device and a bar index.  It also has some
additional sanity checks to make sure the bar is actually a memory
resource.

Eliminate some local variables from `dio200_pcie_board_setup()` and
`dio200_pci_auto_attach()` that were used to hold the results of
`pci_resource_len()` and `pci_resource_start()` that were only used
once.  Also eliminate the check that the bar is a memory resource in
`dio200_pcie_board_setup()` as `pci_ioremap_bar()` will do that for us.

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