aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJamie Iles <jamie@jamieiles.com>2011-05-23 05:22:44 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2011-05-24 21:12:51 -0400
commit11b73c8b10e58ae90c12e51be5531007e86a9c66 (patch)
tree7214da9513f57b6c8924e243b53cb86ea9e486c4 /include
parentf5671ab3f67a10f7234de21464391c20c1ef8ebb (diff)
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@jamieiles.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mtd/partitions.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/mtd/partitions.h b/include/linux/mtd/partitions.h
index 998a6cf35167..afe32db14a87 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,
73struct device; 73struct device;
74struct device_node; 74struct device_node;
75 75
76#ifdef CONFIG_MTD_OF_PARTS
76int __devinit of_mtd_parse_partitions(struct device *dev, 77int __devinit of_mtd_parse_partitions(struct device *dev,
77 struct device_node *node, 78 struct device_node *node,
78 struct mtd_partition **pparts); 79 struct mtd_partition **pparts);
80#else
81static inline int of_mtd_parse_partitions(struct device *dev,
82 struct device_node *node,
83 struct mtd_partition **pparts)
84{
85 return 0;
86}
87#endif
79 88
80#ifdef CONFIG_MTD_PARTITIONS 89#ifdef CONFIG_MTD_PARTITIONS
81static inline int mtd_has_partitions(void) { return 1; } 90static inline int mtd_has_partitions(void) { return 1; }