[PATCH] clk: imx: clk-gpr-mux: Simplify .determine_rate()

Christophe JAILLET posted 1 patch 2 years, 7 months ago
drivers/clk/imx/clk-gpr-mux.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
[PATCH] clk: imx: clk-gpr-mux: Simplify .determine_rate()
Posted by Christophe JAILLET 2 years, 7 months ago
imx_clk_gpr_mux_determine_rate() is the same as __clk_mux_determine_rate(),
so use the latter to save some LoC.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/clk/imx/clk-gpr-mux.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/clk/imx/clk-gpr-mux.c b/drivers/clk/imx/clk-gpr-mux.c
index 0b5a97698b47..0e14b61cba84 100644
--- a/drivers/clk/imx/clk-gpr-mux.c
+++ b/drivers/clk/imx/clk-gpr-mux.c
@@ -65,16 +65,10 @@ static int imx_clk_gpr_mux_set_parent(struct clk_hw *hw, u8 index)
 	return regmap_update_bits(priv->regmap, priv->reg, priv->mask, val);
 }
 
-static int imx_clk_gpr_mux_determine_rate(struct clk_hw *hw,
-					 struct clk_rate_request *req)
-{
-	return clk_mux_determine_rate_flags(hw, req, 0);
-}
-
 static const struct clk_ops imx_clk_gpr_mux_ops = {
 	.get_parent = imx_clk_gpr_mux_get_parent,
 	.set_parent = imx_clk_gpr_mux_set_parent,
-	.determine_rate = imx_clk_gpr_mux_determine_rate,
+	.determine_rate = __clk_mux_determine_rate,
 };
 
 struct clk_hw *imx_clk_gpr_mux(const char *name, const char *compatible,
-- 
2.34.1
Re: [PATCH] clk: imx: clk-gpr-mux: Simplify .determine_rate()
Posted by Abel Vesa 2 years, 6 months ago
On Fri, 07 Jul 2023 22:02:48 +0200, Christophe JAILLET wrote:
> imx_clk_gpr_mux_determine_rate() is the same as __clk_mux_determine_rate(),
> so use the latter to save some LoC.
> 
> 

Applied, thanks!

[1/1] clk: imx: clk-gpr-mux: Simplify .determine_rate()
      commit: 2deed4cda3b76bcb8be2533f5bd07803b1bfa452

Best regards,
-- 
Abel Vesa <abel.vesa@linaro.org>
RE: [PATCH] clk: imx: clk-gpr-mux: Simplify .determine_rate()
Posted by Peng Fan 2 years, 7 months ago
> Subject: [PATCH] clk: imx: clk-gpr-mux: Simplify .determine_rate()
> 
> imx_clk_gpr_mux_determine_rate() is the same as
> __clk_mux_determine_rate(), so use the latter to save some LoC.
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

Reviewed-by: Peng Fan <peng.fan@nxp.com>