Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 280576
b: refs/heads/master
c: 740f6be
h: refs/heads/master
v: v3
  • Loading branch information
Guenter Roeck committed Jan 5, 2012
1 parent cd71a68 commit 737569b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4fd826ef97867a6e2ea53b089b3890d8914e9606
refs/heads/master: 740f6be3ccc885ca103c90c48d3b3066239c585c
38 changes: 19 additions & 19 deletions trunk/drivers/hwmon/f75375s.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ struct f75375_data {
u8 in_min[4];
u16 fan[2];
u16 fan_min[2];
u16 fan_full[2];
u16 fan_exp[2];
u16 fan_max[2];
u16 fan_target[2];
u8 fan_timer;
u8 pwm[2];
u8 pwm_mode[2];
Expand Down Expand Up @@ -181,11 +181,11 @@ static struct f75375_data *f75375_update_device(struct device *dev)
f75375_read8(client, F75375_REG_TEMP_HIGH(nr));
data->temp_max_hyst[nr] =
f75375_read8(client, F75375_REG_TEMP_HYST(nr));
data->fan_full[nr] =
data->fan_max[nr] =
f75375_read16(client, F75375_REG_FAN_FULL(nr));
data->fan_min[nr] =
f75375_read16(client, F75375_REG_FAN_MIN(nr));
data->fan_exp[nr] =
data->fan_target[nr] =
f75375_read16(client, F75375_REG_FAN_EXP(nr));
data->pwm[nr] = f75375_read8(client,
F75375_REG_FAN_PWM_DUTY(nr));
Expand Down Expand Up @@ -256,7 +256,7 @@ static ssize_t set_fan_min(struct device *dev, struct device_attribute *attr,
return count;
}

static ssize_t set_fan_exp(struct device *dev, struct device_attribute *attr,
static ssize_t set_fan_target(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{
int nr = to_sensor_dev_attr(attr)->index;
Expand All @@ -270,8 +270,8 @@ static ssize_t set_fan_exp(struct device *dev, struct device_attribute *attr,
return err;

mutex_lock(&data->update_lock);
data->fan_exp[nr] = rpm_to_reg(val);
f75375_write16(client, F75375_REG_FAN_EXP(nr), data->fan_exp[nr]);
data->fan_target[nr] = rpm_to_reg(val);
f75375_write16(client, F75375_REG_FAN_EXP(nr), data->fan_target[nr]);
mutex_unlock(&data->update_lock);
return count;
}
Expand Down Expand Up @@ -550,8 +550,8 @@ static ssize_t show_##thing(struct device *dev, struct device_attribute *attr, \

show_fan(fan);
show_fan(fan_min);
show_fan(fan_full);
show_fan(fan_exp);
show_fan(fan_max);
show_fan(fan_target);

static SENSOR_DEVICE_ATTR(in0_input, S_IRUGO, show_in, NULL, 0);
static SENSOR_DEVICE_ATTR(in0_max, S_IRUGO|S_IWUSR,
Expand Down Expand Up @@ -584,17 +584,17 @@ static SENSOR_DEVICE_ATTR(temp2_max_hyst, S_IRUGO|S_IWUSR,
static SENSOR_DEVICE_ATTR(temp2_max, S_IRUGO|S_IWUSR,
show_temp_max, set_temp_max, 1);
static SENSOR_DEVICE_ATTR(fan1_input, S_IRUGO, show_fan, NULL, 0);
static SENSOR_DEVICE_ATTR(fan1_full, S_IRUGO, show_fan_full, NULL, 0);
static SENSOR_DEVICE_ATTR(fan1_max, S_IRUGO, show_fan_max, NULL, 0);
static SENSOR_DEVICE_ATTR(fan1_min, S_IRUGO|S_IWUSR,
show_fan_min, set_fan_min, 0);
static SENSOR_DEVICE_ATTR(fan1_exp, S_IRUGO|S_IWUSR,
show_fan_exp, set_fan_exp, 0);
static SENSOR_DEVICE_ATTR(fan1_target, S_IRUGO|S_IWUSR,
show_fan_target, set_fan_target, 0);
static SENSOR_DEVICE_ATTR(fan2_input, S_IRUGO, show_fan, NULL, 1);
static SENSOR_DEVICE_ATTR(fan2_full, S_IRUGO, show_fan_full, NULL, 1);
static SENSOR_DEVICE_ATTR(fan2_max, S_IRUGO, show_fan_max, NULL, 1);
static SENSOR_DEVICE_ATTR(fan2_min, S_IRUGO|S_IWUSR,
show_fan_min, set_fan_min, 1);
static SENSOR_DEVICE_ATTR(fan2_exp, S_IRUGO|S_IWUSR,
show_fan_exp, set_fan_exp, 1);
static SENSOR_DEVICE_ATTR(fan2_target, S_IRUGO|S_IWUSR,
show_fan_target, set_fan_target, 1);
static SENSOR_DEVICE_ATTR(pwm1, S_IRUGO|S_IWUSR,
show_pwm, set_pwm, 0);
static SENSOR_DEVICE_ATTR(pwm1_enable, S_IRUGO|S_IWUSR,
Expand All @@ -616,13 +616,13 @@ static struct attribute *f75375_attributes[] = {
&sensor_dev_attr_temp2_max.dev_attr.attr,
&sensor_dev_attr_temp2_max_hyst.dev_attr.attr,
&sensor_dev_attr_fan1_input.dev_attr.attr,
&sensor_dev_attr_fan1_full.dev_attr.attr,
&sensor_dev_attr_fan1_max.dev_attr.attr,
&sensor_dev_attr_fan1_min.dev_attr.attr,
&sensor_dev_attr_fan1_exp.dev_attr.attr,
&sensor_dev_attr_fan1_target.dev_attr.attr,
&sensor_dev_attr_fan2_input.dev_attr.attr,
&sensor_dev_attr_fan2_full.dev_attr.attr,
&sensor_dev_attr_fan2_max.dev_attr.attr,
&sensor_dev_attr_fan2_min.dev_attr.attr,
&sensor_dev_attr_fan2_exp.dev_attr.attr,
&sensor_dev_attr_fan2_target.dev_attr.attr,
&sensor_dev_attr_pwm1.dev_attr.attr,
&sensor_dev_attr_pwm1_enable.dev_attr.attr,
&sensor_dev_attr_pwm1_mode.dev_attr.attr,
Expand Down

0 comments on commit 737569b

Please sign in to comment.