Commit dde4196e authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: rtd520: use pci_ioremap_bar()

Use pci_ioremap_bar() to ioremap the PCI bars used by this driver.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2fb0e849
...@@ -1287,12 +1287,9 @@ static int rtd_auto_attach(struct comedi_device *dev, ...@@ -1287,12 +1287,9 @@ static int rtd_auto_attach(struct comedi_device *dev,
if (ret) if (ret)
return ret; return ret;
devpriv->las0 = ioremap_nocache(pci_resource_start(pcidev, 2), devpriv->las0 = pci_ioremap_bar(pcidev, 2);
pci_resource_len(pcidev, 2)); devpriv->las1 = pci_ioremap_bar(pcidev, 3);
devpriv->las1 = ioremap_nocache(pci_resource_start(pcidev, 3), devpriv->lcfg = pci_ioremap_bar(pcidev, 0);
pci_resource_len(pcidev, 3));
devpriv->lcfg = ioremap_nocache(pci_resource_start(pcidev, 0),
pci_resource_len(pcidev, 0));
if (!devpriv->las0 || !devpriv->las1 || !devpriv->lcfg) if (!devpriv->las0 || !devpriv->las1 || !devpriv->lcfg)
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment