class_simple_device_add(istallion_class, MKDEV(STL_SIOMEMMAJOR, i), 
class_device_create(istallion_class, MKDEV(STL_SIOMEMMAJOR, i), 
int __init stli_init(void){	int i;	printk(KERN_INFO "%s: version %s\n", stli_drvtitle, stli_drvversion);	stli_initbrds();	stli_serial = alloc_tty_driver(STL_MAXBRDS * STL_MAXPORTS);	if (!stli_serial)		return -ENOMEM;/* *	Allocate a temporary write buffer. */	stli_tmpwritebuf = (char *) stli_memalloc(STLI_TXBUFSIZE);	if (stli_tmpwritebuf == (char *) NULL)		printk(KERN_ERR "STALLION: failed to allocate memory "				"(size=%d)\n", STLI_TXBUFSIZE);	stli_txcookbuf = stli_memalloc(STLI_TXBUFSIZE);	if (stli_txcookbuf == (char *) NULL)		printk(KERN_ERR "STALLION: failed to allocate memory "				"(size=%d)\n", STLI_TXBUFSIZE);/* *	Set up a character driver for the shared memory region. We need this *	to down load the slave code image. Also it is a useful debugging tool. */	if (register_chrdev(STL_SIOMEMMAJOR, "staliomem", &stli_fsiomem))		printk(KERN_ERR "STALLION: failed to register serial memory "				"device\n");	devfs_mk_dir("staliomem");	istallion_class = class_simple_create(THIS_MODULE, "staliomem");	for (i = 0; i < 4; i++) {		devfs_mk_cdev(MKDEV(STL_SIOMEMMAJOR, i),			       S_IFCHR | S_IRUSR | S_IWUSR,			       "staliomem/%d", i);		class_simple_device_add(istallion_class, MKDEV(STL_SIOMEMMAJOR, i), 				NULL, "staliomem%d", i);	}/* *	Set up the tty driver structure and register us as a driver. */	stli_serial->owner = THIS_MODULE;	stli_serial->driver_name = stli_drvname;	stli_serial->name = stli_serialname;	stli_serial->major = STL_SERIALMAJOR;	stli_serial->minor_start = 0;	stli_serial->type = TTY_DRIVER_TYPE_SERIAL;	stli_serial->subtype = SERIAL_TYPE_NORMAL;	stli_serial->init_termios = stli_deftermios;	stli_serial->flags = TTY_DRIVER_REAL_RAW;	tty_set_operations(stli_serial, &stli_ops);	if (tty_register_driver(stli_serial)) {		put_tty_driver(stli_serial);		printk(KERN_ERR "STALLION: failed to register serial driver\n");		return -EBUSY;	}	return(0);}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/ca8eca6884861c1ce294b05aacfdf9045bba9aff/istallion.c/buggy/drivers/char/istallion.c