mtd: provide of_mtd_parse_partitions for !CONFIG_MTD_OF_PARTS
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Tue May 24 21:59:07 EDT 2011
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=11b73c8b10e58ae90c12e51be5531007e86a9c66
Commit: 11b73c8b10e58ae90c12e51be5531007e86a9c66
Parent: f5671ab3f67a10f7234de21464391c20c1ef8ebb
Author: Jamie Iles <jamie at jamieiles.com>
AuthorDate: Mon May 23 10:22:44 2011 +0100
Committer: David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Wed May 25 02:12:51 2011 +0100
mtd: provide of_mtd_parse_partitions for !CONFIG_MTD_OF_PARTS
If we don't have OpenFirmware enabled then provide a stub
of_mtd_parse_partitions that returns no partitions so drivers don't need
ifdeffery inside.
Signed-off-by: Jamie Iles <jamie at jamieiles.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy at nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
include/linux/mtd/partitions.h | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/include/linux/mtd/partitions.h b/include/linux/mtd/partitions.h
index 998a6cf..afe32db 100644
--- a/include/linux/mtd/partitions.h
+++ b/include/linux/mtd/partitions.h
@@ -73,9 +73,18 @@ extern int parse_mtd_partitions(struct mtd_info *master, const char **types,
struct device;
struct device_node;
+#ifdef CONFIG_MTD_OF_PARTS
int __devinit of_mtd_parse_partitions(struct device *dev,
struct device_node *node,
struct mtd_partition **pparts);
+#else
+static inline int of_mtd_parse_partitions(struct device *dev,
+ struct device_node *node,
+ struct mtd_partition **pparts)
+{
+ return 0;
+}
+#endif
#ifdef CONFIG_MTD_PARTITIONS
static inline int mtd_has_partitions(void) { return 1; }
More information about the linux-mtd-cvs
mailing list