mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: linux-kernel@vger.kernel.org,
	Mark Brown <broonie@opensource.wolfsonmicro.com>
Subject: [PATCH 3/6] regulator: Warn when unregistering an in-use regulator
Date: Tue, 21 Jul 2009 16:00:25 +0100	[thread overview]
Message-ID: <1248188428-11277-3-git-send-email-broonie@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1248188428-11277-2-git-send-email-broonie@opensource.wolfsonmicro.com>

We're probably going to start oopsing fairly soon after this happens.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 drivers/regulator/core.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 33a8c3c..e5ccc9f 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -2229,6 +2229,7 @@ void regulator_unregister(struct regulator_dev *rdev)
 		return;
 
 	mutex_lock(&regulator_list_mutex);
+	WARN_ON(rdev->open_count)
 	unset_regulator_supplies(rdev);
 	list_del(&rdev->list);
 	if (rdev->supply)
-- 
1.6.3.3


  reply	other threads:[~2009-07-21 15:01 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-21 15:00 [PATCH 1/6] regulator: Add regulator_get_exclusive() API Mark Brown
2009-07-21 15:00 ` [PATCH 2/6] regulator: Add regulator voltage range check API Mark Brown
2009-07-21 15:00   ` Mark Brown [this message]
2009-07-21 15:00     ` [PATCH 4/6] regulator: Fix support for deviceless supply mappings Mark Brown
2009-07-21 15:00       ` [PATCH 5/6] regulator: Improve virtual consumer probe error handling Mark Brown
2009-07-21 15:00         ` [PATCH 6/6] regulator: Provide mode to status conversion function Mark Brown
2009-07-22 20:41           ` Liam Girdwood
2009-07-23  8:42             ` Mark Brown
2009-07-22 20:14     ` [PATCH 3/6] regulator: Warn when unregistering an in-use regulator Liam Girdwood
2009-07-23  8:39       ` Mark Brown
2009-07-21 20:49 ` [PATCH 1/6] regulator: Add regulator_get_exclusive() API Daniel Ribeiro
2009-07-22  1:58   ` Eric Miao
2009-07-22  9:58     ` Mark Brown
2009-07-22 20:47       ` Liam Girdwood

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1248188428-11277-3-git-send-email-broonie@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lrg@slimlogic.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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