diff options
author | Andres Salomon <dilinger@queued.net> | 2010-10-30 00:04:19 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2010-10-30 07:46:08 -0400 |
commit | 40847437f15221b5822ba70550e8b9fcccfb9bb3 (patch) | |
tree | 72e654f35832564b1be168fa38e9aeeffde28ef9 /drivers/mtd/devices | |
parent | 8cc9de3ebdf654601db51a516267dff89c49acc3 (diff) |
mtd: fix build error in m25p80.c
While building an x86 distro kernel, I hit the following:
Kernel: arch/x86/boot/bzImage is ready (#7)
ERROR: "of_mtd_parse_partitions" [drivers/mtd/devices/m25p80.ko]
undefined!
of_mtd_parse_partitions is defined with MTD_OF_PARTS, and that's only
built on PPC and microblaze. The code in question should be wrapped w/
a stricter #ifdef.
Signed-off-by: Andres Salomon <dilinger@queued.net>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/devices')
-rw-r--r-- | drivers/mtd/devices/m25p80.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c index 669d2b7e36bb..bf5a002209bd 100644 --- a/drivers/mtd/devices/m25p80.c +++ b/drivers/mtd/devices/m25p80.c | |||
@@ -928,7 +928,7 @@ static int __devinit m25p_probe(struct spi_device *spi) | |||
928 | nr_parts = data->nr_parts; | 928 | nr_parts = data->nr_parts; |
929 | } | 929 | } |
930 | 930 | ||
931 | #ifdef CONFIG_OF | 931 | #ifdef CONFIG_MTD_OF_PARTS |
932 | if (nr_parts <= 0 && spi->dev.of_node) { | 932 | if (nr_parts <= 0 && spi->dev.of_node) { |
933 | nr_parts = of_mtd_parse_partitions(&spi->dev, | 933 | nr_parts = of_mtd_parse_partitions(&spi->dev, |
934 | spi->dev.of_node, &parts); | 934 | spi->dev.of_node, &parts); |