Blame view

drivers/mtd/mtdcore.h 934 Bytes
b24413180   Greg Kroah-Hartman   License cleanup: ...
1
  /* SPDX-License-Identifier: GPL-2.0 */
cb70783c6   Artem Bityutskiy   mtd: mtdcore: cle...
2
  /*
660685d9d   Artem Bityutskiy   mtd: merge mtdcha...
3
4
   * These are exported solely for the purpose of mtd_blkdevs.c and mtdchar.c.
   * You should not use them for _anything_ else.
356d70f19   Ben Dooks   [MTD] mtdcore.c: ...
5
   */
356d70f19   Ben Dooks   [MTD] mtdcore.c: ...
6
  extern struct mutex mtd_table_mutex;
0f0710041   David Howells   mtd: Provide fs_c...
7
  extern struct backing_dev_info *mtd_bdi;
f1332ba2f   Ben Hutchings   mtd: Introduce an...
8

cb70783c6   Artem Bityutskiy   mtd: mtdcore: cle...
9
  struct mtd_info *__mtd_next_device(int i);
2b6f0090a   Boris Brezillon   mtd: Check add_mt...
10
  int __must_check add_mtd_device(struct mtd_info *mtd);
cb70783c6   Artem Bityutskiy   mtd: mtdcore: cle...
11
12
13
  int del_mtd_device(struct mtd_info *mtd);
  int add_mtd_partitions(struct mtd_info *, const struct mtd_partition *, int);
  int del_mtd_partitions(struct mtd_info *);
07fd2f871   Brian Norris   mtd: partitions: ...
14
15
  
  struct mtd_partitions;
cb70783c6   Artem Bityutskiy   mtd: mtdcore: cle...
16
  int parse_mtd_partitions(struct mtd_info *master, const char * const *types,
cb70783c6   Artem Bityutskiy   mtd: mtdcore: cle...
17
  			 struct mtd_part_parser_data *data);
eea72d5fd   Jamie Iles   mtd: remove add_m...
18

adc83bf88   Brian Norris   mtd: partitions: ...
19
  void mtd_part_parser_cleanup(struct mtd_partitions *parts);
660685d9d   Artem Bityutskiy   mtd: merge mtdcha...
20
21
  int __init init_mtdchar(void);
  void __exit cleanup_mtdchar(void);
f1332ba2f   Ben Hutchings   mtd: Introduce an...
22
23
24
25
  #define mtd_for_each_device(mtd)			\
  	for ((mtd) = __mtd_next_device(0);		\
  	     (mtd) != NULL;				\
  	     (mtd) = __mtd_next_device(mtd->index + 1))