summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/mtdpart.c
diff options
context:
space:
mode:
authorDmitry Eremin-Solenikov2011-06-02 16:51:16 +0200
committerArtem Bityutskiy2011-09-11 14:01:58 +0200
commit5c4eefbd5bb82a525ce5340cc8a91ab6dffeb490 (patch)
tree1c943523c24896caf579d72d163627b25788c223 /drivers/mtd/mtdpart.c
parentmtd: cafe_nand: drop reference to CONFIG_MTD_CMDLINE_PARTS (diff)
downloadkernel-qcow2-linux-5c4eefbd5bb82a525ce5340cc8a91ab6dffeb490.tar.gz
kernel-qcow2-linux-5c4eefbd5bb82a525ce5340cc8a91ab6dffeb490.tar.xz
kernel-qcow2-linux-5c4eefbd5bb82a525ce5340cc8a91ab6dffeb490.zip
mtd: mtdpart: default to cmdlinepart, NULL partitions probing
Lots of MTD devices default to cmdlinepart, NULL as partition parsing order. Make it a default. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers/mtd/mtdpart.c')
-rw-r--r--drivers/mtd/mtdpart.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
index 630be3e7da04..3477e16be1c8 100644
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
@@ -712,12 +712,17 @@ int deregister_mtd_parser(struct mtd_part_parser *p)
}
EXPORT_SYMBOL_GPL(deregister_mtd_parser);
+static const char *default_mtd_part_types[] = {"cmdlinepart", NULL};
+
int parse_mtd_partitions(struct mtd_info *master, const char **types,
struct mtd_partition **pparts, unsigned long origin)
{
struct mtd_part_parser *parser;
int ret = 0;
+ if (!types)
+ types = default_mtd_part_types;
+
for ( ; ret <= 0 && *types; types++) {
parser = get_partition_parser(*types);
if (!parser && !request_module("%s", *types))