mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-03 09:41:54 +09:00
Input - arizona-haptics: Fix double lock of dapm_mutex
commit c4204960e9 upstream.
snd_soc_dapm_sync takes the dapm_mutex internally, but we currently take
it externally as well. This patch fixes this.
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
3079c1e6ef
commit
790cc82a2b
@@ -77,16 +77,14 @@ static void arizona_haptics_work(struct work_struct *work)
|
||||
return;
|
||||
}
|
||||
|
||||
mutex_unlock(dapm_mutex);
|
||||
|
||||
ret = snd_soc_dapm_sync(arizona->dapm);
|
||||
if (ret != 0) {
|
||||
dev_err(arizona->dev, "Failed to sync DAPM: %d\n",
|
||||
ret);
|
||||
mutex_unlock(dapm_mutex);
|
||||
return;
|
||||
}
|
||||
|
||||
mutex_unlock(dapm_mutex);
|
||||
|
||||
} else {
|
||||
/* This disable sequence will be a noop if already enabled */
|
||||
mutex_lock_nested(dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME);
|
||||
@@ -99,16 +97,15 @@ static void arizona_haptics_work(struct work_struct *work)
|
||||
return;
|
||||
}
|
||||
|
||||
mutex_unlock(dapm_mutex);
|
||||
|
||||
ret = snd_soc_dapm_sync(arizona->dapm);
|
||||
if (ret != 0) {
|
||||
dev_err(arizona->dev, "Failed to sync DAPM: %d\n",
|
||||
ret);
|
||||
mutex_unlock(dapm_mutex);
|
||||
return;
|
||||
}
|
||||
|
||||
mutex_unlock(dapm_mutex);
|
||||
|
||||
ret = regmap_update_bits(arizona->regmap,
|
||||
ARIZONA_HAPTICS_CONTROL_1,
|
||||
ARIZONA_HAP_CTRL_MASK,
|
||||
|
||||
Reference in New Issue
Block a user