summaryrefslogtreecommitdiff
path: root/include/linux/mtd
diff options
context:
space:
mode:
authorDmitry Eremin-Solenikov <dbaryshkov@gmail.com>2011-03-25 22:26:25 +0300
committerJustin Waters <justin.waters@timesys.com>2012-07-03 16:56:42 -0400
commitbaa86e729bf5f898120da92d7ecdba5a531fb56f (patch)
treea54d2482c0b451aef794466a229384e6a8752a63 /include/linux/mtd
parent4ca8d1e9fdb8598ca9c107f968baae5ce3d4e858 (diff)
mtd: add new API for handling MTD registration
Lots (nearly all) mtd drivers contain nearly the similar code that calls parse_mtd_partitions, provides some platform-default values, if parsing fails, and registers mtd device. This is an aim to provide single implementation of this scenario: mtd_device_parse_register() which will handle all this parsing and defaults. Artem: amended comments Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'include/linux/mtd')
-rw-r--r--include/linux/mtd/mtd.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index 2541fb848daa..d28a241e7b55 100644
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -327,6 +327,11 @@ struct mtd_partition;
extern int mtd_device_register(struct mtd_info *master,
const struct mtd_partition *parts,
int nr_parts);
+extern int mtd_device_parse_register(struct mtd_info *mtd,
+ const char **part_probe_types,
+ unsigned long origin,
+ const struct mtd_partition *defparts,
+ int defnr_parts);
extern int mtd_device_unregister(struct mtd_info *master);
extern struct mtd_info *get_mtd_device(struct mtd_info *mtd, int num);
extern int __get_mtd_device(struct mtd_info *mtd);