diff options
author | Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 2011-06-02 10:00:51 -0400 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@intel.com> | 2011-09-11 08:02:12 -0400 |
commit | a9106497082c5b9d2b367159573127c2c9ced4b6 (patch) | |
tree | f93f46b0d08d283968265b8ff44629c73657c6f0 | |
parent | a9093f064eb053c1b9fca8b8026577c0b3b9aa8a (diff) |
mtd: ndfc.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: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Artem Bityutskiy <dedekind1@gmail.com>
-rw-r--r-- | drivers/mtd/nand/ndfc.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/mtd/nand/ndfc.c b/drivers/mtd/nand/ndfc.c index 1528734b7616..ee1713907b92 100644 --- a/drivers/mtd/nand/ndfc.c +++ b/drivers/mtd/nand/ndfc.c | |||
@@ -42,7 +42,6 @@ struct ndfc_controller { | |||
42 | struct nand_chip chip; | 42 | struct nand_chip chip; |
43 | int chip_select; | 43 | int chip_select; |
44 | struct nand_hw_control ndfc_control; | 44 | struct nand_hw_control ndfc_control; |
45 | struct mtd_partition *parts; | ||
46 | }; | 45 | }; |
47 | 46 | ||
48 | static struct ndfc_controller ndfc_ctrl[NDFC_MAX_CS]; | 47 | static struct ndfc_controller ndfc_ctrl[NDFC_MAX_CS]; |
@@ -201,11 +200,7 @@ static int ndfc_chip_init(struct ndfc_controller *ndfc, | |||
201 | if (ret) | 200 | if (ret) |
202 | goto err; | 201 | goto err; |
203 | 202 | ||
204 | ret = parse_mtd_partitions(&ndfc->mtd, NULL, &ndfc->parts, &ppdata); | 203 | ret = mtd_device_parse_register(&ndfc->mtd, NULL, &ppdata, NULL, 0); |
205 | if (ret < 0) | ||
206 | goto err; | ||
207 | |||
208 | ret = mtd_device_register(&ndfc->mtd, ndfc->parts, ret); | ||
209 | 204 | ||
210 | err: | 205 | err: |
211 | of_node_put(flash_np); | 206 | of_node_put(flash_np); |