Commit ceb86de9 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Mark Brown

spi: dw-pci: apply pci_bar and re-use pci_name

Nevertheless pci_bar is 0 let's explicitly use it when map IO regions. While
here, use pci_name instead of dev_name.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent fcf0af44
...@@ -55,7 +55,7 @@ static int spi_pci_probe(struct pci_dev *pdev, ...@@ -55,7 +55,7 @@ static int spi_pci_probe(struct pci_dev *pdev,
/* Get basic io resource and map it */ /* Get basic io resource and map it */
dws->paddr = pci_resource_start(pdev, pci_bar); dws->paddr = pci_resource_start(pdev, pci_bar);
ret = pcim_iomap_regions(pdev, 1, dev_name(&pdev->dev)); ret = pcim_iomap_regions(pdev, 1 << pci_bar, pci_name(pdev));
if (ret) if (ret)
return ret; return ret;
......
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