public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource•wolfsonmicro.com>
To: Liam Girdwood <lrg@slimlogic•co.uk>, Yong Shen <yong.shen@linaro•org>
Cc: linux-next@vger•kernel.org, linux-kernel@vger•kernel.org,
	Stephen Rothwell <sfr@canb•auug.org.au>,
	patches@opensource•wolfsonmicro.com,
	Mark Brown <broonie@opensource•wolfsonmicro.com>
Subject: [PATCH] regulator: Allow modular build of mc13xxx-core
Date: Wed, 15 Dec 2010 14:10:25 +0000	[thread overview]
Message-ID: <1292422225-27530-1-git-send-email-broonie@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <20101215140344.GF5723@sirena.org.uk>

Since the MFD core for this device and the regulator drivers for these
devices can be built modular we should also support modular build of
the shared code for the regulator drivers, otherwise we try to link
built in code against modular code with unfortunate results.

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

diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig
index 485a9bc..e1d9436 100644
--- a/drivers/regulator/Kconfig
+++ b/drivers/regulator/Kconfig
@@ -187,7 +187,7 @@ config REGULATOR_PCAP
 	 PCAP2 PMIC.
 
 config REGULATOR_MC13XXX_CORE
-	bool
+	tristate
 
 config REGULATOR_MC13783
 	tristate "Support regulators on Freescale MC13783 PMIC"
diff --git a/drivers/regulator/mc13xxx-regulator-core.c b/drivers/regulator/mc13xxx-regulator-core.c
index 448e8f4..da46b3c 100644
--- a/drivers/regulator/mc13xxx-regulator-core.c
+++ b/drivers/regulator/mc13xxx-regulator-core.c
@@ -123,6 +123,7 @@ int mc13xxx_get_best_voltage_index(struct regulator_dev *rdev,
 	}
 	return bestindex;
 }
+EXPORT_SYMBOL_GPL(mc13xxx_get_best_voltage_index);
 
 static int mc13xxx_regulator_set_voltage(struct regulator_dev *rdev, int min_uV,
 		int max_uV, unsigned *selector)
@@ -185,6 +186,7 @@ struct regulator_ops mc13xxx_regulator_ops = {
 	.set_voltage = mc13xxx_regulator_set_voltage,
 	.get_voltage = mc13xxx_regulator_get_voltage,
 };
+EXPORT_SYMBOL_GPL(mc13xxx_regulator_ops);
 
 int mc13xxx_fixed_regulator_set_voltage(struct regulator_dev *rdev, int min_uV,
 	       int max_uV, unsigned *selector)
@@ -202,6 +204,7 @@ int mc13xxx_fixed_regulator_set_voltage(struct regulator_dev *rdev, int min_uV,
 	else
 		return -EINVAL;
 }
+EXPORT_SYMBOL_GPL(mc13xxx_fixed_regulator_set_voltage);
 
 int mc13xxx_fixed_regulator_get_voltage(struct regulator_dev *rdev)
 {
@@ -213,6 +216,7 @@ int mc13xxx_fixed_regulator_get_voltage(struct regulator_dev *rdev)
 
 	return mc13xxx_regulators[id].voltages[0];
 }
+EXPORT_SYMBOL_GPL(mc13xxx_fixed_regulator_get_voltage);
 
 struct regulator_ops mc13xxx_fixed_regulator_ops = {
 	.enable = mc13xxx_regulator_enable,
@@ -222,6 +226,7 @@ struct regulator_ops mc13xxx_fixed_regulator_ops = {
 	.set_voltage = mc13xxx_fixed_regulator_set_voltage,
 	.get_voltage = mc13xxx_fixed_regulator_get_voltage,
 };
+EXPORT_SYMBOL_GPL(mc13xxx_fixed_regulator_ops);
 
 int mc13xxx_sw_regulator_is_enabled(struct regulator_dev *rdev)
 {
-- 
1.7.1

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

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-15  2:09 linux-next: build failure after merge of the voltage tree Stephen Rothwell
2010-12-15  9:04 ` Liam Girdwood
2010-12-15 14:03   ` Mark Brown
2010-12-15 14:10     ` Mark Brown [this message]
2010-12-15 21:30       ` [PATCH] regulator: Allow modular build of mc13xxx-core Liam Girdwood
2010-12-16  1:52         ` Yong Shen

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=1292422225-27530-1-git-send-email-broonie@opensource.wolfsonmicro.com \
    --to=broonie@opensource$(echo .)wolfsonmicro.com \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=lrg@slimlogic$(echo .)co.uk \
    --cc=patches@opensource$(echo .)wolfsonmicro.com \
    --cc=sfr@canb$(echo .)auug.org.au \
    --cc=yong.shen@linaro$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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