clk: qcom: Make common clk_hw registrations
[muen/linux.git] / drivers / clk / qcom / gcc-msm8998.c
index 3cbabbb8bd9abe699fafea8bb85bea7b7d9495f6..c240fba794c7a25b882caa3e33fbd3ff386c797a 100644 (file)
@@ -2959,6 +2959,10 @@ static const struct regmap_config gcc_msm8998_regmap_config = {
        .fast_io        = true,
 };
 
+static struct clk_hw *gcc_msm8998_hws[] = {
+       &xo.hw,
+};
+
 static const struct qcom_cc_desc gcc_msm8998_desc = {
        .config = &gcc_msm8998_regmap_config,
        .clks = gcc_msm8998_clocks,
@@ -2967,6 +2971,8 @@ static const struct qcom_cc_desc gcc_msm8998_desc = {
        .num_resets = ARRAY_SIZE(gcc_msm8998_resets),
        .gdscs = gcc_msm8998_gdscs,
        .num_gdscs = ARRAY_SIZE(gcc_msm8998_gdscs),
+       .clk_hws = gcc_msm8998_hws,
+       .num_clk_hws = ARRAY_SIZE(gcc_msm8998_hws),
 };
 
 static int gcc_msm8998_probe(struct platform_device *pdev)
@@ -2986,10 +2992,6 @@ static int gcc_msm8998_probe(struct platform_device *pdev)
        if (ret)
                return ret;
 
-       ret = devm_clk_hw_register(&pdev->dev, &xo.hw);
-       if (ret)
-               return ret;
-
        return qcom_cc_really_probe(pdev, &gcc_msm8998_desc, regmap);
 }