Skip to content

Commit

Permalink
regulator: core: Add back the const qualifier for ops of struct regul…
Browse files Browse the repository at this point in the history
…ator_desc

Fix below build warning:
CC [M]  drivers/regulator/hi6421-regulator.o
drivers/regulator/hi6421-regulator.c:356:2: warning: initialization discards 'const' qualifier from pointer target type [enabled by default]

This is a revert of commit 716845e ("regulator: core: Fix build error due
to const qualifier for ops"). The build error was fixed by commit 39f5460
("regulator: core: add const to regulator_ops and fix build error in mc13892").

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
Axel Lin authored and Mark Brown committed Aug 21, 2014
1 parent 39f5460 commit df11e50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/regulator/driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,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;
Expand Down

0 comments on commit df11e50

Please sign in to comment.