summaryrefslogtreecommitdiff
path: root/include/linux/regulator
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2014-08-18 06:34:08 +0400
committerMark Brown <broonie@linaro.org>2014-08-18 18:10:34 +0400
commit716845ebeb505353d900320b4a74e8330520410d (patch)
tree0e393e8a4f96a00bbecabcbace601363a598e797 /include/linux/regulator
parent871f565055ed232e5751da18a331b73e8254adaf (diff)
downloadlinux-716845ebeb505353d900320b4a74e8330520410d.tar.xz
regulator: core: Fix build error due to const qualifier for ops
Drop const qualifier for ops of struct regulator_desc. Allow regulator drivers to update ops before registering regulator. Fix below build error: CC [M] drivers/regulator/mc13892-regulator.o drivers/regulator/mc13892-regulator.c: In function 'mc13892_regulator_probe': drivers/regulator/mc13892-regulator.c:586:3: error: assignment of member 'set_mode' in read-only object drivers/regulator/mc13892-regulator.c:588:3: error: assignment of member 'get_mode' in read-only object make[2]: *** [drivers/regulator/mc13892-regulator.o] Error 1 make[1]: *** [drivers/regulator] Error 2 make: *** [drivers] Error 2 Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'include/linux/regulator')
-rw-r--r--include/linux/regulator/driver.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h
index efe058f8f746..3abda7554d82 100644
--- a/include/linux/regulator/driver.h
+++ b/include/linux/regulator/driver.h
@@ -246,7 +246,7 @@ struct regulator_desc {
int id;
bool continuous_voltage_range;
unsigned n_voltages;
- const struct regulator_ops *ops;
+ struct regulator_ops *ops;
int irq;
enum regulator_type type;
struct module *owner;