All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: codecs: rt5682: initialize mutex before using
@ 2019-04-19 20:53 Pierre-Louis Bossart
  2019-04-25 19:24 ` Applied "ASoC: codecs: rt5682: initialize mutex before using" to the asoc tree Mark Brown
  2019-04-25 19:26 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Pierre-Louis Bossart @ 2019-04-19 20:53 UTC (permalink / raw)
  To: alsa-devel
  Cc: Oder Chiou, Xun Zhang, tiwai, Pierre-Louis Bossart, broonie, Bard liao

From: Xun Zhang <xun2.zhang@intel.com>

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>
---
 sound/soc/codecs/rt5682.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/rt5682.c b/sound/soc/codecs/rt5682.c
index 86a7fa31c294..505fb3d7b1c5 100644
--- a/sound/soc/codecs/rt5682.c
+++ b/sound/soc/codecs/rt5682.c
@@ -2588,6 +2588,7 @@ static int rt5682_i2c_probe(struct i2c_client *i2c,
 
 	rt5682_reset(rt5682->regmap);
 
+	mutex_init(&rt5682->calibrate_mutex);
 	rt5682_calibrate(rt5682);
 
 	ret = regmap_multi_reg_write(rt5682->regmap, patch_list,
@@ -2654,7 +2655,6 @@ static int rt5682_i2c_probe(struct i2c_client *i2c,
 	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,
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Applied "ASoC: codecs: rt5682: initialize mutex before using" to the asoc tree
  2019-04-19 20:53 [PATCH] ASoC: codecs: rt5682: initialize mutex before using Pierre-Louis Bossart
@ 2019-04-25 19:24 ` Mark Brown
  2019-04-25 19:26 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2019-04-25 19:24 UTC (permalink / raw)
  To: Xun Zhang
  Cc: Oder Chiou, alsa-devel, tiwai, Pierre-Louis Bossart, Mark Brown,
	Bard liao

The patch

   ASoC: codecs: rt5682: initialize mutex before using

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.1

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From c46ab1510de1d3dd9871ae36fbec0da3e0d2d6c5 Mon Sep 17 00:00:00 2001
From: Xun Zhang <xun2.zhang@intel.com>
Date: Fri, 19 Apr 2019 15:53:49 -0500
Subject: [PATCH] ASoC: codecs: rt5682: initialize mutex before using

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>
---
 sound/soc/codecs/rt5682.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/rt5682.c b/sound/soc/codecs/rt5682.c
index 86a7fa31c294..505fb3d7b1c5 100644
--- a/sound/soc/codecs/rt5682.c
+++ b/sound/soc/codecs/rt5682.c
@@ -2588,6 +2588,7 @@ static int rt5682_i2c_probe(struct i2c_client *i2c,
 
 	rt5682_reset(rt5682->regmap);
 
+	mutex_init(&rt5682->calibrate_mutex);
 	rt5682_calibrate(rt5682);
 
 	ret = regmap_multi_reg_write(rt5682->regmap, patch_list,
@@ -2654,7 +2655,6 @@ static int rt5682_i2c_probe(struct i2c_client *i2c,
 	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,
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Applied "ASoC: codecs: rt5682: initialize mutex before using" to the asoc tree
  2019-04-19 20:53 [PATCH] ASoC: codecs: rt5682: initialize mutex before using Pierre-Louis Bossart
  2019-04-25 19:24 ` Applied "ASoC: codecs: rt5682: initialize mutex before using" to the asoc tree Mark Brown
@ 2019-04-25 19:26 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2019-04-25 19:26 UTC (permalink / raw)
  To: Xun Zhang
  Cc: Oder Chiou, alsa-devel, tiwai, Pierre-Louis Bossart, Mark Brown,
	Bard liao

The patch

   ASoC: codecs: rt5682: initialize mutex before using

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.1

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From c46ab1510de1d3dd9871ae36fbec0da3e0d2d6c5 Mon Sep 17 00:00:00 2001
From: Xun Zhang <xun2.zhang@intel.com>
Date: Fri, 19 Apr 2019 15:53:49 -0500
Subject: [PATCH] ASoC: codecs: rt5682: initialize mutex before using

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>
---
 sound/soc/codecs/rt5682.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/rt5682.c b/sound/soc/codecs/rt5682.c
index 86a7fa31c294..505fb3d7b1c5 100644
--- a/sound/soc/codecs/rt5682.c
+++ b/sound/soc/codecs/rt5682.c
@@ -2588,6 +2588,7 @@ static int rt5682_i2c_probe(struct i2c_client *i2c,
 
 	rt5682_reset(rt5682->regmap);
 
+	mutex_init(&rt5682->calibrate_mutex);
 	rt5682_calibrate(rt5682);
 
 	ret = regmap_multi_reg_write(rt5682->regmap, patch_list,
@@ -2654,7 +2655,6 @@ static int rt5682_i2c_probe(struct i2c_client *i2c,
 	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,
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-04-25 19:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-19 20:53 [PATCH] ASoC: codecs: rt5682: initialize mutex before using Pierre-Louis Bossart
2019-04-25 19:24 ` Applied "ASoC: codecs: rt5682: initialize mutex before using" to the asoc tree Mark Brown
2019-04-25 19:26 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.