aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/devices/m25p80.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/devices/m25p80.c')
-rw-r--r--drivers/mtd/devices/m25p80.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index 7c3fc766dcf1..8185b1f3e5e6 100644
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -65,12 +65,6 @@
65#define FAST_READ_DUMMY_BYTE 0 65#define FAST_READ_DUMMY_BYTE 0
66#endif 66#endif
67 67
68#ifdef CONFIG_MTD_PARTITIONS
69#define mtd_has_partitions() (1)
70#else
71#define mtd_has_partitions() (0)
72#endif
73
74/****************************************************************************/ 68/****************************************************************************/
75 69
76struct m25p { 70struct m25p {
@@ -678,6 +672,8 @@ static int __devinit m25p_probe(struct spi_device *spi)
678 flash->mtd.erasesize = info->sector_size; 672 flash->mtd.erasesize = info->sector_size;
679 } 673 }
680 674
675 flash->mtd.dev.parent = &spi->dev;
676
681 dev_info(&spi->dev, "%s (%lld Kbytes)\n", info->name, 677 dev_info(&spi->dev, "%s (%lld Kbytes)\n", info->name,
682 (long long)flash->mtd.size >> 10); 678 (long long)flash->mtd.size >> 10);
683 679
@@ -708,12 +704,13 @@ static int __devinit m25p_probe(struct spi_device *spi)
708 struct mtd_partition *parts = NULL; 704 struct mtd_partition *parts = NULL;
709 int nr_parts = 0; 705 int nr_parts = 0;
710 706
711#ifdef CONFIG_MTD_CMDLINE_PARTS 707 if (mtd_has_cmdlinepart()) {
712 static const char *part_probes[] = { "cmdlinepart", NULL, }; 708 static const char *part_probes[]
709 = { "cmdlinepart", NULL, };
713 710
714 nr_parts = parse_mtd_partitions(&flash->mtd, 711 nr_parts = parse_mtd_partitions(&flash->mtd,
715 part_probes, &parts, 0); 712 part_probes, &parts, 0);
716#endif 713 }
717 714
718 if (nr_parts <= 0 && data && data->parts) { 715 if (nr_parts <= 0 && data && data->parts) {
719 parts = data->parts; 716 parts = data->parts;