Skip to content

Commit df11e50

Browse files
AxelLinbroonie
authored andcommitted
regulator: core: Add back the const qualifier for ops of struct regulator_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>
1 parent 39f5460 commit df11e50

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎include/linux/regulator/driver.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ struct regulator_desc {
246246
int id;
247247
bool continuous_voltage_range;
248248
unsigned n_voltages;
249-
struct regulator_ops *ops;
249+
const struct regulator_ops *ops;
250250
int irq;
251251
enum regulator_type type;
252252
struct module *owner;

0 commit comments

Comments
 (0)