Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux
[sfrench/cifs-2.6.git] / drivers / clk / imx / clk-pfd.c
index fa82ddea4996d740f4fd7bcda6255232ec1feb26..50b7c30296f7354009fbcc06aaa43c55771bdf00 100644 (file)
@@ -121,12 +121,13 @@ static const struct clk_ops clk_pfd_ops = {
        .is_enabled     = clk_pfd_is_enabled,
 };
 
-struct clk *imx_clk_pfd(const char *name, const char *parent_name,
+struct clk_hw *imx_clk_hw_pfd(const char *name, const char *parent_name,
                        void __iomem *reg, u8 idx)
 {
        struct clk_pfd *pfd;
-       struct clk *clk;
+       struct clk_hw *hw;
        struct clk_init_data init;
+       int ret;
 
        pfd = kzalloc(sizeof(*pfd), GFP_KERNEL);
        if (!pfd)
@@ -142,10 +143,13 @@ struct clk *imx_clk_pfd(const char *name, const char *parent_name,
        init.num_parents = 1;
 
        pfd->hw.init = &init;
+       hw = &pfd->hw;
 
-       clk = clk_register(NULL, &pfd->hw);
-       if (IS_ERR(clk))
+       ret = clk_hw_register(NULL, hw);
+       if (ret) {
                kfree(pfd);
+               return ERR_PTR(ret);
+       }
 
-       return clk;
+       return hw;
 }