diff options
author | Neil Armstrong <neil.armstrong@linaro.org> | 2023-06-12 11:57:19 +0200 |
---|---|---|
committer | Jerome Brunet <jbrunet@baylibre.com> | 2023-08-08 16:06:16 +0200 |
commit | 141fbc272b0406265d56db696e8051671dde0bf8 (patch) | |
tree | acf7f0625024d72e66a37580e886e9cad7930774 /drivers/clk/meson/gxbb.h | |
parent | clk: meson: introduce meson-clkc-utils (diff) | |
download | linux-141fbc272b0406265d56db696e8051671dde0bf8.tar.xz linux-141fbc272b0406265d56db696e8051671dde0bf8.zip |
clk: meson: migrate meson-eeclk out of hw_onecell_data to drop NR_CLKS
The way hw_onecell_data is declared:
struct clk_hw_onecell_data {
unsigned int num;
struct clk_hw *hws[];
};
makes it impossible to have the clk_hw table declared outside while
using ARRAY_SIZE() to determine ".num" due to ".hws" being a flexible
array member.
Completely move out of hw_onecell_data and add a custom
devm_of_clk_add_hw_provider() "get" callback to retrieve the clk_hw
from the meson_eeclkc_data struct to finally get rid on the
NR_CLKS define.
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20230607-topic-amlogic-upstream-clkid-public-migration-v2-2-38172d17c27a@linaro.org
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Diffstat (limited to 'drivers/clk/meson/gxbb.h')
-rw-r--r-- | drivers/clk/meson/gxbb.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/clk/meson/gxbb.h b/drivers/clk/meson/gxbb.h index 1ee8cb7e2f5a..6751cda25986 100644 --- a/drivers/clk/meson/gxbb.h +++ b/drivers/clk/meson/gxbb.h @@ -188,8 +188,6 @@ #define CLKID_HDMI_SEL 203 #define CLKID_HDMI_DIV 204 -#define NR_CLKS 207 - /* include the CLKIDs that have been made part of the DT binding */ #include <dt-bindings/clock/gxbb-clkc.h> |