From: Emil Medve Date: Thu, 22 May 2008 22:40:16 +0000 (+1000) Subject: powerpc: Add the PC speaker only when requested X-Git-Tag: v2.6.27-rc1~1058^2~167 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d33b78df142177d51de0ed0c4f3e57c8b5e8ff89;p=linux-2.6 powerpc: Add the PC speaker only when requested This eliminates this minor boot-time debugging error message: [ 1.316451] calling add_pcspkr+0x0/0x84 [ 1.316478] initcall add_pcspkr+0x0/0x84 returned -19 after 0 msecs Signed-off-by: Emil Medve Signed-off-by: Paul Mackerras --- diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index db540eab09..61a3f41320 100644 --- a/arch/powerpc/kernel/setup-common.c +++ b/arch/powerpc/kernel/setup-common.c @@ -500,6 +500,7 @@ void __init smp_setup_cpu_sibling_map(void) } #endif /* CONFIG_SMP */ +#ifdef CONFIG_PCSPKR_PLATFORM static __init int add_pcspkr(void) { struct device_node *np; @@ -522,6 +523,7 @@ static __init int add_pcspkr(void) return ret; } device_initcall(add_pcspkr); +#endif /* CONFIG_PCSPKR_PLATFORM */ void probe_machine(void) {