hwmon: (pmbus/mp2975) Constify local pointers to pmbus_driver_info
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 25 Mar 2024 12:07:43 +0000 (14:07 +0200)
committerGuenter Roeck <linux@roeck-us.net>
Sun, 28 Apr 2024 17:08:33 +0000 (10:08 -0700)
Constify the local variables pointing to "struct pmbus_driver_info" and
other encoding params to annotate the function is not modifying pointed
data.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240325120952.3019767-3-andriy.shevchenko@linux.intel.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/pmbus/mp2975.c

index af118087c4ee88c314a01f568976052638e3c88f..bc7558dc87ee7bc929691525f95f92325c022da2 100644 (file)
@@ -942,7 +942,7 @@ mp2975_vout_per_rail_config_get(struct i2c_client *client,
        return 0;
 }
 
-static struct pmbus_driver_info mp2975_info = {
+static const struct pmbus_driver_info mp2975_info = {
        .pages = 1,
        .format[PSC_VOLTAGE_IN] = linear,
        .format[PSC_VOLTAGE_OUT] = direct,
@@ -967,7 +967,7 @@ static struct pmbus_driver_info mp2975_info = {
 #endif
 };
 
-static struct pmbus_driver_info mp2973_info = {
+static const struct pmbus_driver_info mp2973_info = {
        .pages = 1,
        .format[PSC_VOLTAGE_IN] = linear,
        .format[PSC_VOLTAGE_OUT] = direct,