aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2016-10-16 13:38:52 -0400
committerGuenter Roeck <linux@roeck-us.net>2016-12-10 00:54:18 -0500
commitf4d325d5ed099c3ca9b2c23a53dc64e871a659c8 (patch)
tree8982d436378be57f35c5c7147d3a761f9ae499cc /drivers/hwmon
parente159ab5cb1afb519601a961405933c61cdd5a56a (diff)
hwmon: (core) Clarify use of chip attributes
Describing chip attributes as "attributes which apply to the entire chip" is confusing. Rephrase to "attributes which are not bound to a specific input or output". Also rename hwmon_chip_attr_templates[] to hwmon_chip_attrs[] to indicate that the respective strings strings are not templates but actual attribute names. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/hwmon.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/hwmon/hwmon.c b/drivers/hwmon/hwmon.c
index 491231fa0580..112aae60f51f 100644
--- a/drivers/hwmon/hwmon.c
+++ b/drivers/hwmon/hwmon.c
@@ -292,7 +292,11 @@ static struct attribute *hwmon_genattr(struct device *dev,
292 return a; 292 return a;
293} 293}
294 294
295static const char * const hwmon_chip_attr_templates[] = { 295/*
296 * Chip attributes are not attribute templates but actual sysfs attributes.
297 * See hwmon_genattr() for special handling.
298 */
299static const char * const hwmon_chip_attrs[] = {
296 [hwmon_chip_temp_reset_history] = "temp_reset_history", 300 [hwmon_chip_temp_reset_history] = "temp_reset_history",
297 [hwmon_chip_in_reset_history] = "in_reset_history", 301 [hwmon_chip_in_reset_history] = "in_reset_history",
298 [hwmon_chip_curr_reset_history] = "curr_reset_history", 302 [hwmon_chip_curr_reset_history] = "curr_reset_history",
@@ -429,7 +433,7 @@ static const char * const hwmon_pwm_attr_templates[] = {
429}; 433};
430 434
431static const char * const *__templates[] = { 435static const char * const *__templates[] = {
432 [hwmon_chip] = hwmon_chip_attr_templates, 436 [hwmon_chip] = hwmon_chip_attrs,
433 [hwmon_temp] = hwmon_temp_attr_templates, 437 [hwmon_temp] = hwmon_temp_attr_templates,
434 [hwmon_in] = hwmon_in_attr_templates, 438 [hwmon_in] = hwmon_in_attr_templates,
435 [hwmon_curr] = hwmon_curr_attr_templates, 439 [hwmon_curr] = hwmon_curr_attr_templates,
@@ -441,7 +445,7 @@ static const char * const *__templates[] = {
441}; 445};
442 446
443static const int __templates_size[] = { 447static const int __templates_size[] = {
444 [hwmon_chip] = ARRAY_SIZE(hwmon_chip_attr_templates), 448 [hwmon_chip] = ARRAY_SIZE(hwmon_chip_attrs),
445 [hwmon_temp] = ARRAY_SIZE(hwmon_temp_attr_templates), 449 [hwmon_temp] = ARRAY_SIZE(hwmon_temp_attr_templates),
446 [hwmon_in] = ARRAY_SIZE(hwmon_in_attr_templates), 450 [hwmon_in] = ARRAY_SIZE(hwmon_in_attr_templates),
447 [hwmon_curr] = ARRAY_SIZE(hwmon_curr_attr_templates), 451 [hwmon_curr] = ARRAY_SIZE(hwmon_curr_attr_templates),