Fix sparc64 device register probing
commit46bda9eca2e14448ec85272259fb7d4aa5ac32b8
authorDavid Miller <davem@davemloft.net>
Thu, 8 Mar 2007 02:47:54 +0000 (7 18:47 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 13 Mar 2007 18:26:47 +0000 (13 11:26 -0700)
tree40351c7e334c8c3b603d7ea5745bdf60f9b8987e
parent7644d8b697ad46a666be8d254e4f89fd6a4b5b3e
Fix sparc64 device register probing

[SPARC]: Fix bus handling in build_device_resources().

We mistakedly modify 'bus' in the innermost loop.  What
should happen is that at each register index iteration,
we start with the same 'bus'.

So preserve it's value at the top level, and use a loop
local variable 'dbus' for iteration.

This bug causes registers other than the first to be
decoded improperly.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/sparc/kernel/of_device.c
arch/sparc64/kernel/of_device.c