mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 19:11:53 +00:00
dm: core: Update log method for uclass_find_device_by_seq
Use log() insted of debug() for uclass_find_device_by_seq function, since this print is very much and we can filter it out with log() interface. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Simon Glass <sjg@chromium.org> Move #define to top of file as per docs: Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
8ab452d587
commit
97b5f9d1a0
1 changed files with 7 additions and 4 deletions
|
@ -6,6 +6,8 @@
|
||||||
* Pavel Herrmann <morpheus.ibis@gmail.com>
|
* Pavel Herrmann <morpheus.ibis@gmail.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define LOG_CATEGORY LOGC_DM
|
||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
#include <dm.h>
|
#include <dm.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
@ -303,7 +305,7 @@ int uclass_find_device_by_seq(enum uclass_id id, int seq_or_req_seq,
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
*devp = NULL;
|
*devp = NULL;
|
||||||
debug("%s: %d %d\n", __func__, find_req_seq, seq_or_req_seq);
|
log_debug("%d %d\n", find_req_seq, seq_or_req_seq);
|
||||||
if (seq_or_req_seq == -1)
|
if (seq_or_req_seq == -1)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
ret = uclass_get(id, &uc);
|
ret = uclass_get(id, &uc);
|
||||||
|
@ -311,15 +313,16 @@ int uclass_find_device_by_seq(enum uclass_id id, int seq_or_req_seq,
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
uclass_foreach_dev(dev, uc) {
|
uclass_foreach_dev(dev, uc) {
|
||||||
debug(" - %d %d '%s'\n", dev->req_seq, dev->seq, dev->name);
|
log_debug(" - %d %d '%s'\n",
|
||||||
|
dev->req_seq, dev->seq, dev->name);
|
||||||
if ((find_req_seq ? dev->req_seq : dev->seq) ==
|
if ((find_req_seq ? dev->req_seq : dev->seq) ==
|
||||||
seq_or_req_seq) {
|
seq_or_req_seq) {
|
||||||
*devp = dev;
|
*devp = dev;
|
||||||
debug(" - found\n");
|
log_debug(" - found\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
debug(" - not found\n");
|
log_debug(" - not found\n");
|
||||||
|
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue