diff options
Diffstat (limited to 'drivers/mtd/nand/cmx270_nand.c')
| -rw-r--r-- | drivers/mtd/nand/cmx270_nand.c | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/drivers/mtd/nand/cmx270_nand.c b/drivers/mtd/nand/cmx270_nand.c index 6fc043a30d1e..737ef9a04fdb 100644 --- a/drivers/mtd/nand/cmx270_nand.c +++ b/drivers/mtd/nand/cmx270_nand.c | |||
| @@ -22,6 +22,7 @@ | |||
| 22 | #include <linux/mtd/partitions.h> | 22 | #include <linux/mtd/partitions.h> |
| 23 | #include <linux/slab.h> | 23 | #include <linux/slab.h> |
| 24 | #include <linux/gpio.h> | 24 | #include <linux/gpio.h> |
| 25 | #include <linux/module.h> | ||
| 25 | 26 | ||
| 26 | #include <asm/io.h> | 27 | #include <asm/io.h> |
| 27 | #include <asm/irq.h> | 28 | #include <asm/irq.h> |
| @@ -50,8 +51,6 @@ static struct mtd_partition partition_info[] = { | |||
| 50 | }; | 51 | }; |
| 51 | #define NUM_PARTITIONS (ARRAY_SIZE(partition_info)) | 52 | #define NUM_PARTITIONS (ARRAY_SIZE(partition_info)) |
| 52 | 53 | ||
| 53 | const char *part_probes[] = { "cmdlinepart", NULL }; | ||
| 54 | |||
| 55 | static u_char cmx270_read_byte(struct mtd_info *mtd) | 54 | static u_char cmx270_read_byte(struct mtd_info *mtd) |
| 56 | { | 55 | { |
| 57 | struct nand_chip *this = mtd->priv; | 56 | struct nand_chip *this = mtd->priv; |
| @@ -151,9 +150,6 @@ static int cmx270_device_ready(struct mtd_info *mtd) | |||
| 151 | static int __init cmx270_init(void) | 150 | static int __init cmx270_init(void) |
| 152 | { | 151 | { |
| 153 | struct nand_chip *this; | 152 | struct nand_chip *this; |
| 154 | const char *part_type; | ||
| 155 | struct mtd_partition *mtd_parts; | ||
| 156 | int mtd_parts_nb = 0; | ||
| 157 | int ret; | 153 | int ret; |
| 158 | 154 | ||
| 159 | if (!(machine_is_armcore() && cpu_is_pxa27x())) | 155 | if (!(machine_is_armcore() && cpu_is_pxa27x())) |
| @@ -222,23 +218,9 @@ static int __init cmx270_init(void) | |||
| 222 | goto err_scan; | 218 | goto err_scan; |
| 223 | } | 219 | } |
| 224 | 220 | ||
| 225 | #ifdef CONFIG_MTD_CMDLINE_PARTS | ||
| 226 | mtd_parts_nb = parse_mtd_partitions(cmx270_nand_mtd, part_probes, | ||
| 227 | &mtd_parts, 0); | ||
| 228 | if (mtd_parts_nb > 0) | ||
| 229 | part_type = "command line"; | ||
| 230 | else | ||
| 231 | mtd_parts_nb = 0; | ||
| 232 | #endif | ||
| 233 | if (!mtd_parts_nb) { | ||
| 234 | mtd_parts = partition_info; | ||
| 235 | mtd_parts_nb = NUM_PARTITIONS; | ||
| 236 | part_type = "static"; | ||
| 237 | } | ||
| 238 | |||
| 239 | /* Register the partitions */ | 221 | /* Register the partitions */ |
| 240 | pr_notice("Using %s partition definition\n", part_type); | 222 | ret = mtd_device_parse_register(cmx270_nand_mtd, NULL, 0, |
| 241 | ret = mtd_device_register(cmx270_nand_mtd, mtd_parts, mtd_parts_nb); | 223 | partition_info, NUM_PARTITIONS); |
| 242 | if (ret) | 224 | if (ret) |
| 243 | goto err_scan; | 225 | goto err_scan; |
| 244 | 226 | ||
