]> git.sur5r.net Git - u-boot/commitdiff
dm: clk: add missing .priv_auto_alloc_size() for stm32f7
authorPatrice Chotard <patrice.chotard@st.com>
Thu, 21 Sep 2017 08:08:09 +0000 (10:08 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 29 Sep 2017 18:07:57 +0000 (14:07 -0400)
Add missing .priv_auto_alloc_size() callback.
Previously private struct stm32_clk was not allocate
which leads to unpredictable behaviour

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/clk/clk_stm32f7.c

index 255a583c954586805a961e69caf16f6648124299..68d6ba0461d7bfbd8d06c88e95112e05ad4f2246 100644 (file)
@@ -310,10 +310,11 @@ static const struct udevice_id stm32_clk_ids[] = {
 };
 
 U_BOOT_DRIVER(stm32f7_clk) = {
-       .name           = "stm32f7_clk",
-       .id             = UCLASS_CLK,
-       .of_match       = stm32_clk_ids,
-       .ops            = &stm32_clk_ops,
-       .probe          = stm32_clk_probe,
-       .flags          = DM_FLAG_PRE_RELOC,
+       .name                   = "stm32f7_clk",
+       .id                     = UCLASS_CLK,
+       .of_match               = stm32_clk_ids,
+       .ops                    = &stm32_clk_ops,
+       .probe                  = stm32_clk_probe,
+       .priv_auto_alloc_size   = sizeof(struct stm32_clk),
+       .flags                  = DM_FLAG_PRE_RELOC,
 };