summaryrefslogtreecommitdiff
path: root/drivers/staging/mt7621-pci
diff options
context:
space:
mode:
authorSergio Paracuellos <sergio.paracuellos@gmail.com>2021-05-05 14:17:30 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-05-10 11:19:40 +0200
commit726eb31628d484b86ecd17eb6404be2f6b7b420a (patch)
tree9f370342d20648e81330ad5b1dae13d50ebe558e /drivers/staging/mt7621-pci
parentc92454a42b955a25a18a655b9ebeb81c2579f465 (diff)
staging: mt7621-pci: group io resource assignments all together
To improve a bit readabily group all the IO resource related assignments together. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Link: https://lore.kernel.org/r/20210505121736.6459-5-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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/drivers/staging/mt7621-pci/pci-mt7621.c
index 1b3d6ba0b85a..296f50fb3571 100644
--- a/drivers/staging/mt7621-pci/pci-mt7621.c
+++ b/drivers/staging/mt7621-pci/pci-mt7621.c
@@ -284,17 +284,17 @@ static int mt7621_pci_parse_request_of_pci_ranges(struct pci_host_bridge *host)
* well for MIPS platforms that don't define PCI_IOBASE, so set the IO
* resource manually instead.
*/
- pcie->io.name = node->full_name;
- pcie->io.parent = pcie->io.child = pcie->io.sibling = NULL;
for_each_of_pci_range(&parser, &range) {
switch (range.flags & IORESOURCE_TYPE_BITS) {
case IORESOURCE_IO:
pcie->io_map_base =
(unsigned long)ioremap(range.cpu_addr,
range.size);
+ pcie->io.name = node->full_name;
pcie->io.flags = range.flags;
pcie->io.start = range.cpu_addr;
pcie->io.end = range.cpu_addr + range.size - 1;
+ pcie->io.parent = pcie->io.child = pcie->io.sibling = NULL;
set_io_port_base(pcie->io_map_base);
break;
}