summaryrefslogtreecommitdiff
path: root/drivers/power
diff options
context:
space:
mode:
authorJulia Lawall <Julia.Lawall@lip6.fr>2015-11-13 21:41:34 +0300
committerSebastian Reichel <sre@kernel.org>2015-12-05 04:06:49 +0300
commit79fbdb66cf6ab4e26e7bcb8399ac02cd81fc5d6d (patch)
tree8a07db775119e2ba527f304e6593b58981587704 /drivers/power
parentb7e16ec6e3d2ea0b62cf93a0e849db55f403a871 (diff)
downloadlinux-79fbdb66cf6ab4e26e7bcb8399ac02cd81fc5d6d.tar.xz
power: ds2782_battery: constify ds278x_battery_ops structure
The ds278x_battery_ops structure is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Sebastian Reichel <sre@kernel.org>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/ds2782_battery.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/power/ds2782_battery.c b/drivers/power/ds2782_battery.c
index ed4d756d21e4..a1b7e0592245 100644
--- a/drivers/power/ds2782_battery.c
+++ b/drivers/power/ds2782_battery.c
@@ -59,7 +59,7 @@ struct ds278x_info {
struct i2c_client *client;
struct power_supply *battery;
struct power_supply_desc battery_desc;
- struct ds278x_battery_ops *ops;
+ const struct ds278x_battery_ops *ops;
struct delayed_work bat_work;
int id;
int rsns;
@@ -361,7 +361,7 @@ enum ds278x_num_id {
DS2786,
};
-static struct ds278x_battery_ops ds278x_ops[] = {
+static const struct ds278x_battery_ops ds278x_ops[] = {
[DS2782] = {
.get_battery_current = ds2782_get_current,
.get_battery_voltage = ds2782_get_voltage,