diff options
| -rw-r--r-- | drivers/mtd/nand/orion_nand.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/mtd/nand/orion_nand.c b/drivers/mtd/nand/orion_nand.c index da6e75343052..7794d0680f91 100644 --- a/drivers/mtd/nand/orion_nand.c +++ b/drivers/mtd/nand/orion_nand.c | |||
| @@ -21,9 +21,7 @@ | |||
| 21 | #include <mach/hardware.h> | 21 | #include <mach/hardware.h> |
| 22 | #include <plat/orion_nand.h> | 22 | #include <plat/orion_nand.h> |
| 23 | 23 | ||
| 24 | #ifdef CONFIG_MTD_CMDLINE_PARTS | ||
| 25 | static const char *part_probes[] = { "cmdlinepart", NULL }; | 24 | static const char *part_probes[] = { "cmdlinepart", NULL }; |
| 26 | #endif | ||
| 27 | 25 | ||
| 28 | static void orion_nand_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl) | 26 | static void orion_nand_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl) |
| 29 | { | 27 | { |
| @@ -83,10 +81,8 @@ static int __init orion_nand_probe(struct platform_device *pdev) | |||
| 83 | struct resource *res; | 81 | struct resource *res; |
| 84 | void __iomem *io_base; | 82 | void __iomem *io_base; |
| 85 | int ret = 0; | 83 | int ret = 0; |
| 86 | #ifdef CONFIG_MTD_PARTITIONS | ||
| 87 | struct mtd_partition *partitions = NULL; | 84 | struct mtd_partition *partitions = NULL; |
| 88 | int num_part = 0; | 85 | int num_part = 0; |
| 89 | #endif | ||
| 90 | 86 | ||
| 91 | nc = kzalloc(sizeof(struct nand_chip) + sizeof(struct mtd_info), GFP_KERNEL); | 87 | nc = kzalloc(sizeof(struct nand_chip) + sizeof(struct mtd_info), GFP_KERNEL); |
| 92 | if (!nc) { | 88 | if (!nc) { |
| @@ -136,7 +132,6 @@ static int __init orion_nand_probe(struct platform_device *pdev) | |||
| 136 | goto no_dev; | 132 | goto no_dev; |
| 137 | } | 133 | } |
| 138 | 134 | ||
| 139 | #ifdef CONFIG_MTD_PARTITIONS | ||
| 140 | #ifdef CONFIG_MTD_CMDLINE_PARTS | 135 | #ifdef CONFIG_MTD_CMDLINE_PARTS |
| 141 | mtd->name = "orion_nand"; | 136 | mtd->name = "orion_nand"; |
| 142 | num_part = parse_mtd_partitions(mtd, part_probes, &partitions, 0); | 137 | num_part = parse_mtd_partitions(mtd, part_probes, &partitions, 0); |
| @@ -147,14 +142,7 @@ static int __init orion_nand_probe(struct platform_device *pdev) | |||
| 147 | partitions = board->parts; | 142 | partitions = board->parts; |
| 148 | } | 143 | } |
| 149 | 144 | ||
| 150 | if (partitions && num_part > 0) | 145 | ret = mtd_device_register(mtd, partitions, num_part); |
| 151 | ret = add_mtd_partitions(mtd, partitions, num_part); | ||
| 152 | else | ||
| 153 | ret = add_mtd_device(mtd); | ||
| 154 | #else | ||
| 155 | ret = add_mtd_device(mtd); | ||
| 156 | #endif | ||
| 157 | |||
| 158 | if (ret) { | 146 | if (ret) { |
| 159 | nand_release(mtd); | 147 | nand_release(mtd); |
| 160 | goto no_dev; | 148 | goto no_dev; |
