summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2015-07-10 13:00:08 +0800
committerGuenter Roeck <linux@roeck-us.net>2015-08-09 13:44:26 -0700
commita07d73113febf0e17299338b9a6401955fe63b14 (patch)
treed34c61563fa624f515f0e4a98f854cfdb263b0b3 /drivers/hwmon
parent7b7a8b4237a0d7808df5aa12f49f7979f879cf12 (diff)
downloadop-kernel-dev-a07d73113febf0e17299338b9a6401955fe63b14.zip
op-kernel-dev-a07d73113febf0e17299338b9a6401955fe63b14.tar.gz
hwmon: (pmbus_core) Constify pmbus_regulator_ops
pmbus_regulator_ops is not modified after initialized, so make it const. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/pmbus/pmbus.h2
-rw-r--r--drivers/hwmon/pmbus/pmbus_core.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hwmon/pmbus/pmbus.h b/drivers/hwmon/pmbus/pmbus.h
index 21f8b2f..58262b5 100644
--- a/drivers/hwmon/pmbus/pmbus.h
+++ b/drivers/hwmon/pmbus/pmbus.h
@@ -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) \
diff --git a/drivers/hwmon/pmbus/pmbus_core.c b/drivers/hwmon/pmbus/pmbus_core.c
index f2e47c7..12d85b1 100644
--- a/drivers/hwmon/pmbus/pmbus_core.c
+++ b/drivers/hwmon/pmbus/pmbus_core.c
@@ -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,
OpenPOWER on IntegriCloud