[PATCH] powerpc: Fix build of 4xx simple platforms without CONFIG_PCI

Michael Ellerman michael at ellerman.id.au
Mon Dec 8 16:32:09 EST 2008


On Mon, 2008-12-08 at 15:53 +1100, Benjamin Herrenschmidt wrote:
> The global ppc_pci_flags is not defined when CONFIG_PCI is not
> set, causing a link error
> 
> Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
> ---
> 
>  arch/powerpc/platforms/40x/ppc40x_simple.c |    2 ++
>  arch/powerpc/platforms/44x/ppc44x_simple.c |    2 ++
>  2 files changed, 4 insertions(+)
> 
> --- linux-work.orig/arch/powerpc/platforms/40x/ppc40x_simple.c	2008-12-08 15:51:49.000000000 +1100
> +++ linux-work/arch/powerpc/platforms/40x/ppc40x_simple.c	2008-12-08 15:51:52.000000000 +1100
> @@ -61,7 +61,9 @@ static int __init ppc40x_probe(void)
>  
>  	for (i = 0; i < ARRAY_SIZE(board); i++) {
>  		if (of_flat_dt_is_compatible(root, board[i])) {
> +#ifdef CONFIG_PCI
>  			ppc_pci_flags = PPC_PCI_REASSIGN_ALL_RSRC;
> +#endif

No! #ifdefs! in C code!

To the tune of you-know-what.

Looks like we need an accessor we can replace with an empty version in
the !PCI case.

cheers

-- 
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20081208/38bbb5d9/attachment.pgp>


More information about the Linuxppc-dev mailing list