patch-2.4.11-dontuse linux/include/linux/mtd/map.h

Next file: linux/include/linux/mtd/pmc551.h
Previous file: linux/include/linux/mtd/iflash.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.10/linux/include/linux/mtd/map.h linux/include/linux/mtd/map.h
@@ -1,6 +1,6 @@
 
 /* Overhauled routines for dealing with different mmap regions of flash */
-/* $Id: map.h,v 1.24 2001/06/09 19:53:16 dwmw2 Exp $ */
+/* $Id: map.h,v 1.25 2001/09/09 15:04:17 dwmw2 Exp $ */
 
 #ifndef __LINUX_MTD_MAP_H__
 #define __LINUX_MTD_MAP_H__
@@ -79,7 +79,8 @@
 {
 	struct map_info *map = mtd->priv;
 
-	map->fldrv->destroy(mtd);
+	if (map->fldrv->destroy)
+		map->fldrv->destroy(mtd);
 #ifdef CONFIG_MODULES
 	if (map->fldrv->module)
 		__MOD_DEC_USE_COUNT(map->fldrv->module);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)