[PATCH 1/1] cmd: mtd: simplify mtd_show_device()

Heinrich Schuchardt heinrich.schuchardt at canonical.com
Tue Sep 10 01:23:34 CEST 2024


CONFIG_DM=y is always true.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
---
 cmd/mtd.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/cmd/mtd.c b/cmd/mtd.c
index 795aaa2b37d..260b26076ed 100644
--- a/cmd/mtd.c
+++ b/cmd/mtd.c
@@ -121,13 +121,11 @@ static void mtd_show_device(struct mtd_info *mtd)
 {
 	/* Device */
 	printf("* %s\n", mtd->name);
-#if defined(CONFIG_DM)
 	if (mtd->dev) {
 		printf("  - device: %s\n", mtd->dev->name);
 		printf("  - parent: %s\n", mtd->dev->parent->name);
 		printf("  - driver: %s\n", mtd->dev->driver->name);
 	}
-#endif
 	if (IS_ENABLED(CONFIG_OF_CONTROL) && mtd->dev) {
 		char buf[256];
 		int res;
-- 
2.45.2



More information about the U-Boot mailing list