On Fri, 22 Nov 2013 22:08:00 -0800, Guenter Roeck wrote: > Per hwmon ABI, temperature sensor attribute index starts with 1, not 0. > > Signed-off-by: Guenter Roeck <linux@xxxxxxxxxxxx> > --- > drivers/net/ethernet/intel/igb/igb_hwmon.c | 8 ++++---- > 1 file 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 2e7ef2d..e0af5bc 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; Reviewed-by: Jean Delvare <khali@xxxxxxxxxxxx> -- Jean Delvare _______________________________________________ lm-sensors mailing list lm-sensors@xxxxxxxxxxxxxx http://lists.lm-sensors.org/mailman/listinfo/lm-sensors