struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr); int nr = sensor_attr->index;
static ssize_t show_temp_crit(struct device *dev, char *buf, int nr){	struct adm1026_data *data = adm1026_update_device(dev);	return sprintf(buf,"%d\n", TEMP_FROM_REG(data->temp_crit[nr]));}