diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2005-12-15 04:00:57 (GMT) |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-01-09 04:05:56 (GMT) |
commit | f2c4583a381c584c8c025048071a120cc9562ded (patch) | |
tree | 53d6a1d30a3be72f021738c97853cff55a800070 /arch/powerpc/kernel/prom_parse.c | |
parent | a04c8780fd234aeeba5e87f7e37beffd05ef21ae (diff) | |
download | linux-f2c4583a381c584c8c025048071a120cc9562ded.tar.xz |
[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 <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/prom_parse.c')
-rw-r--r-- | arch/powerpc/kernel/prom_parse.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/prom_parse.c b/arch/powerpc/kernel/prom_parse.c index 5b76427..309ae1d 100644 --- a/arch/powerpc/kernel/prom_parse.c +++ b/arch/powerpc/kernel/prom_parse.c @@ -503,9 +503,9 @@ static int __of_address_to_resource(struct device_node *dev, u32 *addrp, return -EINVAL; memset(r, 0, sizeof(struct resource)); if (flags & IORESOURCE_IO) { - unsigned int port; + unsigned long port; port = pci_address_to_pio(taddr); - if (port == (unsigned int)-1) + if (port == (unsigned long)-1) return -EINVAL; r->start = port; r->end = port + size - 1; |