Patch "clk: divider: fix initialization with parent_hw" has been added to the 5.11-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    clk: divider: fix initialization with parent_hw

to the 5.11-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     clk-divider-fix-initialization-with-parent_hw.patch
and it can be found in the queue-5.11 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 53ebfc6800c29bccbf3aa3b8a54e239dfa76f5b1
Author: Michael Tretter <m.tretter@xxxxxxxxxxxxxx>
Date:   Thu Jan 21 08:16:46 2021 +0100

    clk: divider: fix initialization with parent_hw
    
    [ Upstream commit 0225daea08141b1dff681502d5af70b71e8b11ec ]
    
    If a driver registers a divider clock with a parent_hw instead of the
    parent_name, the parent_hw is ignored and the clock does not have a
    parent.
    
    Fix this by initializing the parents the same way they are initialized
    for clock gates.
    
    Fixes: ff258817137a ("clk: divider: Add support for specifying parents via DT/pointers")
    Signed-off-by: Michael Tretter <m.tretter@xxxxxxxxxxxxxx>
    Reviewed-by: Stephen Boyd <sboyd@xxxxxxxxxx>
    Acked-by: Michal Simek <michal.simek@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20210121071659.1226489-3-m.tretter@xxxxxxxxxxxxxx
    Signed-off-by: Stephen Boyd <sboyd@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/clk/clk-divider.c b/drivers/clk/clk-divider.c
index c499799693ccc..344997203f0e7 100644
--- a/drivers/clk/clk-divider.c
+++ b/drivers/clk/clk-divider.c
@@ -494,8 +494,13 @@ struct clk_hw *__clk_hw_register_divider(struct device *dev,
 	else
 		init.ops = &clk_divider_ops;
 	init.flags = flags;
-	init.parent_names = (parent_name ? &parent_name: NULL);
-	init.num_parents = (parent_name ? 1 : 0);
+	init.parent_names = parent_name ? &parent_name : NULL;
+	init.parent_hws = parent_hw ? &parent_hw : NULL;
+	init.parent_data = parent_data;
+	if (parent_name || parent_hw || parent_data)
+		init.num_parents = 1;
+	else
+		init.num_parents = 0;
 
 	/* struct clk_divider assignments */
 	div->reg = reg;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux