Re: [U-Boot] [PATCH v3 16/29] dm: Avoid activating devices in 'dm uclass' command

2014-07-26 Thread Simon Glass
On 23 July 2014 13:55, Simon Glass  wrote:
> This command currently activates devices as it lists them. This is not
> desirable since it changes the system state. Fix it and avoid printing
> a newline if there are no devices in a uclass.
>
> Signed-off-by: Simon Glass 

Applied to dm/master.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v3 16/29] dm: Avoid activating devices in 'dm uclass' command

2014-07-23 Thread Simon Glass
This command currently activates devices as it lists them. This is not
desirable since it changes the system state. Fix it and avoid printing
a newline if there are no devices in a uclass.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 test/dm/cmd_dm.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/test/dm/cmd_dm.c b/test/dm/cmd_dm.c
index 9b77a7f..93e5255 100644
--- a/test/dm/cmd_dm.c
+++ b/test/dm/cmd_dm.c
@@ -94,9 +94,9 @@ static int do_dm_dump_uclass(cmd_tbl_t *cmdtp, int flag, int 
argc,
continue;
 
printf("uclass %d: %s\n", id, uc->uc_drv->name);
-   for (ret = uclass_first_device(id, &dev);
-dev;
-ret = uclass_next_device(&dev)) {
+   if (list_empty(&uc->dev_head))
+   continue;
+   list_for_each_entry(dev, &uc->dev_head, uclass_node) {
dm_display_line(dev, "");
}
puts("\n");
-- 
2.0.0.526.g5318336

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot