summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorColin Ian King <colin.i.king@gmail.com>2022-10-05 17:27:52 +0200
committerGuenter Roeck <linux@roeck-us.net>2022-12-05 01:45:01 +0100
commit415519ad6966ce35f2535fc3ff95549414beb032 (patch)
treeb1605049090aef3628f732ec29dc83ce5791fddd /drivers/hwmon
parentLinux 6.1-rc8 (diff)
downloadlinux-415519ad6966ce35f2535fc3ff95549414beb032.tar.xz
linux-415519ad6966ce35f2535fc3ff95549414beb032.zip
hwmon: (fschmd) Make const arrays static const
Don't populate the read-only const arrays names and watchdog_minors on the stack but instead make them static const. Also makes the object code a little smaller. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://lore.kernel.org/r/20221005152752.318493-1-colin.i.king@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/fschmd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hwmon/fschmd.c b/drivers/hwmon/fschmd.c
index 0a77d6161928..e1f426e86f36 100644
--- a/drivers/hwmon/fschmd.c
+++ b/drivers/hwmon/fschmd.c
@@ -1083,9 +1083,9 @@ static int fschmd_detect(struct i2c_client *client,
static int fschmd_probe(struct i2c_client *client)
{
struct fschmd_data *data;
- const char * const names[7] = { "Poseidon", "Hermes", "Scylla",
+ static const char * const names[7] = { "Poseidon", "Hermes", "Scylla",
"Heracles", "Heimdall", "Hades", "Syleus" };
- const int watchdog_minors[] = { WATCHDOG_MINOR, 212, 213, 214, 215 };
+ static const int watchdog_minors[] = { WATCHDOG_MINOR, 212, 213, 214, 215 };
int i, err;
enum chips kind = i2c_match_id(fschmd_id, client)->driver_data;