aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/mtdpart.c
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2011-06-08 04:42:27 -0400
committerArtem Bityutskiy <artem.bityutskiy@intel.com>2011-09-11 08:02:05 -0400
commitad274cecdbce18d13075bde3aabe5882802056de (patch)
tree0c39b7c67d9917c86fa9fc365ff5e45a819d5f4f /drivers/mtd/mtdpart.c
parent543e32d5ff165d0d68deedb0e3557478c7c36a4a (diff)
mtd: document parse_mtd_partitions
Add a kerneldoc comment for the 'parse_mtd_partitions()' function - its behavior has changed recently so it is good idea to have it documented. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers/mtd/mtdpart.c')
-rw-r--r--drivers/mtd/mtdpart.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
index b73720502433..2b71ccb00d39 100644
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
@@ -725,8 +725,30 @@ int deregister_mtd_parser(struct mtd_part_parser *p)
725} 725}
726EXPORT_SYMBOL_GPL(deregister_mtd_parser); 726EXPORT_SYMBOL_GPL(deregister_mtd_parser);
727 727
728/*
729 * Do not forget to update 'parse_mtd_partitions()' kerneldoc comment if you
730 * are changing this array!
731 */
728static const char *default_mtd_part_types[] = {"cmdlinepart", NULL}; 732static const char *default_mtd_part_types[] = {"cmdlinepart", NULL};
729 733
734/**
735 * parse_mtd_partitions - parse MTD partitions
736 * @master: the master partition (describes whole MTD device)
737 * @types: names of partition parsers to try or %NULL
738 * @pparts: array of partitions found is returned here
739 * @origin: MTD device start address (use %0 if unsure)
740 *
741 * This function tries to find partition on MTD device @master. It uses MTD
742 * partition parsers, specified in @types. However, if @types is %NULL, then
743 * the default list of parsers is used. The default list contains only the
744 * "cmdlinepart" parser ATM.
745 *
746 * This function may return:
747 * o a negative error code in case of failure
748 * o zero if no partitions were found
749 * o a positive number of found partitions, in which case on exit @pparts will
750 * point to an array containing this number of &struct mtd_info objects.
751 */
730int parse_mtd_partitions(struct mtd_info *master, const char **types, 752int parse_mtd_partitions(struct mtd_info *master, const char **types,
731 struct mtd_partition **pparts, unsigned long origin) 753 struct mtd_partition **pparts, unsigned long origin)
732{ 754{