int init_module(void) { if (ip_masq_irc_init() != 0) return -EIO; register_symtab(NULL); return 0; }
int init_module(void) { if (ip_masq_vdolive_init() != 0) return -EIO; register_symtab(0); return 0; }
int init_module(void) { int status; if ((status = register_filesystem(&autofs_fs_type)) == 0) register_symtab(0); return status; }
int init_fat_fs(void) { #if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(2,1,0) return 0; #else return register_symtab(&fat_syms); #endif }
int init_module(void) { int status; if ((status = init_umsdos_fs()) == 0) register_symtab(0); return status; }
void isdn_export_syms(void) { if (has_exported) return; register_symtab(&isdn_syms); has_exported = 1; }
INIT_RET_TYPE gpio_init(void) { int i; printk(KERN_INFO "gpio_vsopenrisc: GPIO driver.\n"); // initialize poll queue init_waitqueue_head(&gpio_queue); memset(gpio_ext_irq_changes, 0, sizeof(gpio_ext_irq_changes)); GPIO_DATA = GPIO_DATA_INIT; GPIO_EXT_DATA = GPIO_EXT_DATA_INIT; /* Enable inputs */ GPIO_MODE &= ~GPIO_INPUTS; GPIO_EXT_MODE &= ~GPIO_EXT_INPUTS; /* Enable outputs */ GPIO_MODE |= GPIO_OUTPUTS; GPIO_EXT_MODE |= GPIO_EXT_OUTPUTS; /* Disable all interrupts */ GPIO_EXT_IRQMASK = 0x00; if (request_irq(KS8695_INTEPLD_GPIO, gpio_ext_irq_handler, IRQF_SHARED, "gpio_vsopenrisc", (void*)1) < 0) printk(KERN_ERR "%s(%d): request_irq() couldn't register the interrupt for the gpios\n", __FILE__, __LINE__); if (register_chrdev(VSOPENRISC_GPIO_MAJOR, "gpio", &gpio_fops) < 0) { printk("%s(%d): gpio_init() can't get Major %d\n", __FILE__, __LINE__, VSOPENRISC_GPIO_MAJOR); return(-EBUSY); } #if LINUX_VERSION_CODE < 0x020100 register_symtab(&gpio_syms); #endif if (!openriscdir) openriscdir = proc_mkdir("vsopenrisc", NULL); proc_create_data(PROC_NAME_BTN_RST, 0644, openriscdir, &rst_fops_data, NULL); proc_create_data(PROC_NAME_BTN_WLAN, 0644, openriscdir, &wlan_fops_data, NULL); proc_create_data(PROC_NAME_LEDS, 0644, openriscdir, &leds_fops_data, NULL); proc_create_data(PROC_NAME_BUZZER, 0644, openriscdir, &buzzer_fops_data, NULL); proc_create_data(PROC_NAME_BUZZER_FRQ, 0644, openriscdir, &buzzer_frq_fops_data, NULL); for (i = 0; i < GPIO_VAL_MAX; i++) { proc_create_data(table_proc_name[i], 0644, openriscdir, &gpio_fops_data, (void*)i); } //return(0); return platform_driver_register(&gpio_vsopenrisc_driver); }
int ip_masq_init(void) { register_symtab (&ip_masq_syms); #ifdef CONFIG_PROC_FS proc_net_register(&(struct proc_dir_entry) { PROC_NET_IPMSQHST, 13, "ip_masquerade", S_IFREG | S_IRUGO, 1, 0, 0, 0, &proc_net_inode_operations, ip_msqhst_procinfo });
int init_module(void) { proc_register_dynamic(&proc_root, &jit_proc_busy); proc_register_dynamic(&proc_root, &jit_proc_sched); proc_register_dynamic(&proc_root, &jit_proc_queue); proc_register_dynamic(&proc_root, &jit_proc_self); proc_register_dynamic(&proc_root, &jit_proc_current); #ifndef JIT_DEBUG register_symtab(NULL); /* hide symbols */ #endif return 0; /* succeed */ }
int init_module(void) { printk("oops: Module initilization.\n"); if (register_chrdev(major, "oops", &oops_fops1)) { printk("register_chrdev failed."); return -EIO; } printk("oops: Registering symbols.\n"); register_symtab(&these_symbols); return 0; }
int init_module(void) { int status; DPRINTK("smbfs: init_module called\n"); #ifdef DEBUG_SMB_MALLOC smb_malloced = 0; smb_current_malloced = 0; #endif smb_init_dir_cache(); if ((status = init_smb_fs()) == 0) register_symtab(0); return status; }
int init_module( void) { int status; DPRINTK("ncpfs: init_module called\n"); #ifdef DEBUG_NCP_MALLOC ncp_malloced = 0; ncp_current_malloced = 0; #endif ncp_init_dir_cache(); if ((status = init_ncp_fs()) == 0) register_symtab(0); return status; }
int init_module(void) { int i; if (divert_dev_init()) { printk(KERN_WARNING "dss1_divert: cannot install device, not loaded\n"); return(-EIO); } if ((i = DIVERT_REG_NAME(&divert_if)) != DIVERT_NO_ERR) { divert_dev_deinit(); printk(KERN_WARNING "dss1_divert: error %d registering module, not loaded\n",i); return(-EIO); } #if (LINUX_VERSION_CODE < 0x020111) register_symtab(0); #endif printk(KERN_INFO "dss1_divert module successfully installed\n"); return(0); } /* init_module */
static int __init_text _irq_init(void) { int rc; pr_info("%s driver %s\n%s %s\n", name,version, KERN_INFO,copyright); pr_info("%s: ", name); if ( (rc=register_chrdev(major,name,&fops)) <0 ) { printk("registration failed: "); if (rc==-EBUSY) if (major==0) printk("no free major slots"); else printk("major %d is busy",major); else if (rc==-EINVAL) printk("major number %d > %d", major, MAX_CHRDEV-1); else printk("rc = %d",rc); pr_endl(); return rc; } #if defined(MODULE) && defined(CONFIG_IRQ_EXPORT_SIMULATE) # if LINUX_VERSION_CODE < KERNEL_VERSION(2,1,18) if( (rc=register_symtab(&irq_syms))!=0) { printk("register_symtab() error\n"); unregister_chrdev(major,name); return rc; } # endif #endif if (major==0) major=rc; printk("registered with major %u\n", major); // static object constructors return 0; }
int avmb1_init(void) { char *p; char rev[10]; #ifndef HAS_NEW_SYMTAB /* No symbols to export, hide all symbols */ register_symtab(&capidev_syms); #endif skb_queue_head_init(&recv_queue); /* init_bh(CAPI_BH, do_capi_bh); */ tq_state_notify.routine = notify_handler; tq_state_notify.data = 0; tq_recv_notify.routine = recv_handler; tq_recv_notify.data = 0; if ((p = strchr(revision, ':'))) { strcpy(rev, p + 1); p = strchr(rev, '$'); *p = 0; } else strcpy(rev, " ??? "); #ifdef MODULE if (portbase) { int rc; if ((rc = avmb1_probecard(portbase, irq)) != 0) return rc; if ((rc = avmb1_addcard(portbase, irq)) != 0) return rc; } else { printk(KERN_NOTICE "AVM-B1-CAPI-driver Rev%s: loaded\n", rev); } #else printk(KERN_NOTICE "AVM-B1-CAPI-driver Rev%s: started\n", rev); #endif return 0; }
int __init init_pcmcia_ds(void) { client_reg_t client_reg; servinfo_t serv; bind_req_t bind; socket_info_t *s; int i, ret; DEBUG(0, "%s\n", version); CardServices(GetCardServicesInfo, &serv); if (serv.Revision != CS_RELEASE_CODE) { printk(KERN_NOTICE "ds: Card Services release does not match!\n"); return -1; } if (serv.Count == 0) { printk(KERN_NOTICE "ds: no socket drivers loaded!\n"); return -1; } sockets = serv.Count; socket_table = kmalloc(sockets*sizeof(socket_info_t), GFP_KERNEL); if (!socket_table) return -1; for (i = 0, s = socket_table; i < sockets; i++, s++) { s->state = 0; s->user = NULL; s->req_pending = 0; init_waitqueue_head(&s->queue); init_waitqueue_head(&s->request); s->handle = NULL; init_timer(&s->removal); s->removal.data = i; s->removal.function = &handle_removal; s->bind = NULL; } /* Set up hotline to Card Services */ client_reg.dev_info = bind.dev_info = &dev_info; client_reg.Attributes = INFO_MASTER_CLIENT; client_reg.EventMask = CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL | CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET | CS_EVENT_EJECTION_REQUEST | CS_EVENT_INSERTION_REQUEST | CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME; client_reg.event_handler = &ds_event; client_reg.Version = 0x0210; for (i = 0; i < sockets; i++) { bind.Socket = i; bind.Function = BIND_FN_ALL; ret = CardServices(BindDevice, &bind); if (ret != CS_SUCCESS) { cs_error(NULL, BindDevice, ret); break; } client_reg.event_callback_args.client_data = &socket_table[i]; ret = CardServices(RegisterClient, &socket_table[i].handle, &client_reg); if (ret != CS_SUCCESS) { cs_error(NULL, RegisterClient, ret); break; } } /* Set up character device for user mode clients */ i = register_chrdev(0, "pcmcia", &ds_fops); if (i == -EBUSY) printk(KERN_NOTICE "unable to find a free device # for " "Driver Services\n"); else major_dev = i; register_symtab(&ds_symtab); #ifdef HAS_PROC_BUS if (proc_pccard) create_proc_read_entry("drivers", 0, proc_pccard, proc_read_drivers, NULL); init_status = 0; #endif return 0; }
void export_net_symbols(void) { register_symtab(&net_syms); }
int in_module(void){ register_symtab(NULL); printk("Hacking: module loaded\n"); printk("%d\n", i386); return 0; }
void p8022_proto_init(struct net_proto *pro) { p8022_packet_type.type=htons(ETH_P_802_2); dev_add_pack(&p8022_packet_type); register_symtab(&p8022_proto_syms); }
int init_fat_fs(void) { return register_symtab(&fat_syms); }
/* Called by modules package when installing the driver * or by kernel during the initialization phase */ int __init ftape_init(void) { TRACE_FUN(ft_t_flow); #ifdef MODULE printk(KERN_INFO FTAPE_VERSION "\n"); if (TRACE_LEVEL >= ft_t_info) { printk( KERN_INFO "(c) 1993-1996 Bas Laarhoven ([email protected])\n" KERN_INFO "(c) 1995-1996 Kai Harrekilde-Petersen ([email protected])\n" KERN_INFO "(c) 1996-1997 Claus-Justus Heine ([email protected])\n" KERN_INFO "QIC-117 driver for QIC-40/80/3010/3020 floppy tape drives\n" KERN_INFO "Compiled for Linux version %s" #ifdef MODVERSIONS " with versioned symbols" #endif "\n", UTS_RELEASE); } #else /* !MODULE */ /* print a short no-nonsense boot message */ printk(KERN_INFO FTAPE_VERSION " for Linux " UTS_RELEASE "\n"); #endif /* MODULE */ TRACE(ft_t_info, "installing QIC-117 floppy tape hardware drive ... "); TRACE(ft_t_info, "ftape_init @ 0x%p", ftape_init); /* Allocate the DMA buffers. They are deallocated at cleanup() time. */ #if TESTING #ifdef MODULE while (ftape_set_nr_buffers(CONFIG_FT_NR_BUFFERS) < 0) { ftape_sleep(FT_SECOND/20); if (signal_pending(current)) { (void)ftape_set_nr_buffers(0); TRACE(ft_t_bug, "Killed by signal while allocating buffers."); TRACE_ABORT(-EINTR, ft_t_bug, "Free up memory and retry"); } } #else TRACE_CATCH(ftape_set_nr_buffers(CONFIG_FT_NR_BUFFERS), (void)ftape_set_nr_buffers(0)); #endif #else TRACE_CATCH(ftape_set_nr_buffers(CONFIG_FT_NR_BUFFERS), (void)ftape_set_nr_buffers(0)); #endif ft_drive_sel = -1; ft_failure = 1; /* inhibit any operation but open */ ftape_udelay_calibrate(); /* must be before fdc_wait_calibrate ! */ fdc_wait_calibrate(); #if LINUX_VERSION_CODE < KERNEL_VER(2,1,18) register_symtab(&ftape_symbol_table); /* add global ftape symbols */ #endif #if defined(CONFIG_PROC_FS) && defined(CONFIG_FT_PROC_FS) (void)ftape_proc_init(); #endif #ifdef CONFIG_ZFTAPE (void)zft_init(); #endif TRACE_EXIT 0; }
int ftape_init(void) { int n; int order; TRACE_FUN(5, "ftape_init"); #ifdef MODULE printk(KERN_INFO "ftape-2.08 960314\n" KERN_INFO " (c) 1993-1995 Bas Laarhoven ([email protected])\n" KERN_INFO " (c) 1995-1996 Kai Harrekilde-Petersen ([email protected])\n" KERN_INFO " QIC-117 driver for QIC-40/80/3010/3020 tape drives\n" KERN_INFO " Compiled for kernel version %s" #ifdef MODVERSIONS " with versioned symbols" #endif "\n", kernel_version); #else /* !MODULE */ /* print a short no-nonsense boot message */ printk("ftape-2.08 960314 for Linux 1.3.70\n"); #endif /* MODULE */ TRACE(3, "installing QIC-117 ftape driver..."); if (register_chrdev(QIC117_TAPE_MAJOR, "ft", &ftape_cdev)) { TRACE(1, "register_chrdev failed"); TRACE_EXIT; return -EIO; } TRACEx1(3, "ftape_init @ 0x%p", ftape_init); /* * Allocate the DMA buffers. They are deallocated at cleanup() time. */ order = __get_order(BUFF_SIZE); for (n = 0; n < NR_BUFFERS; n++) { tape_buffer[n] = (byte *) dmaalloc(order); if (!tape_buffer[n]) { TRACE(1, "dmaalloc() failed"); for (n = 0; n < NR_BUFFERS; n++) { if (tape_buffer[n]) { dmafree(tape_buffer[n], order); tape_buffer[n] = NULL; } } current->blocked = old_sigmask; /* restore mask */ if (unregister_chrdev(QIC117_TAPE_MAJOR, "ft") != 0) { TRACE(3, "unregister_chrdev failed"); } TRACE_EXIT; return -ENOMEM; } else { TRACEx2(3, "dma-buffer #%d @ %p", n, tape_buffer[n]); } } busy_flag = 0; ftape_unit = -1; ftape_failure = 1; /* inhibit any operation but open */ udelay_calibrate(); /* must be before fdc_wait_calibrate ! */ fdc_wait_calibrate(); TRACE_EXIT; #ifdef MODULE register_symtab(0); /* remove global ftape symbols */ #endif return 0; }
void arch_syms_export(void) { register_symtab(&arch_symbol_table); }
void mach_atari_syms_export(void) { register_symtab(&mach_atari_symbol_table); }