__initcall macros and C token pasting

Jon Smirl
2004-09-25T17:57:39Z

#define DRM(x) r128_##x
module_init( DRM(init) );

#define __define_initcall(level,fn) \
static initcall_t __initcall_##fn __attribute_used__ \
__attribute__((__section__(".initcall" level ".init"))) = fn

This gives the error:
{standard input}: Assembler messages:
{standard input}:104: Error: junk at end of line, first unrecognized
character is `('

I believe this is because the C macro is not being expanded in the
assembler context of the section with the fn assignment.

Any ideas on how to fix this?

--
Jon Smirl
jonsmirl@gmail.com