class_simple_destroy(stallion_class); 
class_destroy(stallion_class); 
static void __exit stallion_module_exit(void){	stlbrd_t	*brdp;	stlpanel_t	*panelp;	stlport_t	*portp;	unsigned long	flags;	int		i, j, k;#ifdef DEBUG	printk("cleanup_module()\n");#endif	printk(KERN_INFO "Unloading %s: version %s\n", stl_drvtitle,		stl_drvversion);	save_flags(flags);	cli();/* *	Free up all allocated resources used by the ports. This includes *	memory and interrupts. As part of this process we will also do *	a hangup on every open port - to try to flush out any processes *	hanging onto ports. */	i = tty_unregister_driver(stl_serial);	put_tty_driver(stl_serial);	if (i) {		printk("STALLION: failed to un-register tty driver, "			"errno=%d\n", -i);		restore_flags(flags);		return;	}	for (i = 0; i < 4; i++) {		devfs_remove("staliomem/%d", i);		class_simple_device_remove(MKDEV(STL_SIOMEMMAJOR, i));	}	devfs_remove("staliomem");	if ((i = unregister_chrdev(STL_SIOMEMMAJOR, "staliomem")))		printk("STALLION: failed to un-register serial memory device, "			"errno=%d\n", -i);	class_simple_destroy(stallion_class);	if (stl_tmpwritebuf != (char *) NULL)		kfree(stl_tmpwritebuf);	for (i = 0; (i < stl_nrbrds); i++) {		if ((brdp = stl_brds[i]) == (stlbrd_t *) NULL)			continue;		free_irq(brdp->irq, brdp);		for (j = 0; (j < STL_MAXPANELS); j++) {			panelp = brdp->panels[j];			if (panelp == (stlpanel_t *) NULL)				continue;			for (k = 0; (k < STL_PORTSPERPANEL); k++) {				portp = panelp->ports[k];				if (portp == (stlport_t *) NULL)					continue;				if (portp->tty != (struct tty_struct *) NULL)					stl_hangup(portp->tty);				if (portp->tx.buf != (char *) NULL)					kfree(portp->tx.buf);				kfree(portp);			}			kfree(panelp);		}		release_region(brdp->ioaddr1, brdp->iosize1);		if (brdp->iosize2 > 0)			release_region(brdp->ioaddr2, brdp->iosize2);		kfree(brdp);		stl_brds[i] = (stlbrd_t *) NULL;	}	restore_flags(flags);}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/ca8eca6884861c1ce294b05aacfdf9045bba9aff/stallion.c/buggy/drivers/char/stallion.c