Thread (65 messages) flat view 65 messages, 10 authors, 2011-07-19
STALE5537d

[PATCH 16/17] mach-sa1100: retire custom LED code

From: arnd@arndb.de (Arnd Bergmann)
Date: 2011-07-12 12:52:14

On Tuesday 12 July 2011, Russell King - ARM Linux wrote:
On Tue, Jul 12, 2011 at 08:31:28AM +0800, Bryan Wu wrote:
quoted
I think this is a great idea. what about moving it to include/asm-generic/
I wouldn't want to encourage new architectures to actually use this method
until they grow to need it. For most simple architectures, it's probably
better to have a different method of doing machine specific work.
Except, instead of:

		if (machine_is(mach)) return fn(); \

we'd need:

		if (machine_is_##mach()) return fn(); \
Right. Maybe we can start simple and just do a single definition at fs_initcall level:

#define machine_initcall(mach,level,fn) \
        static int __init __machine_initcall_##mach##_##fn(void) { \
                if (machine_is ## mach()) return fn(); \
                return 0; \
        } \
        fs_initcall(,__machine_initcall_##mach##_##fn);


	Arnd
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help