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

Remove dev->name as it is already displayed by dev macro.

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

index 79d55e812db985adcaa4d9e3ee8f5926ba4aa5d4..7184db3c527cb839490a1c69065e7ee689c665ab 100644 (file)
@@ -4,6 +4,8 @@
  * Author(s): Vikas Manocha, <vikas.manocha@st.com> for STMicroelectronics.
  */
 
+#define LOG_CATEGORY UCLASS_GPIO
+
 #include <common.h>
 #include <clk.h>
 #include <dm.h>
@@ -331,7 +333,7 @@ static int gpio_stm32_probe(struct udevice *dev)
                dev_err(dev, "failed to enable clock\n");
                return ret;
        }
-       debug("clock enabled for device %s\n", dev->name);
+       dev_dbg(dev, "clock enabled\n");
 
        return 0;
 }