struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr); int nr = sensor_attr->index;
static ssize_t show_pwm_enable(struct device *dev, char *buf, int nr){	struct it87_data *data = it87_update_device(dev);	return sprintf(buf,"%d\n", (data->fan_main_ctrl & (1 << nr)) ? 1 : 0);}