summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-dw-pci.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2014-08-29 11:41:40 +0200
committerMark Brown <broonie@kernel.org>2014-09-01 12:29:02 +0200
commitceb86de9d6dae58b66ae10e7533ff2d3d8c7bbae (patch)
treef6b655aeb8cb3663704ba963741b39fd8cb010a5 /drivers/spi/spi-dw-pci.c
parentspi: dw-pci: move info message at the end of probe (diff)
downloadlinux-ceb86de9d6dae58b66ae10e7533ff2d3d8c7bbae.tar.xz
linux-ceb86de9d6dae58b66ae10e7533ff2d3d8c7bbae.zip
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: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-dw-pci.c')
-rw-r--r--drivers/spi/spi-dw-pci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/spi-dw-pci.c b/drivers/spi/spi-dw-pci.c
index 0ac86a58dd27..e203d8fc0ce6 100644
--- a/drivers/spi/spi-dw-pci.c
+++ b/drivers/spi/spi-dw-pci.c
@@ -55,7 +55,7 @@ static int spi_pci_probe(struct pci_dev *pdev,
/* Get basic io resource and map it */
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)
return ret;