projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b3a242a
)
hwmon: (coretemp) constify static data
author
Jan Beulich
<JBeulich@suse.com>
Fri, 23 Sep 2011 10:36:53 +0000
(06:36 -0400)
committer
Guenter Roeck
<guenter.roeck@ericsson.com>
Fri, 23 Sep 2011 17:39:10 +0000
(10:39 -0700)
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>
drivers/hwmon/coretemp.c
patch
|
blob
|
history
diff --git
a/drivers/hwmon/coretemp.c
b/drivers/hwmon/coretemp.c
index 6420c3be07b8fbaca6aa5175be164b8cd180d22d..ac1c81f1d5930447a23bdcb376d1ad3225b56c0f 100644
(file)
--- 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" };