In rt5682 codec driver, a mutex called "calibrate_mutex" is used
in rt5682_calibrate() before initialization, which causes warning
in lock debug. Move the initialization before the usage of mutex.
Signed-off-by: Xun Zhang <xun2.zhang@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
rt5682_reset(rt5682->regmap);
+ mutex_init(&rt5682->calibrate_mutex);
rt5682_calibrate(rt5682);
ret = regmap_multi_reg_write(rt5682->regmap, patch_list,
INIT_DELAYED_WORK(&rt5682->jd_check_work,
rt5682_jd_check_handler);
- mutex_init(&rt5682->calibrate_mutex);
if (i2c->irq) {
ret = devm_request_threaded_irq(&i2c->dev, i2c->irq, NULL,