summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJan Beulich <JBeulich@suse.com>2011-09-23 06:36:53 -0400
committerGuenter Roeck <guenter.roeck@ericsson.com>2011-09-23 10:39:10 -0700
commite3204ed3a4a78ca4d10eee8b661b94429bd38da8 (patch)
tree9abd8ce2275aa5f2e6be75634df3d49f9f7b5bf5 /drivers
parentb3a242a6e4b8c09dbb466ab7a9d2c724e75faa67 (diff)
hwmon: (coretemp) constify static data
These arrays won't ever be written to, so protect them from unintentional modification. Signed-off-by: Jan Beulich <jbeulich@suse.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/hwmon/coretemp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c
index 6420c3be07b..ac1c81f1d59 100644
--- a/drivers/hwmon/coretemp.c
+++ b/drivers/hwmon/coretemp.c
@@ -347,11 +347,11 @@ static int create_core_attrs(struct temp_data *tdata, struct device *dev,
int attr_no)
{
int err, i;
- static ssize_t (*rd_ptr[TOTAL_ATTRS]) (struct device *dev,
+ static ssize_t (*const rd_ptr[TOTAL_ATTRS]) (struct device *dev,
struct device_attribute *devattr, char *buf) = {
show_label, show_crit_alarm, show_temp, show_tjmax,
show_ttarget };
- static const char *names[TOTAL_ATTRS] = {
+ static const char *const names[TOTAL_ATTRS] = {
"temp%d_label", "temp%d_crit_alarm",
"temp%d_input", "temp%d_crit",
"temp%d_max" };