From: Jamie Iles Date: Mon, 23 May 2011 09:22:44 +0000 (+0100) Subject: mtd: provide of_mtd_parse_partitions for !CONFIG_MTD_OF_PARTS X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=11b73c8b10e58ae90c12e51be5531007e86a9c66;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Artem Bityutskiy Signed-off-by: David Woodhouse --- 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, 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; }