Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux
[linux-2.6-block.git] / drivers / clk / imx / clk-fixup-mux.c
index 1aa3e8d9abf3d1ce53540486f7f045b03a57f492..b569d919c64563f4ee7dc11e3343bea9d7b7cbee 100644 (file)
@@ -63,13 +63,14 @@ static const struct clk_ops clk_fixup_mux_ops = {
        .set_parent = clk_fixup_mux_set_parent,
 };
 
-struct clk *imx_clk_fixup_mux(const char *name, void __iomem *reg,
+struct clk_hw *imx_clk_hw_fixup_mux(const char *name, void __iomem *reg,
                              u8 shift, u8 width, const char * const *parents,
                              int num_parents, void (*fixup)(u32 *val))
 {
        struct clk_fixup_mux *fixup_mux;
-       struct clk *clk;
+       struct clk_hw *hw;
        struct clk_init_data init;
+       int ret;
 
        if (!fixup)
                return ERR_PTR(-EINVAL);
@@ -92,9 +93,13 @@ struct clk *imx_clk_fixup_mux(const char *name, void __iomem *reg,
        fixup_mux->ops = &clk_mux_ops;
        fixup_mux->fixup = fixup;
 
-       clk = clk_register(NULL, &fixup_mux->mux.hw);
-       if (IS_ERR(clk))
+       hw = &fixup_mux->mux.hw;
+
+       ret = clk_hw_register(NULL, hw);
+       if (ret) {
                kfree(fixup_mux);
+               return ERR_PTR(ret);
+       }
 
-       return clk;
+       return hw;
 }