static int ModuleInit(void) { InitGpio(); Device1Init(); return (0); }
static int ModuleInit(void) { #ifdef DEBUG printk("%s init started\n",MODULE_NAME); #endif Device1Init(); return (0); }
static int ModuleInit(void) { //#define DEBUG #undef DEBUG #ifdef DEBUG printk("%s Module init started\r\n",MODULE_NAME); #endif //#define DEBUG #undef DEBUG #ifdef DEBUG printk("This is DEFAULT NAME: %s\n\r", longname); #endif //#define DEBUG #undef DEBUG #ifdef DEBUG printk("\n\rThis is the HostStr: %s\n\r", HostStr); #endif strcpy(longname, HostStr); //#define DEBUG #undef DEBUG #ifdef DEBUG printk("\n\rThis is the INSMODed NAME: %s\n\r", longname); #endif //#define DEBUG #undef DEBUG #ifdef DEBUG printk("\n\rThis is the DEFAULT SerialNumber: %s\n\r", serial); #endif //#define DEBUG #undef DEBUG #ifdef DEBUG printk("\n\rThis is the SerialStr: %s\n\r", SerialStr); #endif strcpy(serial, SerialStr); //#define DEBUG #undef DEBUG #ifdef DEBUG printk("\n\rThis is the INSMODed SerialNumber (BT mac): %s\n\r", serial); #endif Device1Init(); return (0); }
/* * does local module initialisation. * returns 0 on success, non-zero on error. */ static int sound_module_init (void) { int ret; /* Note: GPIO region is (should be) handled upstream in ev3dev. * FIXME: still need some clean-up here. * XXX: the conflict in I/O mapping may be causing some issue here. */ // if (request_mem_region (DA8XX_GPIO_BASE, 0xD8, MODULE_NAME) >= 0) { // GpioBase = (void *) ioremap (DA8XX_GPIO_BASE, 0xD8); // if (GpioBase != NULL) { // InitGpio (); // Device1Init (); // // } // } ret = sound_init_gpio (); if (ret) { /* failed */ goto out_err0; } /* initialised GPIO okay, so do the rest */ ret = Device1Init (); if (ret) { goto out_err1; } return 0; out_err1: sound_free_gpio (); out_err0: return ret; }