Skip to content

Commit

Permalink
mtd: fsl_upm.c: use mtd_device_parse_register
Browse files Browse the repository at this point in the history
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: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Artem Bityutskiy <dedekind1@gmail.com>
  • Loading branch information
Dmitry Eremin-Solenikov authored and Artem Bityutskiy committed Sep 11, 2011
1 parent 99add42 commit 73f36b3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/mtd/nand/fsl_upm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 73f36b3

Please sign in to comment.