From: Jan Beulich Date: Fri, 23 Sep 2011 10:36:53 +0000 (-0400) Subject: hwmon: (coretemp) constify static data X-Git-Tag: v3.1-rc8~7^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e3204ed3a4a78ca4d10eee8b661b94429bd38da8;p=platform%2Fupstream%2Fkernel-adaptation-pc.git hwmon: (coretemp) constify static data These arrays won't ever be written to, so protect them from unintentional modification. Signed-off-by: Jan Beulich Signed-off-by: Guenter Roeck --- diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c index 6420c3b..ac1c81f 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" };