From 1805bfcad0869da67939af9be44fcb343965d621 Mon Sep 17 00:00:00 2001 From: Jeroen Hofstee Date: Tue, 10 Jun 2014 23:52:36 +0200 Subject: [PATCH 1/2] include/dm.h: fix inclusion guard cc: Simon Glass Signed-off-by: Jeroen Hofstee Acked-by: Simon Glass --- include/dm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/dm.h b/include/dm.h index 8bbb21b575..a179c8a6e3 100644 --- a/include/dm.h +++ b/include/dm.h @@ -5,7 +5,7 @@ */ #ifndef _DM_H_ -#define _DM_H +#define _DM_H_ #include #include From 4af5b1445c2c17b72f515134d510d37e05a344f1 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 24 May 2014 15:21:07 -0600 Subject: [PATCH 2/2] dm: Use '*' to indicate a device is activated Make both dm enumeration commands support showing whether a driver is active or not, and use a consistent indicator (an asterisk). Signed-off-by: Simon Glass Acked-by: Marek Vasut --- test/dm/cmd_dm.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/test/dm/cmd_dm.c b/test/dm/cmd_dm.c index aa8122c005..96f10f3b1d 100644 --- a/test/dm/cmd_dm.c +++ b/test/dm/cmd_dm.c @@ -23,9 +23,9 @@ static int display_succ(struct udevice *in, char *buf) char local[16]; struct udevice *pos, *n, *prev = NULL; - printf("%s- %s @ %08lx", buf, in->name, (ulong)map_to_sysmem(in)); - if (in->flags & DM_FLAG_ACTIVATED) - puts(" - activated"); + printf("%s- %c %s @ %08lx", buf, + in->flags & DM_FLAG_ACTIVATED ? '*' : ' ', + in->name, (ulong)map_to_sysmem(in)); puts("\n"); if (list_empty(&in->child_head)) @@ -84,8 +84,9 @@ static int do_dm_dump_uclass(cmd_tbl_t *cmdtp, int flag, int argc, for (ret = uclass_first_device(id, &dev); dev; ret = uclass_next_device(&dev)) { - printf(" %s @ %08lx:\n", dev->name, - (ulong)map_to_sysmem(dev)); + printf(" %c %s @ %08lx:\n", + dev->flags & DM_FLAG_ACTIVATED ? '*' : ' ', + dev->name, (ulong)map_to_sysmem(dev)); } puts("\n"); }