]> git.ipfire.org Git - thirdparty/u-boot.git/commit
clk: mediatek: add array size fields to cg gates
authorDavid Lechner <dlechner@baylibre.com>
Wed, 7 Jan 2026 15:50:12 +0000 (09:50 -0600)
committerTom Rini <trini@konsulko.com>
Mon, 12 Jan 2026 19:14:02 +0000 (13:14 -0600)
commit538f72f4038652be5bbb907f23fbc74dad682a19
tree8c87999a0b7a49a776d235eb6dfd3e4495237938
parent3d54f47ae50b737e4f577ab2d41df51f67e975ed
clk: mediatek: add array size fields to cg gates

Add num_gates field to struct mtk_cg_priv and populate it for all
existing drivers.

Currently, there is no bounds checking when accessing the gates array.
Adding this field will allow for bounds checking in the future.

Signed-off-by: David Lechner <dlechner@baylibre.com>
15 files changed:
drivers/clk/mediatek/clk-mt7622.c
drivers/clk/mediatek/clk-mt7623.c
drivers/clk/mediatek/clk-mt7629.c
drivers/clk/mediatek/clk-mt7981.c
drivers/clk/mediatek/clk-mt7986.c
drivers/clk/mediatek/clk-mt7987.c
drivers/clk/mediatek/clk-mt7988.c
drivers/clk/mediatek/clk-mt8183.c
drivers/clk/mediatek/clk-mt8188.c
drivers/clk/mediatek/clk-mt8365.c
drivers/clk/mediatek/clk-mt8512.c
drivers/clk/mediatek/clk-mt8516.c
drivers/clk/mediatek/clk-mt8518.c
drivers/clk/mediatek/clk-mtk.c
drivers/clk/mediatek/clk-mtk.h