From f2c4583a381c584c8c025048071a120cc9562ded Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Thu, 15 Dec 2005 15:00:57 +1100 Subject: [PATCH] powerpc: pci_address_to_pio fix This fixes pci_address_to_pio() to return an unsigned long (to be safe) and fixes a bug in the implementation that caused it to return a bogus IO port number Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras --- include/asm-ppc/pci-bridge.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/asm-ppc') diff --git a/include/asm-ppc/pci-bridge.h b/include/asm-ppc/pci-bridge.h index 95672ddfe528..9d5230689b31 100644 --- a/include/asm-ppc/pci-bridge.h +++ b/include/asm-ppc/pci-bridge.h @@ -138,11 +138,11 @@ static inline unsigned char bridge_swizzle(unsigned char pin, extern int pciauto_bus_scan(struct pci_controller *, int); #ifdef CONFIG_PCI -extern unsigned int pci_address_to_pio(phys_addr_t address); +extern unsigned long pci_address_to_pio(phys_addr_t address); #else -static inline unsigned int pci_address_to_pio(phys_addr_t address) +static inline unsigned long pci_address_to_pio(phys_addr_t address) { - return (unsigned int)-1; + return (unsigned long)-1; } #endif -- cgit v1.2.1