projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b7931a7
)
hwmon: (pmbus/lm25066) Mark lm25066_coeff array const
author
Zev Weiss
<zev@bewilderbeest.net>
Tue, 28 Sep 2021 09:22:39 +0000
(
02:22
-0700)
committer
Guenter Roeck
<linux@roeck-us.net>
Tue, 12 Oct 2021 14:22:40 +0000
(07:22 -0700)
lm25066_coeff is read-only. Mark it as such.
Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Link:
https://lore.kernel.org/r/20210928092242.30036-6-zev@bewilderbeest.net
[groeck: Added description]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/pmbus/lm25066.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/hwmon/pmbus/lm25066.c
b/drivers/hwmon/pmbus/lm25066.c
index 1ff5407b69770b9295e2ec27131170fc53b26595..dbbf8571c437daaab7eb20dddcf18bf83a2814d5 100644
(file)
--- a/
drivers/hwmon/pmbus/lm25066.c
+++ b/
drivers/hwmon/pmbus/lm25066.c
@@
-51,7
+51,7
@@
struct __coeff {
#define PSC_CURRENT_IN_L (PSC_NUM_CLASSES)
#define PSC_POWER_L (PSC_NUM_CLASSES + 1)
-static struct __coeff lm25066_coeff[][PSC_NUM_CLASSES + 2] = {
+static
const
struct __coeff lm25066_coeff[][PSC_NUM_CLASSES + 2] = {
[lm25056] = {
[PSC_VOLTAGE_IN] = {
.m = 16296,
@@
-449,7
+449,7
@@
static int lm25066_probe(struct i2c_client *client)
int config;
struct lm25066_data *data;
struct pmbus_driver_info *info;
- struct __coeff *coeff;
+
const
struct __coeff *coeff;
if (!i2c_check_functionality(client->adapter,
I2C_FUNC_SMBUS_READ_BYTE_DATA))