diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2015-08-11 01:09:43 +0900 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-08-31 07:56:44 -0600 |
commit | 71f1e3f19d26c7956de5c37035478fcaa9e979e7 (patch) | |
tree | 743c22490ef1225c13fcde7e4f968daaeb396d7e /include/dm/uclass.h | |
parent | f875bbb49111c308b90b9ca74d1b79f69498b278 (diff) |
dm: simplify uclass_foreach_dev() implementation
This can be simply written with list_for_each_entry(), maybe
this macro was not necessary in the first place.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/dm/uclass.h')
-rw-r--r-- | include/dm/uclass.h | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/include/dm/uclass.h b/include/dm/uclass.h index d56877c898..d214b88734 100644 --- a/include/dm/uclass.h +++ b/include/dm/uclass.h @@ -240,12 +240,7 @@ int uclass_resolve_seq(struct udevice *dev); * are no more devices. * @uc: uclass to scan */ -#define uclass_foreach_dev(pos, uc) \ - for (pos = list_entry((&(uc)->dev_head)->next, typeof(*pos), \ - uclass_node); \ - prefetch(pos->uclass_node.next), \ - &pos->uclass_node != (&(uc)->dev_head); \ - pos = list_entry(pos->uclass_node.next, typeof(*pos), \ - uclass_node)) +#define uclass_foreach_dev(pos, uc) \ + list_for_each_entry(pos, &uc->dev_head, uclass_node) #endif |