]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/clk/clk-mux.c
clk: Use a separate struct for holding init data.
[mirror_ubuntu-bionic-kernel.git] / drivers / clk / clk-mux.c
index 6e58f11ab81fcca19bdc4c9a578af78420f858fe..8e97491902e77e3238ef6f1b68b929e098e569ce 100644 (file)
@@ -95,6 +95,7 @@ struct clk *clk_register_mux(struct device *dev, const char *name,
 {
        struct clk_mux *mux;
        struct clk *clk;
+       struct clk_init_data init;
 
        /* allocate the mux */
        mux = kzalloc(sizeof(struct clk_mux), GFP_KERNEL);
@@ -103,6 +104,12 @@ struct clk *clk_register_mux(struct device *dev, const char *name,
                return ERR_PTR(-ENOMEM);
        }
 
+       init.name = name;
+       init.ops = &clk_mux_ops;
+       init.flags = flags;
+       init.parent_names = parent_names;
+       init.num_parents = num_parents;
+
        /* struct clk_mux assignments */
        mux->reg = reg;
        mux->shift = shift;
@@ -110,8 +117,7 @@ struct clk *clk_register_mux(struct device *dev, const char *name,
        mux->flags = clk_mux_flags;
        mux->lock = lock;
 
-       clk = clk_register(dev, name, &clk_mux_ops, &mux->hw,
-                       parent_names, num_parents, flags);
+       clk = clk_register(dev, &mux->hw);
 
        if (IS_ERR(clk))
                kfree(mux);