[PATCH v4 1/7] clk: mediatek: use correct struct type for infrasys clocks
Julien Stephan
jstephan at baylibre.com
Fri Mar 13 13:53:03 CET 2026
Le mar. 3 mars 2026 à 20:55, David Lechner <dlechner at baylibre.com> a écrit :
>
> Fix the private data type struct type in a couple of infrasys clock
> functions.
>
> struct mtk_cg_priv is a superset of struct mtk_clk_priv and has the same
> layout at the beginning so there was no compile errors or runtime bugs.
> This could only be found by inspecting the code.
>
> Signed-off-by: David Lechner <dlechner at baylibre.com>
> ---
> drivers/clk/mediatek/clk-mtk.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/clk/mediatek/clk-mtk.c b/drivers/clk/mediatek/clk-mtk.c
> index b4de38719e1..b3f05bf5a21 100644
> --- a/drivers/clk/mediatek/clk-mtk.c
> +++ b/drivers/clk/mediatek/clk-mtk.c
> @@ -933,7 +933,7 @@ static const int mtk_infrasys_of_xlate(struct clk *clk,
>
> static int mtk_clk_infrasys_enable(struct clk *clk)
> {
> - struct mtk_cg_priv *priv = dev_get_priv(clk->dev);
> + struct mtk_clk_priv *priv = dev_get_priv(clk->dev);
> const struct mtk_gate *gate;
>
> /* MUX handling */
> @@ -946,7 +946,7 @@ static int mtk_clk_infrasys_enable(struct clk *clk)
>
> static int mtk_clk_infrasys_disable(struct clk *clk)
> {
> - struct mtk_cg_priv *priv = dev_get_priv(clk->dev);
> + struct mtk_clk_priv *priv = dev_get_priv(clk->dev);
> const struct mtk_gate *gate;
>
Hi David,
I guess we should also update priv_auto definition of mtk_clk_pericfg
in clk-mt7623.c ?
Julien
> /* MUX handling */
>
> --
> 2.43.0
>
More information about the U-Boot
mailing list