mtd: Fix building when CONFIG_DM is not enabled
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
Cc Simon Glass <[email protected]>
Signed-off-by Michael Trimarchi <[email protected]>
--- include/linux/mtd/mtd.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
include/linux/mtd/mtd.h +2 -5
@@ -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