aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/mtdcore.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/mtdcore.h')
-rw-r--r--drivers/mtd/mtdcore.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/mtd/mtdcore.h b/drivers/mtd/mtdcore.h
index a33251f..6a64fde 100644
--- a/drivers/mtd/mtdcore.h
+++ b/drivers/mtd/mtdcore.h
@@ -8,4 +8,9 @@
should not use them for _anything_ else */
extern struct mutex mtd_table_mutex;
-extern struct mtd_info *mtd_table[MAX_MTD_DEVICES];
+extern struct mtd_info *__mtd_next_device(int i);
+
+#define mtd_for_each_device(mtd) \
+ for ((mtd) = __mtd_next_device(0); \
+ (mtd) != NULL; \
+ (mtd) = __mtd_next_device(mtd->index + 1))