__initcall macros and C token pasting

From: Jon Smirl
Date: Sat Sep 25 2004 - 13:07:29 EST


#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@xxxxxxxxx
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/