mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-27 07:14:26 -04:00
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>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user