diff options
author | Sergio Paracuellos <sergio.paracuellos@gmail.com> | 2020-11-23 10:36:32 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-11-26 09:12:18 +0100 |
commit | d7dcee38cbea6931a700bd42435bf403afee826a (patch) | |
tree | 5224cb450d263b93e5e1a75194823b9d91b5cf83 /drivers/staging/mt7621-pci | |
parent | 0438fb09828eda30076a3e14b62f17aed95c364b (diff) |
staging: mt7621-pci: remove 'offset' with mem and io resource sizes
Offset contains resources size for both io and memory resources.
Those fields are directly initialized to zero and set up using
'pci_add_resource_offset' function. Instead of doing that remove
them and use directly function 'pci_add_resource' where zero is
passed directly to its internal call to 'pci_add_resource_offset'.
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Link: https://lore.kernel.org/r/20201123093637.8300-3-sergio.paracuellos@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/mt7621-pci')
-rw-r--r-- | drivers/staging/mt7621-pci/pci-mt7621.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/drivers/staging/mt7621-pci/pci-mt7621.c index 3e8dddf5ec79..219b35937285 100644 --- a/drivers/staging/mt7621-pci/pci-mt7621.c +++ b/drivers/staging/mt7621-pci/pci-mt7621.c @@ -117,7 +117,6 @@ struct mt7621_pcie_port { * @base: IO Mapped Register Base * @io: IO resource * @mem: non-prefetchable memory resource - * @offset: IO / Memory offset * @dev: Pointer to PCIe device * @io_map_base: virtual memory base address for io * @ports: pointer to PCIe port information @@ -130,10 +129,6 @@ struct mt7621_pcie { struct device *dev; struct resource io; struct resource mem; - struct { - resource_size_t mem; - resource_size_t io; - } offset; unsigned long io_map_base; struct list_head ports; int irq_map[PCIE_P2P_CNT]; @@ -312,11 +307,9 @@ static int mt7621_pci_parse_request_of_pci_ranges(struct mt7621_pcie *pcie) of_pci_range_to_resource(&range, node, &pcie->io); pcie->io.start = range.cpu_addr; pcie->io.end = range.cpu_addr + range.size - 1; - pcie->offset.io = 0x00000000UL; break; case IORESOURCE_MEM: of_pci_range_to_resource(&range, node, &pcie->mem); - pcie->offset.mem = 0x00000000UL; break; } } @@ -644,8 +637,8 @@ static int mt7621_pcie_init_virtual_bridges(struct mt7621_pcie *pcie) static void mt7621_pcie_add_resources(struct mt7621_pcie *pcie, struct list_head *res) { - pci_add_resource_offset(res, &pcie->io, pcie->offset.io); - pci_add_resource_offset(res, &pcie->mem, pcie->offset.mem); + pci_add_resource(res, &pcie->io); + pci_add_resource(res, &pcie->mem); } static int mt7621_pcie_register_host(struct pci_host_bridge *host, |