* [RFC PATCH] mtd: Fix building when CONFIG_DM is not enabled
@ 2022-07-19 19:43 Michael Trimarchi
0 siblings, 0 replies; only message in thread
From: Michael Trimarchi @ 2022-07-19 19:43 UTC (permalink / raw)
To: Marek Behún, Patrice Chotard, open list; +Cc: Simon Glass, open list
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 <sjg@chromium.org>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
---
include/linux/mtd/mtd.h | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index ff635bd716..6c096ae665 100644
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -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;
}
--
2.34.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-07-19 19:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-19 19:43 [RFC PATCH] mtd: Fix building when CONFIG_DM is not enabled Michael Trimarchi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox