diff options
author | Axel Lin <axel.lin@ingics.com> | 2015-07-10 01:00:08 -0400 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2015-08-09 16:44:26 -0400 |
commit | a07d73113febf0e17299338b9a6401955fe63b14 (patch) | |
tree | d34c61563fa624f515f0e4a98f854cfdb263b0b3 /drivers/hwmon/pmbus | |
parent | 7b7a8b4237a0d7808df5aa12f49f7979f879cf12 (diff) |
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/pmbus')
-rw-r--r-- | drivers/hwmon/pmbus/pmbus.h | 2 | ||||
-rw-r--r-- | drivers/hwmon/pmbus/pmbus_core.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hwmon/pmbus/pmbus.h b/drivers/hwmon/pmbus/pmbus.h index 21f8b2fa7fc4..58262b54f09f 100644 --- a/drivers/hwmon/pmbus/pmbus.h +++ b/drivers/hwmon/pmbus/pmbus.h | |||
@@ -380,7 +380,7 @@ struct pmbus_driver_info { | |||
380 | 380 | ||
381 | /* Regulator ops */ | 381 | /* Regulator ops */ |
382 | 382 | ||
383 | extern struct regulator_ops pmbus_regulator_ops; | 383 | extern const struct regulator_ops pmbus_regulator_ops; |
384 | 384 | ||
385 | /* Macro for filling in array of struct regulator_desc */ | 385 | /* Macro for filling in array of struct regulator_desc */ |
386 | #define PMBUS_REGULATOR(_name, _id) \ | 386 | #define PMBUS_REGULATOR(_name, _id) \ |
diff --git a/drivers/hwmon/pmbus/pmbus_core.c b/drivers/hwmon/pmbus/pmbus_core.c index f2e47c7dd808..12d85b178358 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) | |||
1796 | return _pmbus_regulator_on_off(rdev, 0); | 1796 | return _pmbus_regulator_on_off(rdev, 0); |
1797 | } | 1797 | } |
1798 | 1798 | ||
1799 | struct regulator_ops pmbus_regulator_ops = { | 1799 | const struct regulator_ops pmbus_regulator_ops = { |
1800 | .enable = pmbus_regulator_enable, | 1800 | .enable = pmbus_regulator_enable, |
1801 | .disable = pmbus_regulator_disable, | 1801 | .disable = pmbus_regulator_disable, |
1802 | .is_enabled = pmbus_regulator_is_enabled, | 1802 | .is_enabled = pmbus_regulator_is_enabled, |