Skip to contentSkip to conversation

mtd: Fix building when CONFIG_DM is not enabled

RFC PATCH New Michael Trimarchi 1 participant 1 message Jul 19, 2022 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 mtd: Fix building when CONFIG_DM is not enabled

I really don't find any consumer of those functions in uboot. You can only verify if you include nand.h it in no-dm build

include/linux/mtd/nand.h: In function 'nanddev_set_ofnode':
+include/linux/mtd/nand.h:426:9: error: implicit declaration of function 'mtd_set_ofnode'; did you mean 'mtd_set_of_node'? [-Werror=implicit-function-declaration]

+  426 |         mtd_set_ofnode(nand->mtd, node);
+      |         ^~~~~~~~~~~~~~
+      |         mtd_set_of_node

+cc1: all warnings being treated as errors

---
 include/linux/mtd/mtd.h | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
include/linux/mtd/mtd.h +2 -5
index ff635bd716..6c096ae665 100644
@@ -343,14 +343,11 @@ static inline const ofnode mtd_get_ofnode(struct mtd_info *mtd)
 	return dev_ofnode(mtd->dev);
 }
 #else
-struct device_node;
-
-static inline void mtd_set_of_node(struct mtd_info *mtd,
-				   const struct device_node *np)
+static inline void mtd_set_ofnode(struct mtd_info *mtd, ofnode node)
 {
 }
 
-static inline const struct device_node *mtd_get_of_node(struct mtd_info *mtd)
+static inline const ofnode *mtd_get_ofnode(struct mtd_info *mtd)
 {
 	return NULL;
 }
Signature · 1 line
2.34.1