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>
#define __machine_desc __attribute__ ((__section__ (".machine.desc")))
-#define define_machine(name) struct machdep_calls mach_##name __machine_desc =
+#define define_machine(name) \
+ extern struct machdep_calls mach_##name; \
+ EXPORT_SYMBOL(mach_##name); \
+ struct machdep_calls mach_##name __machine_desc =
+
#define machine_is(name) \
({ \
extern struct machdep_calls mach_##name \