Skip to contentSkip to conversation

regulator: core: Add back the const qualifier for ops of struct regulator_desc

PATCH Applied Axel Lin 2 participants 2 messages Aug 21, 2014 Voltage and current regulator framework

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 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 716845ebeb50 ("regulator: core: Fix build error due to const qualifier for ops"). The build error was fixed by commit 39f5460d7f9c ("regulator: core: add const to regulator_ops and fix build error in mc13892").

---
 include/linux/regulator/driver.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/regulator/driver.h +1 -1
index 3abda75..efe058f 100644
@@ -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;
Signature · 1 line
1.9.1
maintainer Applied
#1 lore raw
Quoted 3 lines · Axel Lin

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]

Applied, thanks.