]> Pileus Git - ~andy/linux/blobdiff - drivers/clk/clk-mux.c
Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm
[~andy/linux] / drivers / clk / clk-mux.c
index 6e58f11ab81fcca19bdc4c9a578af78420f858fe..fd36a8ea73d9968455b7edc565975c5fa590b88f 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,15 +104,21 @@ 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;
        mux->width = width;
        mux->flags = clk_mux_flags;
        mux->lock = lock;
+       mux->hw.init = &init;
 
-       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);