ASoC: wmxxxx: Revert old "ASoC: wmxxxx: Fix PM disable depth imbalance in wmxxxx_probe"
authorMark Brown <broonie@kernel.org>
Mon, 10 Oct 2022 14:33:47 +0000 (15:33 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 10 Oct 2022 14:33:47 +0000 (15:33 +0100)
Merge series from Zhang Qilong <zhangqilong3@huawei.com>:

Both the old and new patch have been applied, it will resulted in
redundant calling of pm_runtime_disable when error returns. We Just
revert the old three patches to fix it.

sound/soc/codecs/Kconfig
sound/soc/codecs/cx2072x.h
sound/soc/codecs/mt6660.c

index e3b90c425fafebbe769e8f875c42ec0af1a73d34..7022e6286e6cb8b44445b0b951d21d24bdf7a5c2 100644 (file)
@@ -1629,6 +1629,7 @@ config SND_SOC_TFA989X
 config SND_SOC_TLV320ADC3XXX
        tristate "Texas Instruments TLV320ADC3001/3101 audio ADC"
        depends on I2C
+       depends on GPIOLIB
        help
         Enable support for Texas Instruments TLV320ADC3001 and TLV320ADC3101
         ADCs.
index ebdd567fa2251686b605e2bf905b6eea84e19cc3..09e3a92b184f420205e7d3a7dd14dd633ca760a9 100644 (file)
 #define CX2072X_PLBK_DRC_PARM_LEN      9
 #define CX2072X_CLASSD_AMP_LEN         6
 
-/* DAI interfae type */
+/* DAI interface type */
 #define CX2072X_DAI_HIFI       1
 #define CX2072X_DAI_DSP                2
 #define CX2072X_DAI_DSP_PWM    3 /* 4 ch, including mic and AEC */
index 45e0df13afb9fb081638e7138efd17e7ae843f02..b8369eeccc30223f30b78fb7e7794e2f27443f1a 100644 (file)
@@ -503,14 +503,14 @@ static int mt6660_i2c_probe(struct i2c_client *client)
                dev_err(chip->dev, "read chip revision fail\n");
                goto probe_fail;
        }
+       pm_runtime_set_active(chip->dev);
+       pm_runtime_enable(chip->dev);
 
        ret = devm_snd_soc_register_component(chip->dev,
                                               &mt6660_component_driver,
                                               &mt6660_codec_dai, 1);
-       if (!ret) {
-               pm_runtime_set_active(chip->dev);
-               pm_runtime_enable(chip->dev);
-       }
+       if (ret)
+               pm_runtime_disable(chip->dev);
 
        return ret;