Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mmc: dw_mmc-pci: Use BAR_2 and pcim_iomap_region()

PCIe endpoint framework defines standard BAR enum for EP drivers
to use, so remove PCI_BAR_NO here.

Then, pcim_iomap_regions has been deprecated for a long time, replace
it with pcim_iomap_region();

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

authored by

Shawn Lin and committed by
Ulf Hansson
765f4836 c6969a13

+4 -6
+4 -6
drivers/mmc/host/dw_mmc-pci.c
··· 10 10 #include <linux/io.h> 11 11 #include <linux/irq.h> 12 12 #include <linux/pci.h> 13 + #include <linux/pci-epf.h> 13 14 #include <linux/pm_runtime.h> 14 15 #include <linux/slab.h> 15 16 #include <linux/mmc/host.h> 16 17 #include <linux/mmc/mmc.h> 17 18 #include "dw_mmc.h" 18 19 19 - #define PCI_BAR_NO 2 20 20 #define SYNOPSYS_DW_MCI_VENDOR_ID 0x700 21 21 #define SYNOPSYS_DW_MCI_DEVICE_ID 0x1107 22 22 /* Defining the Capabilities */ ··· 49 49 host->bus_hz = 33 * 1000 * 1000; 50 50 host->drv_data = &pci_drv_data; 51 51 52 - ret = pcim_iomap_regions(pdev, 1 << PCI_BAR_NO, pci_name(pdev)); 53 - if (ret) 54 - return ret; 55 - 56 - host->regs = pcim_iomap_table(pdev)[PCI_BAR_NO]; 52 + host->regs = pcim_iomap_region(pdev, BAR_2, pci_name(pdev)); 53 + if (IS_ERR(host->regs)) 54 + return PTR_ERR(host->regs); 57 55 58 56 pci_set_master(pdev); 59 57