diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2016-03-03 06:38:29 +0300 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2016-03-12 15:00:29 +0300 |
commit | 53f0a509775dae77dab64d0b858635a70e3d6f4f (patch) | |
tree | cb0462dbb940b2c12b0ffb466484820dd523b383 /arch/mips/pci | |
parent | 240504adaf0798a5ab18fac46ae782d3b004859f (diff) | |
download | linux-53f0a509775dae77dab64d0b858635a70e3d6f4f.tar.xz |
MIPS: Loongson 3: Use temporary struct resource * to avoid repetition
Use a temporary struct resource pointer to avoid needless repetition of
"pdev->resource[PCI_ROM_RESOURCE]". No functional change intended.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'arch/mips/pci')
-rw-r--r-- | arch/mips/pci/fixup-loongson3.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/mips/pci/fixup-loongson3.c b/arch/mips/pci/fixup-loongson3.c index d708ae46d325..b66b1eb15ae8 100644 --- a/arch/mips/pci/fixup-loongson3.c +++ b/arch/mips/pci/fixup-loongson3.c @@ -40,20 +40,20 @@ int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) static void pci_fixup_radeon(struct pci_dev *pdev) { - if (pdev->resource[PCI_ROM_RESOURCE].start) + struct resource *res = &pdev->resource[PCI_ROM_RESOURCE]; + + if (res->start) return; if (!loongson_sysconf.vgabios_addr) return; - pdev->resource[PCI_ROM_RESOURCE].start = - loongson_sysconf.vgabios_addr; - pdev->resource[PCI_ROM_RESOURCE].end = - loongson_sysconf.vgabios_addr + 256*1024 - 1; - pdev->resource[PCI_ROM_RESOURCE].flags |= IORESOURCE_ROM_COPY; + res->start = loongson_sysconf.vgabios_addr; + res->end = res->start + 256*1024 - 1; + res->flags |= IORESOURCE_ROM_COPY; dev_info(&pdev->dev, "BAR %d: assigned %pR for Radeon ROM\n", - PCI_ROM_RESOURCE, &pdev->resource[PCI_ROM_RESOURCE]); + PCI_ROM_RESOURCE, res); } DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_ATI, PCI_ANY_ID, |