summaryrefslogtreecommitdiffstats
path: root/include/linux/regulator
diff options
context:
space:
mode:
authorGuodong Xu2014-08-13 13:33:38 +0200
committerMark Brown2014-08-16 23:55:42 +0200
commit272e2315fac3bfca0edfa3252b8a643c425602af (patch)
treeb77a640434ef12dbd381c2f7d712d567cf73ea18 /include/linux/regulator
parentLinux 3.17-rc1 (diff)
downloadkernel-qcow2-linux-272e2315fac3bfca0edfa3252b8a643c425602af.tar.gz
kernel-qcow2-linux-272e2315fac3bfca0edfa3252b8a643c425602af.tar.xz
kernel-qcow2-linux-272e2315fac3bfca0edfa3252b8a643c425602af.zip
regulator: core: add const qualifier to ops in struct regulator_desc
struct regulator_ops *ops is a member in struct regulator_desc, which gets its value from individual regulator driver upon regulator_register() and is used by regulator core APIs. It's not allowed for regulator core to modify any of these callbacks in *ops. Add 'const' qualifier to enforce that. Signed-off-by: Guodong Xu <guodong.xu@linaro.org> 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 bbe03a1924c0..4b628139a9cb 100644
--- a/include/linux/regulator/driver.h
+++ b/include/linux/regulator/driver.h
@@ -245,7 +245,7 @@ struct regulator_desc {
int id;
bool continuous_voltage_range;
unsigned n_voltages;
- struct regulator_ops *ops;
+ const struct regulator_ops *ops;
int irq;
enum regulator_type type;
struct module *owner;