of/address: sparc: Declare of_address_to_resource() as an extern function for sparc...
authorAndreas Larsson <andreas@gaisler.com>
Tue, 6 Nov 2012 00:12:03 +0000 (00:12 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 10 Nov 2012 00:30:50 +0000 (16:30 -0800)
commit0bce04be442cf4d6e4ba9dac2f0a4c5ee88af5c5
tree97c771cc2cafbad347b0ef71eafd957ca06357a9
parent20424d85f8a07090fd32c6fad343f91b63c730b0
of/address: sparc: Declare of_address_to_resource() as an extern function for sparc again

This bug-fix makes sure that of_address_to_resource is defined extern for sparc
so that the sparc-specific implementation of of_address_to_resource() is once
again used when including include/linux/of_address.h in a sparc context. A
number of drivers in mainline relies on this function working for sparc.

The bug was introduced in a850a7554442f08d3e910c6eeb4ee216868dda1e, "of/address:
add empty static inlines for !CONFIG_OF". Contrary to that commit title, the
static inlines are added for !CONFIG_OF_ADDRESS, and CONFIG_OF_ADDRESS is never
defined for sparc. This is good behavior for the other functions in
include/linux/of_address.h, as the extern functions defined in
drivers/of/address.c only gets linked when OF_ADDRESS is configured. However,
for of_address_to_resource there exists a sparc-specific implementation in
arch/sparc/arch/sparc/kernel/of_device_common.c

Solution suggested by: Sam Ravnborg <sam@ravnborg.org>

Signed-off-by: Andreas Larsson <andreas@gaisler.com>
Acked-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/include/asm/prom.h
include/linux/of_address.h