The exit function is only neccecary 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 adress */ iounmap((void *)baseaddr); /* Free the MTD device structure */ kfree (board_mtd); } module_exit(board_cleanup); #endif