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

Commit a07d7311 authored by Axel Lin's avatar Axel Lin Committed by Guenter Roeck
Browse files

hwmon: (pmbus_core) Constify pmbus_regulator_ops



pmbus_regulator_ops is not modified after initialized, so make it const.

Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent 7b7a8b42
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -380,7 +380,7 @@ struct pmbus_driver_info {

/* Regulator ops */

extern struct regulator_ops pmbus_regulator_ops;
extern const struct regulator_ops pmbus_regulator_ops;

/* Macro for filling in array of struct regulator_desc */
#define PMBUS_REGULATOR(_name, _id)				\
+1 −1
Original line number Diff line number Diff line
@@ -1796,7 +1796,7 @@ static int pmbus_regulator_disable(struct regulator_dev *rdev)
	return _pmbus_regulator_on_off(rdev, 0);
}

struct regulator_ops pmbus_regulator_ops = {
const struct regulator_ops pmbus_regulator_ops = {
	.enable = pmbus_regulator_enable,
	.disable = pmbus_regulator_disable,
	.is_enabled = pmbus_regulator_is_enabled,