From 0fd33351672bf72d5ad4c24fb5c1fa22e806308f Mon Sep 17 00:00:00 2001 From: Guenter Roeck Date: Sat, 21 Jul 2012 10:53:48 +1000 Subject: [PATCH] --- yaml --- r: 334212 b: refs/heads/master c: 79a49168b595f5400ed3108cd57e90f5bbe144ca h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/thermal/thermal_sys.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 2cb288542efa..461f1607fd12 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f4a821ce6ed41970d0155f55067fb07009974fbe +refs/heads/master: 79a49168b595f5400ed3108cd57e90f5bbe144ca diff --git a/trunk/drivers/thermal/thermal_sys.c b/trunk/drivers/thermal/thermal_sys.c index 5be8728c88a3..36e6f4d4ec3b 100644 --- a/trunk/drivers/thermal/thermal_sys.c +++ b/trunk/drivers/thermal/thermal_sys.c @@ -598,7 +598,7 @@ thermal_add_hwmon_sysfs(struct thermal_zone_device *tz) temp->tz = tz; hwmon->count++; - snprintf(temp->temp_input.name, THERMAL_NAME_LENGTH, + snprintf(temp->temp_input.name, sizeof(temp->temp_input.name), "temp%d_input", hwmon->count); temp->temp_input.attr.attr.name = temp->temp_input.name; temp->temp_input.attr.attr.mode = 0444; @@ -611,7 +611,8 @@ thermal_add_hwmon_sysfs(struct thermal_zone_device *tz) if (tz->ops->get_crit_temp) { unsigned long temperature; if (!tz->ops->get_crit_temp(tz, &temperature)) { - snprintf(temp->temp_crit.name, THERMAL_NAME_LENGTH, + snprintf(temp->temp_crit.name, + sizeof(temp->temp_crit.name), "temp%d_crit", hwmon->count); temp->temp_crit.attr.attr.name = temp->temp_crit.name; temp->temp_crit.attr.attr.mode = 0444;