diff options
author | Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 2011-03-25 15:26:25 -0400 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@intel.com> | 2011-09-11 08:02:05 -0400 |
commit | 1c4c215cbdcbfd08183d82b2953591cd00564422 (patch) | |
tree | bb43365c3e16e3634a6f53dab61c2e8e6145563b /include/linux/mtd/mtd.h | |
parent | 3761a6ddacc83e5a6b4482d98fbf212805381486 (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/mtd.h')
-rw-r--r-- | include/linux/mtd/mtd.h | 5 |
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; | |||
327 | extern int mtd_device_register(struct mtd_info *master, | 327 | extern int mtd_device_register(struct mtd_info *master, |
328 | const struct mtd_partition *parts, | 328 | const struct mtd_partition *parts, |
329 | int nr_parts); | 329 | int nr_parts); |
330 | extern int mtd_device_parse_register(struct mtd_info *mtd, | ||
331 | const char **part_probe_types, | ||
332 | unsigned long origin, | ||
333 | const struct mtd_partition *defparts, | ||
334 | int defnr_parts); | ||
330 | extern int mtd_device_unregister(struct mtd_info *master); | 335 | extern int mtd_device_unregister(struct mtd_info *master); |
331 | extern struct mtd_info *get_mtd_device(struct mtd_info *mtd, int num); | 336 | extern struct mtd_info *get_mtd_device(struct mtd_info *mtd, int num); |
332 | extern int __get_mtd_device(struct mtd_info *mtd); | 337 | extern int __get_mtd_device(struct mtd_info *mtd); |