diff options
author | Paul Mackerras <paulus@samba.org> | 2006-04-22 20:42:04 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-04-22 20:42:04 -0400 |
commit | d0e15bed84db7a9b0ea85d2ad9707b5e6d2e38da (patch) | |
tree | b27ecd617ae9113d083514b10ec27a649fd22c78 /include/asm-powerpc | |
parent | 7c8ce71b092425f1e938285cab2a679c09444d9b (diff) |
powerpc: Fix define_machine so machine_is() works from modules
machine_is() was always returning 0 when used in a module, because
we weren't exporting the machine definitions. This was why sound
wasn't working on powermacs when CONFIG_SND_POWERMAC=m. Original
fix from Ben Herrenschmidt, further fixed by me.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-powerpc')
-rw-r--r-- | include/asm-powerpc/machdep.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/asm-powerpc/machdep.h b/include/asm-powerpc/machdep.h index 5ed847680754..0f9254c18914 100644 --- a/include/asm-powerpc/machdep.h +++ b/include/asm-powerpc/machdep.h | |||
@@ -253,7 +253,11 @@ extern struct machdep_calls *machine_id; | |||
253 | 253 | ||
254 | #define __machine_desc __attribute__ ((__section__ (".machine.desc"))) | 254 | #define __machine_desc __attribute__ ((__section__ (".machine.desc"))) |
255 | 255 | ||
256 | #define define_machine(name) struct machdep_calls mach_##name __machine_desc = | 256 | #define define_machine(name) \ |
257 | extern struct machdep_calls mach_##name; \ | ||
258 | EXPORT_SYMBOL(mach_##name); \ | ||
259 | struct machdep_calls mach_##name __machine_desc = | ||
260 | |||
257 | #define machine_is(name) \ | 261 | #define machine_is(name) \ |
258 | ({ \ | 262 | ({ \ |
259 | extern struct machdep_calls mach_##name \ | 263 | extern struct machdep_calls mach_##name \ |