All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bartosz Golaszewski <brgl@bgdev.pl>
To: Liam Girdwood <lgirdwood@gmail.com>, Mark Brown <broonie@kernel.org>
Cc: linux-kernel@vger.kernel.org,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>
Subject: [PATCH 1/2] regulator: make _regulator_is_enabled() available in internal.h
Date: Mon, 10 Dec 2018 16:10:23 +0100	[thread overview]
Message-ID: <20181210151024.3906-2-brgl@bgdev.pl> (raw)
In-Reply-To: <20181210151024.3906-1-brgl@bgdev.pl>

From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

We want to use _regulator_is_enabled() in helpers.c. Export it locally
in internal.h.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
 drivers/regulator/core.c     | 3 +--
 drivers/regulator/internal.h | 1 +
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 2c66b528aede..3754711530b2 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -96,7 +96,6 @@ struct regulator_supply_alias {
 	const char *alias_supply;
 };
 
-static int _regulator_is_enabled(struct regulator_dev *rdev);
 static int _regulator_disable(struct regulator_dev *rdev);
 static int _regulator_get_voltage(struct regulator_dev *rdev);
 static int _regulator_get_current_limit(struct regulator_dev *rdev);
@@ -2531,7 +2530,7 @@ int regulator_disable_deferred(struct regulator *regulator, int ms)
 }
 EXPORT_SYMBOL_GPL(regulator_disable_deferred);
 
-static int _regulator_is_enabled(struct regulator_dev *rdev)
+int _regulator_is_enabled(struct regulator_dev *rdev)
 {
 	/* A GPIO control always takes precedence */
 	if (rdev->ena_pin)
diff --git a/drivers/regulator/internal.h b/drivers/regulator/internal.h
index 943926a156f2..a8557ed96ae6 100644
--- a/drivers/regulator/internal.h
+++ b/drivers/regulator/internal.h
@@ -113,4 +113,5 @@ enum regulator_get_type {
 
 struct regulator *_regulator_get(struct device *dev, const char *id,
 				 enum regulator_get_type get_type);
+int _regulator_is_enabled(struct regulator_dev *rdev);
 #endif
-- 
2.19.1


  reply	other threads:[~2018-12-10 15:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-10 15:10 [PATCH 0/2] regulator: stepping set voltage for regmap users Bartosz Golaszewski
2018-12-10 15:10 ` Bartosz Golaszewski [this message]
2018-12-10 15:10 ` [PATCH 2/2] regulator: provide regulator_set_voltage_sel_regmap_step() helper Bartosz Golaszewski
2018-12-10 15:41   ` Mark Brown
2018-12-11 10:55     ` Bartosz Golaszewski

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=20181210151024.3906-2-brgl@bgdev.pl \
    --to=brgl@bgdev.pl \
    --cc=bgolaszewski@baylibre.com \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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 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.