aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorIgor Prusov2023-11-09 13:55:12 +0300
committerSean Anderson2023-12-15 12:33:09 -0500
commit4f48202ba82ee336ee9cc1bd12fb2fca8661d5ec (patch)
tree654491982a19ee2144651e64d06ef6060e35022f /drivers
parent77beaad3d1d2e72d7392797ca9e237257e22332c (diff)
clk: amlogic: Move driver and ops structs
Move driver and ops structs to avoid forward declaration after switching to dump in clk_ops. Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Igor Prusov <ivprusov@sberdevices.ru> Link: https://lore.kernel.org/r/20231109105516.24892-5-ivprusov@sberdevices.ru
Diffstat (limited to 'drivers')
-rw-r--r--drivers/clk/meson/a1.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/clk/meson/a1.c b/drivers/clk/meson/a1.c
index d0f5bb37530..c91357ec27b 100644
--- a/drivers/clk/meson/a1.c
+++ b/drivers/clk/meson/a1.c
@@ -607,14 +607,6 @@ static int meson_clk_set_parent(struct clk *clk, struct clk *parent_clk)
return meson_mux_set_parent_by_id(clk, parent_clk->id);
}
-static struct clk_ops meson_clk_ops = {
- .disable = meson_clk_disable,
- .enable = meson_clk_enable,
- .get_rate = meson_clk_get_rate,
- .set_rate = meson_clk_set_rate,
- .set_parent = meson_clk_set_parent,
-};
-
static int meson_clk_probe(struct udevice *dev)
{
struct meson_clk *priv = dev_get_priv(dev);
@@ -644,15 +636,6 @@ static const struct udevice_id meson_clk_ids[] = {
{ }
};
-U_BOOT_DRIVER(meson_clk) = {
- .name = "meson-clk-a1",
- .id = UCLASS_CLK,
- .of_match = meson_clk_ids,
- .priv_auto = sizeof(struct meson_clk),
- .ops = &meson_clk_ops,
- .probe = meson_clk_probe,
-};
-
static const char *meson_clk_get_name(struct clk *clk, int id)
{
const struct meson_clk_info *info;
@@ -733,3 +716,20 @@ int soc_clk_dump(void)
return 0;
}
+
+static struct clk_ops meson_clk_ops = {
+ .disable = meson_clk_disable,
+ .enable = meson_clk_enable,
+ .get_rate = meson_clk_get_rate,
+ .set_rate = meson_clk_set_rate,
+ .set_parent = meson_clk_set_parent,
+};
+
+U_BOOT_DRIVER(meson_clk) = {
+ .name = "meson-clk-a1",
+ .id = UCLASS_CLK,
+ .of_match = meson_clk_ids,
+ .priv_auto = sizeof(struct meson_clk),
+ .ops = &meson_clk_ops,
+ .probe = meson_clk_probe,
+};