struct mutex lock;
const struct mtk_auxadc_compatible *dev_comp;
};
-@@ -222,6 +223,12 @@ static int __maybe_unused mt6577_auxadc_
+@@ -222,6 +223,14 @@ static int __maybe_unused mt6577_auxadc_
return ret;
}
-+ ret = clk_prepare_enable(adc_dev->adc_32k_clk);
-+ if (ret) {
-+ pr_err("failed to enable auxadc clock\n");
-+ return ret;
++ if (!IS_ERR(adc_dev->adc_32k_clk)) {
++ ret = clk_prepare_enable(adc_dev->adc_32k_clk);
++ if (ret) {
++ pr_err("failed to enable auxadc clock\n");
++ return ret;
++ }
+ }
+
mt6577_auxadc_mod_reg(adc_dev->reg_base + MT6577_AUXADC_MISC,