/* Destroy an MTD device which was created for a map device. Make sure the MTD device is already unregistered before calling this  */
void map_destroy(struct mtd_info *mtd)
/* Destroy an MTD device which was created for a map device. Make sure the MTD device is already unregistered before calling this  */
void map_destroy(struct mtd_info *mtd)
{
	struct map_info *map = mtd->priv;
	if (map->fldrv->destroy)
		map->fldrv->destroy(mtd);
	module_put(map->fldrv->module);
	kfree(mtd);
}