/* * Function irda_init (void) * * Protocol stack initialisation entry point. * Initialise the various components of the IrDA stack */ int __init irda_init(void) { IRDA_DEBUG(0, "%s()\n", __FUNCTION__); /* Lower layer of the stack */ irlmp_init(); irlap_init(); /* Higher layers of the stack */ iriap_init(); irttp_init(); irsock_init(); /* Add IrDA packet type (Start receiving packets) */ dev_add_pack(&irda_packet_type); /* External APIs */ #ifdef CONFIG_PROC_FS irda_proc_register(); #endif #ifdef CONFIG_SYSCTL irda_sysctl_register(); #endif /* Driver/dongle support */ irda_device_init(); return 0; }
void __init exynos5_universal5420_fpga_init(void) { printk(KERN_ERR "[%s] initialization start!\n", __func__); fpga_config_gpio_table(ARRAY_SIZE(fpga_gpio_table),fpga_gpio_table); #if !defined(USING_SPI_AND_I2C_IN_SAME_LINE) i2c_register_board_info(22, i2c_devs22_emul, ARRAY_SIZE(i2c_devs22_emul)); platform_add_devices(universal5420_fpga_devices, ARRAY_SIZE(universal5420_fpga_devices)); #endif irda_device_init(); };
/* * Function irda_init (void) * * Protocol stack initialisation entry point. * Initialise the various components of the IrDA stack */ static int __init irda_init(void) { int ret = 0; IRDA_DEBUG(0, "%s()\n", __FUNCTION__); /* Lower layer of the stack */ irlmp_init(); irlap_init(); /* Driver/dongle support */ irda_device_init(); /* Higher layers of the stack */ iriap_init(); irttp_init(); ret = irsock_init(); if (ret < 0) goto out_err_1; /* Add IrDA packet type (Start receiving packets) */ dev_add_pack(&irda_packet_type); /* External APIs */ #ifdef CONFIG_PROC_FS irda_proc_register(); #endif #ifdef CONFIG_SYSCTL ret = irda_sysctl_register(); if (ret < 0) goto out_err_2; #endif ret = irda_nl_register(); if (ret < 0) goto out_err_3; return 0; out_err_3: #ifdef CONFIG_SYSCTL irda_sysctl_unregister(); out_err_2: #endif #ifdef CONFIG_PROC_FS irda_proc_unregister(); #endif /* Remove IrDA packet type (stop receiving packets) */ dev_remove_pack(&irda_packet_type); /* Remove higher layers */ irsock_cleanup(); out_err_1: irttp_cleanup(); iriap_cleanup(); /* Remove lower layers */ irda_device_cleanup(); irlap_cleanup(); /* Must be done before irlmp_cleanup()! DB */ /* Remove middle layer */ irlmp_cleanup(); return ret; }
/* * Ok, the machine is now initialized. None of the devices * have been touched yet, but the CPU subsystem is up and * running, and memory and process management works. * * Now we can finally start doing some real work.. */ static void __init do_basic_setup(void) { /* * Tell the world that we're going to be the grim * reaper of innocent orphaned children. * * We don't want people to have to make incorrect * assumptions about where in the task array this * can be found. */ child_reaper = current; #if defined(CONFIG_MTRR) /* Do this after SMP initialization */ /* * We should probably create some architecture-dependent "fixup after * everything is up" style function where this would belong better * than in init/main.c.. */ mtrr_init(); #endif #ifdef CONFIG_SYSCTL sysctl_init(); #endif /* * Ok, at this point all CPU's should be initialized, so * we can start looking into devices.. */ #if defined(CONFIG_ARCH_S390) s390_init_machine_check(); #endif #ifdef CONFIG_ACPI_INTERPRETER acpi_init(); #endif #ifdef CONFIG_PCI pci_init(); #endif #ifdef CONFIG_SBUS sbus_init(); #endif #if defined(CONFIG_PPC) ppc_init(); #endif #ifdef CONFIG_MCA mca_init(); #endif #ifdef CONFIG_ARCH_ACORN ecard_init(); #endif #ifdef CONFIG_ZORRO zorro_init(); #endif #ifdef CONFIG_DIO dio_init(); #endif #ifdef CONFIG_NUBUS nubus_init(); #endif #ifdef CONFIG_ISAPNP isapnp_init(); #endif #ifdef CONFIG_TC tc_init(); #endif /* Networking initialization needs a process context */ sock_init(); start_context_thread(); do_initcalls(); #ifdef CONFIG_IRDA irda_proto_init(); irda_device_init(); /* Must be done after protocol initialization */ #endif #ifdef CONFIG_PCMCIA init_pcmcia_ds(); /* Do this last */ #endif }