staging: comedi: rtd520: use pci_ioremap_bar()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 26 Mar 2013 21:58:28 +0000 (14:58 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Mar 2013 23:16:21 +0000 (16:16 -0700)
Use pci_ioremap_bar() to ioremap the PCI bars used by this driver.

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

index c5ef79e1c5a41dd499dd52e8c59c43f5563aec86..f98ec1467bdd7021387f1830c9b6c12ed49290a0 100644 (file)
@@ -1287,12 +1287,9 @@ static int rtd_auto_attach(struct comedi_device *dev,
        if (ret)
                return ret;
 
-       devpriv->las0 = ioremap_nocache(pci_resource_start(pcidev, 2),
-                                       pci_resource_len(pcidev, 2));
-       devpriv->las1 = ioremap_nocache(pci_resource_start(pcidev, 3),
-                                       pci_resource_len(pcidev, 3));
-       devpriv->lcfg = ioremap_nocache(pci_resource_start(pcidev, 0),
-                                       pci_resource_len(pcidev, 0));
+       devpriv->las0 = pci_ioremap_bar(pcidev, 2);
+       devpriv->las1 = pci_ioremap_bar(pcidev, 3);
+       devpriv->lcfg = pci_ioremap_bar(pcidev, 0);
        if (!devpriv->las0 || !devpriv->las1 || !devpriv->lcfg)
                return -ENOMEM;