Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 79fbdb66 authored by Julia Lawall's avatar Julia Lawall Committed by Sebastian Reichel
Browse files

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: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: default avatarSebastian Reichel <sre@kernel.org>
parent b7e16ec6
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -59,7 +59,7 @@ struct ds278x_info {
	struct i2c_client	*client;
	struct i2c_client	*client;
	struct power_supply	*battery;
	struct power_supply	*battery;
	struct power_supply_desc	battery_desc;
	struct power_supply_desc	battery_desc;
	struct ds278x_battery_ops  *ops;
	const struct ds278x_battery_ops *ops;
	struct delayed_work	bat_work;
	struct delayed_work	bat_work;
	int			id;
	int			id;
	int                     rsns;
	int                     rsns;
@@ -361,7 +361,7 @@ enum ds278x_num_id {
	DS2786,
	DS2786,
};
};


static struct ds278x_battery_ops ds278x_ops[] = {
static const struct ds278x_battery_ops ds278x_ops[] = {
	[DS2782] = {
	[DS2782] = {
		.get_battery_current  = ds2782_get_current,
		.get_battery_current  = ds2782_get_current,
		.get_battery_voltage  = ds2782_get_voltage,
		.get_battery_voltage  = ds2782_get_voltage,