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>
This commit is contained in:
Jan Beulich 2011-09-23 06:36:53 -04:00 коммит произвёл Guenter Roeck
Родитель b3a242a6e4
Коммит e3204ed3a4
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -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" };