aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r--arch/powerpc/platforms/fsl_uli1575.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/powerpc/platforms/fsl_uli1575.c b/arch/powerpc/platforms/fsl_uli1575.c
index fd23a1d4b39d..8b0c2082a783 100644
--- a/arch/powerpc/platforms/fsl_uli1575.c
+++ b/arch/powerpc/platforms/fsl_uli1575.c
@@ -222,6 +222,7 @@ static void __devinit quirk_final_uli5249(struct pci_dev *dev)
222 int i; 222 int i;
223 u8 *dummy; 223 u8 *dummy;
224 struct pci_bus *bus = dev->bus; 224 struct pci_bus *bus = dev->bus;
225 struct resource *res;
225 resource_size_t end = 0; 226 resource_size_t end = 0;
226 227
227 for (i = PCI_BRIDGE_RESOURCES; i < PCI_BRIDGE_RESOURCES+3; i++) { 228 for (i = PCI_BRIDGE_RESOURCES; i < PCI_BRIDGE_RESOURCES+3; i++) {
@@ -230,13 +231,12 @@ static void __devinit quirk_final_uli5249(struct pci_dev *dev)
230 end = pci_resource_end(dev, i); 231 end = pci_resource_end(dev, i);
231 } 232 }
232 233
233 for (i = 0; i < PCI_BUS_NUM_RESOURCES; i++) { 234 pci_bus_for_each_resource(bus, res, i) {
234 if ((bus->resource[i]) && 235 if (res && res->flags & IORESOURCE_MEM) {
235 (bus->resource[i]->flags & IORESOURCE_MEM)) { 236 if (res->end == end)
236 if (bus->resource[i]->end == end) 237 dummy = ioremap(res->start, 0x4);
237 dummy = ioremap(bus->resource[i]->start, 0x4);
238 else 238 else
239 dummy = ioremap(bus->resource[i]->end - 3, 0x4); 239 dummy = ioremap(res->end - 3, 0x4);
240 if (dummy) { 240 if (dummy) {
241 in_8(dummy); 241 in_8(dummy);
242 iounmap(dummy); 242 iounmap(dummy);