Merge tag 'at91-fixes-6.1-2' of https://git.kernel.org/pub/scm/linux/kernel/git/at91...
[platform/kernel/linux-starfive.git] / drivers / clk / clk-divider.c
index f6b2bf5..a2c2b52 100644 (file)
@@ -386,13 +386,13 @@ long divider_round_rate_parent(struct clk_hw *hw, struct clk_hw *parent,
                               const struct clk_div_table *table,
                               u8 width, unsigned long flags)
 {
-       struct clk_rate_request req = {
-               .rate = rate,
-               .best_parent_rate = *prate,
-               .best_parent_hw = parent,
-       };
+       struct clk_rate_request req;
        int ret;
 
+       clk_hw_init_rate_request(hw, &req, rate);
+       req.best_parent_rate = *prate;
+       req.best_parent_hw = parent;
+
        ret = divider_determine_rate(hw, &req, table, width, flags);
        if (ret)
                return ret;
@@ -408,13 +408,13 @@ long divider_ro_round_rate_parent(struct clk_hw *hw, struct clk_hw *parent,
                                  const struct clk_div_table *table, u8 width,
                                  unsigned long flags, unsigned int val)
 {
-       struct clk_rate_request req = {
-               .rate = rate,
-               .best_parent_rate = *prate,
-               .best_parent_hw = parent,
-       };
+       struct clk_rate_request req;
        int ret;
 
+       clk_hw_init_rate_request(hw, &req, rate);
+       req.best_parent_rate = *prate;
+       req.best_parent_hw = parent;
+
        ret = divider_ro_determine_rate(hw, &req, table, width, flags, val);
        if (ret)
                return ret;