Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 73f36b3e authored by Dmitry Eremin-Solenikov's avatar Dmitry Eremin-Solenikov Committed by Artem Bityutskiy
Browse files

mtd: fsl_upm.c: use mtd_device_parse_register



Replace custom invocations of parse_mtd_partitions and mtd_device_register
with common mtd_device_parse_register call. This would bring: standard
handling of all errors, fallback to default partitions, etc.

Signed-off-by: default avatarDmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: default avatarArtem Bityutskiy <dedekind1@gmail.com>
parent 99add422
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -193,9 +193,7 @@ static int __devinit fun_chip_init(struct fsl_upm_nand *fun,
		goto err;

	ppdata.of_node = flash_np;
	ret = parse_mtd_partitions(&fun->mtd, NULL, &fun->parts, &ppdata);

	ret = mtd_device_register(&fun->mtd, fun->parts, ret);
	ret = mtd_device_parse_register(&fun->mtd, NULL, &ppdata, NULL, 0);
err:
	of_node_put(flash_np);
	return ret;