From: Kever Yang Date: Tue, 22 Oct 2019 07:39:47 +0000 (+0800) Subject: dm: core: Update log method for uclass_find_device_by_seq X-Git-Tag: v2020.01-rc2~27^2~1 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=97b5f9d1a0dcae66cf7fe5e892f6dc56d14b0c21;p=oweals%2Fu-boot.git 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 Reviewed-by: Simon Glass Move #define to top of file as per docs: Signed-off-by: Simon Glass --- diff --git a/drivers/core/uclass.c b/drivers/core/uclass.c index 36f4d1c289..c520ef113a 100644 --- a/drivers/core/uclass.c +++ b/drivers/core/uclass.c @@ -6,6 +6,8 @@ * Pavel Herrmann */ +#define LOG_CATEGORY LOGC_DM + #include #include #include @@ -303,7 +305,7 @@ int uclass_find_device_by_seq(enum uclass_id id, int seq_or_req_seq, int ret; *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) return -ENODEV; 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; 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) == seq_or_req_seq) { *devp = dev; - debug(" - found\n"); + log_debug(" - found\n"); return 0; } } - debug(" - not found\n"); + log_debug(" - not found\n"); return -ENODEV; }