]> git.codelabs.ch Git - muen/linux.git/commit
regulator: core: add const qualifier to ops in struct regulator_desc
authorGuodong Xu <guodong.xu@linaro.org>
Wed, 13 Aug 2014 11:33:38 +0000 (19:33 +0800)
committerMark Brown <broonie@linaro.org>
Sat, 16 Aug 2014 21:55:42 +0000 (16:55 -0500)
commit272e2315fac3bfca0edfa3252b8a643c425602af
treeb77a640434ef12dbd381c2f7d712d567cf73ea18
parent7d1311b93e58ed55f3a31cc8f94c4b8fe988a2b9
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>
drivers/regulator/core.c
include/linux/regulator/driver.h