提交 716845eb 编写于 作者: A Axel Lin 提交者: Mark Brown

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: NStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: NAxel Lin <axel.lin@ingics.com>
Signed-off-by: NMark Brown <broonie@linaro.org>
上级 871f5650
...@@ -246,7 +246,7 @@ struct regulator_desc { ...@@ -246,7 +246,7 @@ struct regulator_desc {
int id; int id;
bool continuous_voltage_range; bool continuous_voltage_range;
unsigned n_voltages; unsigned n_voltages;
const struct regulator_ops *ops; struct regulator_ops *ops;
int irq; int irq;
enum regulator_type type; enum regulator_type type;
struct module *owner; struct module *owner;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册