summaryrefslogtreecommitdiff
path: root/drivers/mtd/mtdcore.h
diff options
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2018-03-27 22:35:41 +0200
committerBoris Brezillon <boris.brezillon@bootlin.com>2018-05-07 10:10:47 +0200
commit5ac67ce36cfe38b4c104a42ce52c5c8d526f1c95 (patch)
tree35f4c6c21fb1024b5352907d48e50df0b8129705 /drivers/mtd/mtdcore.h
parent0fe3ede7941dfcd6fd540fc2b086453d3ee8f236 (diff)
mtd: move code adding (registering) partitions to the parse_mtd_partitions()
This commit slightly simplifies the code. Every parse_mtd_partitions() caller (out of two existing ones) had to add partitions & cleanup parser on its own. This moves that responsibility into the function. That change also allows dropping struct mtd_partitions argument. There is one minor behavior change caused by this cleanup. If parse_mtd_partitions() fails to add partitions (add_mtd_partitions() return an error) then mtd_device_parse_register() will still try to add (register) fallback partitions. It's a real corner case affecting one of uncommon error paths and shouldn't cause any harm. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Diffstat (limited to 'drivers/mtd/mtdcore.h')
-rw-r--r--drivers/mtd/mtdcore.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/mtd/mtdcore.h b/drivers/mtd/mtdcore.h
index 37accfd0400e..9887bda317cd 100644
--- a/drivers/mtd/mtdcore.h
+++ b/drivers/mtd/mtdcore.h
@@ -15,7 +15,6 @@ int del_mtd_partitions(struct mtd_info *);
struct mtd_partitions;
int parse_mtd_partitions(struct mtd_info *master, const char * const *types,
- struct mtd_partitions *pparts,
struct mtd_part_parser_data *data);
void mtd_part_parser_cleanup(struct mtd_partitions *parts);