diff options
author | Jamie Iles <jamie@jamieiles.com> | 2011-05-23 05:23:21 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2011-05-24 21:23:25 -0400 |
commit | ed9281e60af1d63222eff69527e22e382e558887 (patch) | |
tree | 8f0215d6909bab82be94baecf42c7add2e76c9e0 /drivers/mtd | |
parent | da499d414b964403e0070a2b0113b1a4180c6fbe (diff) |
mtd: fsl_elbc_nand: convert to mtd_device_register()
Convert to mtd_device_register() and remove the CONFIG_MTD_PARTITIONS
preprocessor conditionals as partitioning is always available.
Signed-off-by: Jamie Iles <jamie@jamieiles.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/nand/fsl_elbc_nand.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/mtd/nand/fsl_elbc_nand.c b/drivers/mtd/nand/fsl_elbc_nand.c index 537e380b8dcb..0bb254c7d2b1 100644 --- a/drivers/mtd/nand/fsl_elbc_nand.c +++ b/drivers/mtd/nand/fsl_elbc_nand.c | |||
@@ -841,12 +841,9 @@ static int __devinit fsl_elbc_nand_probe(struct platform_device *pdev) | |||
841 | struct fsl_elbc_mtd *priv; | 841 | struct fsl_elbc_mtd *priv; |
842 | struct resource res; | 842 | struct resource res; |
843 | struct fsl_elbc_fcm_ctrl *elbc_fcm_ctrl; | 843 | struct fsl_elbc_fcm_ctrl *elbc_fcm_ctrl; |
844 | |||
845 | #ifdef CONFIG_MTD_PARTITIONS | ||
846 | static const char *part_probe_types[] | 844 | static const char *part_probe_types[] |
847 | = { "cmdlinepart", "RedBoot", NULL }; | 845 | = { "cmdlinepart", "RedBoot", NULL }; |
848 | struct mtd_partition *parts; | 846 | struct mtd_partition *parts; |
849 | #endif | ||
850 | int ret; | 847 | int ret; |
851 | int bank; | 848 | int bank; |
852 | struct device *dev; | 849 | struct device *dev; |
@@ -935,26 +932,19 @@ static int __devinit fsl_elbc_nand_probe(struct platform_device *pdev) | |||
935 | if (ret) | 932 | if (ret) |
936 | goto err; | 933 | goto err; |
937 | 934 | ||
938 | #ifdef CONFIG_MTD_PARTITIONS | ||
939 | /* First look for RedBoot table or partitions on the command | 935 | /* First look for RedBoot table or partitions on the command |
940 | * line, these take precedence over device tree information */ | 936 | * line, these take precedence over device tree information */ |
941 | ret = parse_mtd_partitions(&priv->mtd, part_probe_types, &parts, 0); | 937 | ret = parse_mtd_partitions(&priv->mtd, part_probe_types, &parts, 0); |
942 | if (ret < 0) | 938 | if (ret < 0) |
943 | goto err; | 939 | goto err; |
944 | 940 | ||
945 | #ifdef CONFIG_MTD_OF_PARTS | ||
946 | if (ret == 0) { | 941 | if (ret == 0) { |
947 | ret = of_mtd_parse_partitions(priv->dev, node, &parts); | 942 | ret = of_mtd_parse_partitions(priv->dev, node, &parts); |
948 | if (ret < 0) | 943 | if (ret < 0) |
949 | goto err; | 944 | goto err; |
950 | } | 945 | } |
951 | #endif | ||
952 | 946 | ||
953 | if (ret > 0) | 947 | mtd_device_register(&priv->mtd, parts, ret); |
954 | add_mtd_partitions(&priv->mtd, parts, ret); | ||
955 | else | ||
956 | #endif | ||
957 | add_mtd_device(&priv->mtd); | ||
958 | 948 | ||
959 | printk(KERN_INFO "eLBC NAND device at 0x%llx, bank %d\n", | 949 | printk(KERN_INFO "eLBC NAND device at 0x%llx, bank %d\n", |
960 | (unsigned long long)res.start, priv->bank); | 950 | (unsigned long long)res.start, priv->bank); |