mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] regulator: core: remove lockdep assert from suspend_prepare
@ 2016-04-18 11:49 Tero Kristo
  2016-04-18 11:59 ` Mark Brown
  2016-04-18 19:03 ` Applied "regulator: core: remove lockdep assert from suspend_prepare" to the regulator tree Mark Brown
  0 siblings, 2 replies; 4+ messages in thread
From: Tero Kristo @ 2016-04-18 11:49 UTC (permalink / raw)
  To: linux-kernel, broonie, lgirdwood

suspend_prepare can be called during regulator init time also, where
the mutex is not locked yet. This causes a false lockdep warning.
To avoid the problem, remove the lockdep assertion from the function
causing the issue. An alternative would be to lock the mutex during
init, but this would cause other problems (some APIs used during init
will attempt to lock the mutex also, causing deadlock.)

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Reported-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/regulator/core.c |    2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 73b7683..b63302e 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -808,8 +808,6 @@ static int suspend_set_state(struct regulator_dev *rdev,
 /* locks held by caller */
 static int suspend_prepare(struct regulator_dev *rdev, suspend_state_t state)
 {
-	lockdep_assert_held_once(&rdev->mutex);
-
 	if (!rdev->constraints)
 		return -EINVAL;
 
-- 
1.7.9.5

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

end of thread, other threads:[~2016-04-18 19:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-18 11:49 [PATCH] regulator: core: remove lockdep assert from suspend_prepare Tero Kristo
2016-04-18 11:59 ` Mark Brown
2016-04-18 14:14   ` Tero Kristo
2016-04-18 19:03 ` Applied "regulator: core: remove lockdep assert from suspend_prepare" to the regulator tree Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome