aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/igb/igb_hwmon.c
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2013-11-26 07:15:34 +0000
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2013-12-10 01:27:35 -0800
commite6e25bba9b8a343af6b5e281a0378d3c8ae52165 (patch)
treedb9f14c8b00c57b59ea6ce5c08702fefb4f21903 /drivers/net/ethernet/intel/igb/igb_hwmon.c
parentigb: Convert to use devm_hwmon_device_register_with_groups (diff)
downloadlinux-dev-e6e25bba9b8a343af6b5e281a0378d3c8ae52165.tar.xz
linux-dev-e6e25bba9b8a343af6b5e281a0378d3c8ae52165.zip
igb: Start temperature sensor attribute index with 1
Per hwmon ABI, temperature sensor attribute index starts with 1, not 0. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Jean Delvare <khali@linux-fr.org> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/igb/igb_hwmon.c')
-rw-r--r--drivers/net/ethernet/intel/igb/igb_hwmon.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/ethernet/intel/igb/igb_hwmon.c b/drivers/net/ethernet/intel/igb/igb_hwmon.c
index 2e7ef2d0711f..e0af5bc61613 100644
--- a/drivers/net/ethernet/intel/igb/igb_hwmon.c
+++ b/drivers/net/ethernet/intel/igb/igb_hwmon.c
@@ -124,22 +124,22 @@ static int igb_add_hwmon_attr(struct igb_adapter *adapter,
case IGB_HWMON_TYPE_LOC:
igb_attr->dev_attr.show = igb_hwmon_show_location;
snprintf(igb_attr->name, sizeof(igb_attr->name),
- "temp%u_label", offset);
+ "temp%u_label", offset + 1);
break;
case IGB_HWMON_TYPE_TEMP:
igb_attr->dev_attr.show = igb_hwmon_show_temp;
snprintf(igb_attr->name, sizeof(igb_attr->name),
- "temp%u_input", offset);
+ "temp%u_input", offset + 1);
break;
case IGB_HWMON_TYPE_CAUTION:
igb_attr->dev_attr.show = igb_hwmon_show_cautionthresh;
snprintf(igb_attr->name, sizeof(igb_attr->name),
- "temp%u_max", offset);
+ "temp%u_max", offset + 1);
break;
case IGB_HWMON_TYPE_MAX:
igb_attr->dev_attr.show = igb_hwmon_show_maxopthresh;
snprintf(igb_attr->name, sizeof(igb_attr->name),
- "temp%u_crit", offset);
+ "temp%u_crit", offset + 1);
break;
default:
rc = -EPERM;