arch_initcall time

Sean MacLennan smaclennan at pikatech.com
Tue Feb 19 05:28:29 EST 2008


I need to call i2c_register_board_info for the new i2c style ad7414 
driver. This needs to be called at arch initcall time. Currently I just 
do this:

static int __init warp_arch_init(void)
{
	i2c_register_board_info(0, warp_i2c_info, ARRAY_SIZE(warp_i2c_info));
	return 0;
}
arch_initcall(warp_arch_init);


It works, but is there a "better" place to put this? None of the other 
powerpc platforms make this call and I want to get it right, so that 
others don't blindly follow my example ;)

I kept the name vague rather than specific in case more drivers need to 
be setup this way in the future.

Cheers,
   Sean



More information about the Linuxppc-dev mailing list