staticint __init s3c_arch_init(void) { int ret;
…… /* 这里board指针指向在mach-smdk2410.c里的定义的smdk2410_board,里面包含了预先定义的I2C Platform_device等. */ if(board !=NULL){ struct platform_device **ptr = board->devices; int i;
for(i = 0; i < board->devices_count; i++, ptr++){
ret = platform_device_register(*ptr);//在这里进行注册
if(ret){
printk(KERN_ERR "s3c24xx: failed to add board device %s (%d) @%p\n",(*ptr)->name,
ret,*ptr); } } /* mask any error, we may not need all these board
* devices */
ret = 0; } return ret; }