diff options
author | Guodong Xu <guodong.xu@linaro.org> | 2014-08-13 07:33:38 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-08-16 17:55:42 -0400 |
commit | 272e2315fac3bfca0edfa3252b8a643c425602af (patch) | |
tree | b77a640434ef12dbd381c2f7d712d567cf73ea18 /include/linux/regulator | |
parent | 7d1311b93e58ed55f3a31cc8f94c4b8fe988a2b9 (diff) |
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.h | 2 |
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 { | |||
245 | int id; | 245 | int id; |
246 | bool continuous_voltage_range; | 246 | bool continuous_voltage_range; |
247 | unsigned n_voltages; | 247 | unsigned n_voltages; |
248 | struct regulator_ops *ops; | 248 | const struct regulator_ops *ops; |
249 | int irq; | 249 | int irq; |
250 | enum regulator_type type; | 250 | enum regulator_type type; |
251 | struct module *owner; | 251 | struct module *owner; |