diff options
Diffstat (limited to 'drivers/mtd/devices/mtd_dataflash.c')
-rw-r--r-- | drivers/mtd/devices/mtd_dataflash.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/mtd/devices/mtd_dataflash.c b/drivers/mtd/devices/mtd_dataflash.c index 6d9f810565c8..62dee54af0a5 100644 --- a/drivers/mtd/devices/mtd_dataflash.c +++ b/drivers/mtd/devices/mtd_dataflash.c | |||
@@ -98,12 +98,6 @@ struct dataflash { | |||
98 | struct mtd_info mtd; | 98 | struct mtd_info mtd; |
99 | }; | 99 | }; |
100 | 100 | ||
101 | #ifdef CONFIG_MTD_PARTITIONS | ||
102 | #define mtd_has_partitions() (1) | ||
103 | #else | ||
104 | #define mtd_has_partitions() (0) | ||
105 | #endif | ||
106 | |||
107 | /* ......................................................................... */ | 101 | /* ......................................................................... */ |
108 | 102 | ||
109 | /* | 103 | /* |
@@ -670,6 +664,8 @@ add_dataflash_otp(struct spi_device *spi, char *name, | |||
670 | device->write = dataflash_write; | 664 | device->write = dataflash_write; |
671 | device->priv = priv; | 665 | device->priv = priv; |
672 | 666 | ||
667 | device->dev.parent = &spi->dev; | ||
668 | |||
673 | if (revision >= 'c') | 669 | if (revision >= 'c') |
674 | otp_tag = otp_setup(device, revision); | 670 | otp_tag = otp_setup(device, revision); |
675 | 671 | ||
@@ -682,11 +678,13 @@ add_dataflash_otp(struct spi_device *spi, char *name, | |||
682 | struct mtd_partition *parts; | 678 | struct mtd_partition *parts; |
683 | int nr_parts = 0; | 679 | int nr_parts = 0; |
684 | 680 | ||
685 | #ifdef CONFIG_MTD_CMDLINE_PARTS | 681 | if (mtd_has_cmdlinepart()) { |
686 | static const char *part_probes[] = { "cmdlinepart", NULL, }; | 682 | static const char *part_probes[] |
683 | = { "cmdlinepart", NULL, }; | ||
687 | 684 | ||
688 | nr_parts = parse_mtd_partitions(device, part_probes, &parts, 0); | 685 | nr_parts = parse_mtd_partitions(device, |
689 | #endif | 686 | part_probes, &parts, 0); |
687 | } | ||
690 | 688 | ||
691 | if (nr_parts <= 0 && pdata && pdata->parts) { | 689 | if (nr_parts <= 0 && pdata && pdata->parts) { |
692 | parts = pdata->parts; | 690 | parts = pdata->parts; |