[U-Boot] [PATCH 1/1] dm: clk: add missing .priv_auto_alloc_size() for stm32f7

patrice.chotard at st.com patrice.chotard at st.com
Thu Sep 21 08:08:09 UTC 2017


From: Patrice Chotard <patrice.chotard at st.com>

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 at st.com>
---
 drivers/clk/clk_stm32f7.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/clk/clk_stm32f7.c b/drivers/clk/clk_stm32f7.c
index 7d1e1e8..aa4ad0a 100644
--- a/drivers/clk/clk_stm32f7.c
+++ b/drivers/clk/clk_stm32f7.c
@@ -393,10 +393,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,
 };
-- 
1.9.1



More information about the U-Boot mailing list