"Das U-Boot" Source Tree

mtd: move definitions to enlarge their range

Some helpers might be useful in a future 'mtd' U-Boot command to parse
MTD device list.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>

authored by

Miquel Raynal and committed by
Jagan Teki
d02f1d36 9bfc3fde

+6 -6
-6
drivers/mtd/mtdcore.h
··· 5 5 6 6 extern struct mutex mtd_table_mutex; 7 7 8 - struct mtd_info *__mtd_next_device(int i); 9 8 int add_mtd_device(struct mtd_info *mtd); 10 9 int del_mtd_device(struct mtd_info *mtd); 11 10 int add_mtd_partitions(struct mtd_info *, const struct mtd_partition *, int); ··· 16 15 17 16 int __init init_mtdchar(void); 18 17 void __exit cleanup_mtdchar(void); 19 - 20 - #define mtd_for_each_device(mtd) \ 21 - for ((mtd) = __mtd_next_device(0); \ 22 - (mtd) != NULL; \ 23 - (mtd) = __mtd_next_device(mtd->index + 1))
+6
include/linux/mtd/mtd.h
··· 533 533 int add_mtd_partitions(struct mtd_info *, const struct mtd_partition *, int); 534 534 int del_mtd_partitions(struct mtd_info *); 535 535 536 + struct mtd_info *__mtd_next_device(int i); 537 + #define mtd_for_each_device(mtd) \ 538 + for ((mtd) = __mtd_next_device(0); \ 539 + (mtd) != NULL; \ 540 + (mtd) = __mtd_next_device(mtd->index + 1)) 541 + 536 542 int mtd_arg_off(const char *arg, int *idx, loff_t *off, loff_t *size, 537 543 loff_t *maxsize, int devtype, uint64_t chipsize); 538 544 int mtd_arg_off_size(int argc, char *const argv[], int *idx, loff_t *off,