From: Andy Shevchenko Date: Fri, 29 Aug 2014 09:41:40 +0000 (+0300) Subject: spi: dw-pci: apply pci_bar and re-use pci_name X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ceb86de9d6dae58b66ae10e7533ff2d3d8c7bbae;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git 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 Signed-off-by: Mark Brown --- 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;