-
David Brownell authored
Patch from David Brownell This adds a mechanism for a per-machine initcall, one that's guaranteed to run only to initialize a kernel running on that specific hardware. It's not strictly necessary, but it does eliminate the need for certain boilerplate in machine-specific support, to ensure it's only running on the right hardware: /* in arch/arm/mach-xxx/MYMACHINE.c */ ... static int __init init_MYMACHINE(void) { if (!mach_is_MYMACHINE()) // often forgotten!! return -EINVAL; ... declare and customize platform devices ... return 0; } arch_initcall(init_MYMACHINE); An init_MYMACHINE() call still exists, but it'd be declared as part of the machine definition.
f64009a7