aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include
diff options
context:
space:
mode:
authorMatthew Leach <matthew@mattleach.net>2012-12-17 18:59:32 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-12-17 20:15:12 -0500
commit7929d407e47fbf843fe1337fd95ed57785ae5e9d (patch)
tree5c94b07b1d60cbf2499ec59f89c61a2113ea753f /arch/powerpc/include
parentfbb97d87802247a7bb32a207a8275372e79e6b88 (diff)
include/linux/init.h: use the stringify operator for the __define_initcall macro
Currently the __define_initcall() macro takes three arguments, fn, id and level. The level argument is exactly the same as the id argument but wrapped in quotes. To overcome this need to specify three arguments to the __define_initcall macro, where one argument is the stringification of another, we can just use the stringification macro instead. Signed-off-by: Matthew Leach <matthew@mattleach.net> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/powerpc/include')
-rw-r--r--arch/powerpc/include/asm/machdep.h36
1 files changed, 18 insertions, 18 deletions
diff --git a/arch/powerpc/include/asm/machdep.h b/arch/powerpc/include/asm/machdep.h
index c4231973edd3..3c82daf8be99 100644
--- a/arch/powerpc/include/asm/machdep.h
+++ b/arch/powerpc/include/asm/machdep.h
@@ -320,28 +320,28 @@ static inline void log_error(char *buf, unsigned int err_type, int fatal)
320 ppc_md.log_error(buf, err_type, fatal); 320 ppc_md.log_error(buf, err_type, fatal);
321} 321}
322 322
323#define __define_machine_initcall(mach,level,fn,id) \ 323#define __define_machine_initcall(mach, fn, id) \
324 static int __init __machine_initcall_##mach##_##fn(void) { \ 324 static int __init __machine_initcall_##mach##_##fn(void) { \
325 if (machine_is(mach)) return fn(); \ 325 if (machine_is(mach)) return fn(); \
326 return 0; \ 326 return 0; \
327 } \ 327 } \
328 __define_initcall(level,__machine_initcall_##mach##_##fn,id); 328 __define_initcall(__machine_initcall_##mach##_##fn, id);
329 329
330#define machine_core_initcall(mach,fn) __define_machine_initcall(mach,"1",fn,1) 330#define machine_core_initcall(mach, fn) __define_machine_initcall(mach, fn, 1)
331#define machine_core_initcall_sync(mach,fn) __define_machine_initcall(mach,"1s",fn,1s) 331#define machine_core_initcall_sync(mach, fn) __define_machine_initcall(mach, fn, 1s)
332#define machine_postcore_initcall(mach,fn) __define_machine_initcall(mach,"2",fn,2) 332#define machine_postcore_initcall(mach, fn) __define_machine_initcall(mach, fn, 2)
333#define machine_postcore_initcall_sync(mach,fn) __define_machine_initcall(mach,"2s",fn,2s) 333#define machine_postcore_initcall_sync(mach, fn) __define_machine_initcall(mach, fn, 2s)
334#define machine_arch_initcall(mach,fn) __define_machine_initcall(mach,"3",fn,3) 334#define machine_arch_initcall(mach, fn) __define_machine_initcall(mach, fn, 3)
335#define machine_arch_initcall_sync(mach,fn) __define_machine_initcall(mach,"3s",fn,3s) 335#define machine_arch_initcall_sync(mach, fn) __define_machine_initcall(mach, fn, 3s)
336#define machine_subsys_initcall(mach,fn) __define_machine_initcall(mach,"4",fn,4) 336#define machine_subsys_initcall(mach, fn) __define_machine_initcall(mach, fn, 4)
337#define machine_subsys_initcall_sync(mach,fn) __define_machine_initcall(mach,"4s",fn,4s) 337#define machine_subsys_initcall_sync(mach, fn) __define_machine_initcall(mach, fn, 4s)
338#define machine_fs_initcall(mach,fn) __define_machine_initcall(mach,"5",fn,5) 338#define machine_fs_initcall(mach, fn) __define_machine_initcall(mach, fn, 5)
339#define machine_fs_initcall_sync(mach,fn) __define_machine_initcall(mach,"5s",fn,5s) 339#define machine_fs_initcall_sync(mach, fn) __define_machine_initcall(mach, fn, 5s)
340#define machine_rootfs_initcall(mach,fn) __define_machine_initcall(mach,"rootfs",fn,rootfs) 340#define machine_rootfs_initcall(mach, fn) __define_machine_initcall(mach, fn, rootfs)
341#define machine_device_initcall(mach,fn) __define_machine_initcall(mach,"6",fn,6) 341#define machine_device_initcall(mach, fn) __define_machine_initcall(mach, fn, 6)
342#define machine_device_initcall_sync(mach,fn) __define_machine_initcall(mach,"6s",fn,6s) 342#define machine_device_initcall_sync(mach, fn) __define_machine_initcall(mach, fn, 6s)
343#define machine_late_initcall(mach,fn) __define_machine_initcall(mach,"7",fn,7) 343#define machine_late_initcall(mach, fn) __define_machine_initcall(mach, fn, 7)
344#define machine_late_initcall_sync(mach,fn) __define_machine_initcall(mach,"7s",fn,7s) 344#define machine_late_initcall_sync(mach, fn) __define_machine_initcall(mach, fn, 7s)
345 345
346#endif /* __KERNEL__ */ 346#endif /* __KERNEL__ */
347#endif /* _ASM_POWERPC_MACHDEP_H */ 347#endif /* _ASM_POWERPC_MACHDEP_H */