]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
misc: rcc: migrate trace to dev macro
authorPatrick Delaunay <patrick.delaunay@st.com>
Fri, 6 Nov 2020 18:01:43 +0000 (19:01 +0100)
committerPatrick Delaunay <patrick.delaunay@foss.st.com>
Wed, 13 Jan 2021 08:52:58 +0000 (09:52 +0100)
Change debug and pr_err to dev macro and define LOG_CATEGORY.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
drivers/misc/stm32_rcc.c

index 86275454be03fe05e157fa07bf23312a3d8d0cc5..4625e91396fd0c6b3e3b80c070f2a2280fbf992a 100644 (file)
@@ -4,6 +4,8 @@
  * Author(s): Patrice Chotard, <patrice.chotard@foss.st.com> for STMicroelectronics.
  */
 
+#define LOG_CATEGORY UCLASS_NOP
+
 #include <common.h>
 #include <dm.h>
 #include <log.h>
@@ -45,10 +47,10 @@ static int stm32_rcc_bind(struct udevice *dev)
                (struct stm32_rcc_clk *)dev_get_driver_data(dev);
        int ret;
 
-       debug("%s(dev=%p)\n", __func__, dev);
+       dev_dbg(dev, "RCC bind\n");
        drv = lists_driver_lookup_name(rcc_clk->drv_name);
        if (!drv) {
-               debug("Cannot find driver '%s'\n", rcc_clk->drv_name);
+               dev_err(dev, "Cannot find driver '%s'\n", rcc_clk->drv_name);
                return -ENOENT;
        }