Exit function

The exit function is only necessary if the driver is compiled as a module. It releases all resources which are held by the chip driver and unregisters the partitions in the MTD layer.

#ifdef MODULE
static void __exit board_cleanup (void)
{
	/* Release resources, unregister device */
	nand_release (board_mtd);

	/* unmap physical address */
	iounmap(baseaddr);
	
	/* Free the MTD device structure */
	kfree (mtd_to_nand(board_mtd));
}
module_exit(board_cleanup);
#endif