Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 311179
b: refs/heads/master
c: 2355375
h: refs/heads/master
i:
  311177: fa1273e
  311175: f39e8e2
v: v3
  • Loading branch information
Guenter Roeck committed Jun 18, 2012
1 parent c9c4c51 commit 8c550a7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 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: ac852edb47b15900886ba2564eeeb13b3b526e3e
refs/heads/master: 2355375efdf10f43680d420023baa97796bfcdff
12 changes: 8 additions & 4 deletions trunk/drivers/hwmon/emc2103.c
Original file line number Diff line number Diff line change
Expand Up @@ -451,19 +451,23 @@ static ssize_t set_pwm_enable(struct device *dev, struct device_attribute *da,
data->fan_rpm_control = true;
break;
default:
mutex_unlock(&data->update_lock);
return -EINVAL;
count = -EINVAL;
goto err;
}

read_u8_from_i2c(client, REG_FAN_CONF1, &conf_reg);
result = read_u8_from_i2c(client, REG_FAN_CONF1, &conf_reg);
if (result) {
count = result;
goto err;
}

if (data->fan_rpm_control)
conf_reg |= 0x80;
else
conf_reg &= ~0x80;

i2c_smbus_write_byte_data(client, REG_FAN_CONF1, conf_reg);

err:
mutex_unlock(&data->update_lock);
return count;
}
Expand Down

0 comments on commit 8c550a7

Please sign in to comment.