diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-07-11 09:25:23 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-07-11 09:25:23 +0200 |
| commit | 39c1b1af3ea744c1f353a44146c2eea2ad916c53 (patch) | |
| tree | 2180ec8f844d601b46439c197278a0e8745bccca /sound/soc/codecs/rt711-sdw.c | |
| parent | 2a1f94e45569b1cd9f002e65006f613c2a8360f2 (diff) | |
| parent | 32346491ddf24599decca06190ebca03ff9de7f8 (diff) | |
Merge 5.19-rc6 into staging-next
We need the staging driver fix in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound/soc/codecs/rt711-sdw.c')
| -rw-r--r-- | sound/soc/codecs/rt711-sdw.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sound/soc/codecs/rt711-sdw.c b/sound/soc/codecs/rt711-sdw.c index bda2cc9439c9..4fe68bcf2a7c 100644 --- a/sound/soc/codecs/rt711-sdw.c +++ b/sound/soc/codecs/rt711-sdw.c @@ -13,6 +13,7 @@ #include <linux/soundwire/sdw_type.h> #include <linux/soundwire/sdw_registers.h> #include <linux/module.h> +#include <linux/pm_runtime.h> #include <linux/regmap.h> #include <sound/soc.h> #include "rt711.h" @@ -464,12 +465,18 @@ static int rt711_sdw_remove(struct sdw_slave *slave) { struct rt711_priv *rt711 = dev_get_drvdata(&slave->dev); - if (rt711 && rt711->hw_init) { + if (rt711->hw_init) { cancel_delayed_work_sync(&rt711->jack_detect_work); cancel_delayed_work_sync(&rt711->jack_btn_check_work); cancel_work_sync(&rt711->calibration_work); } + if (rt711->first_hw_init) + pm_runtime_disable(&slave->dev); + + mutex_destroy(&rt711->calibrate_mutex); + mutex_destroy(&rt711->disable_irq_lock); + return 0; } |
