]> git.hungrycats.org Git - linux/commitdiff
[PATCH] ppc32: Fix c&p error in arch/ppc/syslib/indirect_pci.c
authorAndrew Morton <akpm@osdl.org>
Tue, 16 Mar 2004 23:07:00 +0000 (15:07 -0800)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Tue, 16 Mar 2004 23:07:00 +0000 (15:07 -0800)
From: Tom Rini <trini@kernel.crashing.org>

Fix a cut & paste error in forward porting from 2.4, we don't reference
dev->bus or dev->devfn, both are passed as arguments.

arch/ppc/syslib/indirect_pci.c

index 68a8b1ad289553200f38221f6d859887b674592b..4bc90eb2c0382e024a004d55e996290d8ffe7518 100644 (file)
@@ -44,8 +44,8 @@ indirect_read_config(struct pci_bus *bus, unsigned int devfn, int offset,
                        cfg_type = 1;
 
        PCI_CFG_OUT(hose->cfg_addr,                                      
-                (0x80000000 | ((dev->bus->number - hose->bus_offset) << 16) 
-                 | (dev->devfn << 8) | ((offset & 0xfc) | cfg_type))); 
+                (0x80000000 | ((bus->number - hose->bus_offset) << 16)
+                 | (devfn << 8) | ((offset & 0xfc) | cfg_type)));
 
        /*
         * Note: the caller has already checked that offset is
@@ -83,8 +83,8 @@ indirect_write_config(struct pci_bus *bus, unsigned int devfn, int offset,
                        cfg_type = 1;
 
        PCI_CFG_OUT(hose->cfg_addr,                                      
-                (0x80000000 | ((dev->bus->number - hose->bus_offset) << 16) 
-                 | (dev->devfn << 8) | ((offset & 0xfc) | cfg_type))); 
+                (0x80000000 | ((bus->number - hose->bus_offset) << 16)
+                 | (devfn << 8) | ((offset & 0xfc) | cfg_type)));
 
        /*
         * Note: the caller has already checked that offset is