int __init rp_init(void) 
static int __init rp_init(void) 
int __init rp_init(void){	int retval, pci_boards_found, isa_boards_found, i;	printk(KERN_INFO "RocketPort device driver module, version %s, %s\n",	       ROCKET_VERSION, ROCKET_DATE);	rocket_driver = alloc_tty_driver(MAX_RP_PORTS);	if (!rocket_driver)		return -ENOMEM;	/*	 * Set up the timer channel.	 */	init_timer(&rocket_timer);	rocket_timer.function = rp_do_poll;	/*	 * Initialize the array of pointers to our own internal state	 * structures.	 */	memset(rp_table, 0, sizeof (rp_table));	memset(xmit_flags, 0, sizeof (xmit_flags));	for (i = 0; i < MAX_RP_PORTS; i++)		lineNumbers[i] = 0;	nextLineNumber = 0;	memset(rocketModel, 0, sizeof (rocketModel));	/*	 *  If board 1 is non-zero, there is at least one ISA configured.  If controller is 	 *  zero, use the default controller IO address of board1 + 0x40.	 */	if (board1) {		if (controller == 0)			controller = board1 + 0x40;	} else {		controller = 0;  /*  Used as a flag, meaning no ISA boards */	}	/*  If an ISA card is configured, reserve the 4 byte IO space for the Mudbac controller */	if (controller && (!request_region(controller, 4, "Comtrol RocketPort"))) {		printk(KERN_INFO "Unable to reserve IO region for first configured ISA RocketPort controller 0x%lx.  Driver exiting \n", controller);		return -EBUSY;	}	/*  Store ISA variable retrieved from command line or .conf file. */	rcktpt_io_addr[0] = board1;	rcktpt_io_addr[1] = board2;	rcktpt_io_addr[2] = board3;	rcktpt_io_addr[3] = board4;	rcktpt_type[0] = modem1 ? ROCKET_TYPE_MODEM : ROCKET_TYPE_NORMAL;	rcktpt_type[0] = pc104_1[0] ? ROCKET_TYPE_PC104 : rcktpt_type[0];	rcktpt_type[1] = modem2 ? ROCKET_TYPE_MODEM : ROCKET_TYPE_NORMAL;	rcktpt_type[1] = pc104_2[0] ? ROCKET_TYPE_PC104 : rcktpt_type[1];	rcktpt_type[2] = modem3 ? ROCKET_TYPE_MODEM : ROCKET_TYPE_NORMAL;	rcktpt_type[2] = pc104_3[0] ? ROCKET_TYPE_PC104 : rcktpt_type[2];	rcktpt_type[3] = modem4 ? ROCKET_TYPE_MODEM : ROCKET_TYPE_NORMAL;	rcktpt_type[3] = pc104_4[0] ? ROCKET_TYPE_PC104 : rcktpt_type[3];	/*	 * Set up the tty driver structure and then register this	 * driver with the tty layer.	 */	rocket_driver->owner = THIS_MODULE;	rocket_driver->flags = TTY_DRIVER_NO_DEVFS;	rocket_driver->devfs_name = "tts/R";	rocket_driver->name = "ttyR";	rocket_driver->driver_name = "Comtrol RocketPort";	rocket_driver->major = TTY_ROCKET_MAJOR;	rocket_driver->minor_start = 0;	rocket_driver->type = TTY_DRIVER_TYPE_SERIAL;	rocket_driver->subtype = SERIAL_TYPE_NORMAL;	rocket_driver->init_termios = tty_std_termios;	rocket_driver->init_termios.c_cflag =	    B9600 | CS8 | CREAD | HUPCL | CLOCAL;#ifdef ROCKET_SOFT_FLOW	rocket_driver->flags |= TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS;#endif	tty_set_operations(rocket_driver, &rocket_ops);	retval = tty_register_driver(rocket_driver);	if (retval < 0) {		printk(KERN_INFO "Couldn't install tty RocketPort driver (error %d)\n", -retval);		put_tty_driver(rocket_driver);		return -1;	}#ifdef ROCKET_DEBUG_OPEN	printk(KERN_INFO "RocketPort driver is major %d\n", rocket_driver.major);#endif	/*	 *  OK, let's probe each of the controllers looking for boards.  Any boards found         *  will be initialized here.	 */	isa_boards_found = 0;	pci_boards_found = 0;	for (i = 0; i < NUM_BOARDS; i++) {		if (init_ISA(i))			isa_boards_found++;	}#ifdef CONFIG_PCI	if (isa_boards_found < NUM_BOARDS)		pci_boards_found = init_PCI(isa_boards_found);#endif	max_board = pci_boards_found + isa_boards_found;	if (max_board == 0) {		printk(KERN_INFO "No rocketport ports found; unloading driver.\n");		del_timer_sync(&rocket_timer);		tty_unregister_driver(rocket_driver);		put_tty_driver(rocket_driver);		return -ENXIO;	}	return 0;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/d269cdd0e22ef22f7f597ea917b1e8bdc6999fcb/rocket.c/clean/drivers/char/rocket.c