]> git.ipfire.org Git - thirdparty/u-boot.git/commit
clk: mediatek: mt7623: set unmapped IDs to -1
authorDavid Lechner <dlechner@baylibre.com>
Wed, 7 Jan 2026 15:50:17 +0000 (09:50 -0600)
committerTom Rini <trini@konsulko.com>
Mon, 12 Jan 2026 19:14:02 +0000 (13:14 -0600)
commiteb2bf2bc832d34440204ad90795ca7475ede4402
tree0f3a86c9cbd4735d99c9f2c9a6eb8c560de12a52
parentcc1a458a3d315bd94ed2b5faf7e74baf8f667d9b
clk: mediatek: mt7623: set unmapped IDs to -1

Add range initializers to the id_offs_map arrays in the mt7623 clk
driver to set unmapped IDs to -1. This prevents accidental usage of
unmapped IDs that would otherwise map to 0.

mtk_common_clk_of_xlate() checks these values for < 0 and returns
-ENOENT in that case.

A range initializer covering the entire array is used since it is less
error-prone than manually looking up the value of each macro in the
existing initializers and checking for gaps. It is placed first so that
the specific initializers override it.

Signed-off-by: David Lechner <dlechner@baylibre.com>
drivers/clk/mediatek/clk-mt7623.c