Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 220510
b: refs/heads/master
c: 2437710
h: refs/heads/master
v: v3
  • Loading branch information
Jean Delvare authored and Jean Delvare committed Oct 28, 2010
1 parent ef955bc commit 426d98b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 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: 00030af23153f1958f015df8b9fec8c29fcca8b8
refs/heads/master: 24377101023d3c66136123bd8b20441814da6a90
11 changes: 8 additions & 3 deletions trunk/drivers/hwmon/w83795.c
Original file line number Diff line number Diff line change
Expand Up @@ -713,15 +713,18 @@ store_beep(struct device *dev, struct device_attribute *attr,
return count;
}

/* Write any value to clear chassis alarm */
/* Write 0 to clear chassis alarm */
static ssize_t
store_chassis_clear(struct device *dev,
struct device_attribute *attr, const char *buf,
size_t count)
{
struct i2c_client *client = to_i2c_client(dev);
struct w83795_data *data = i2c_get_clientdata(client);
u8 val;
unsigned long val;

if (strict_strtoul(buf, 10, &val) < 0 || val != 0)
return -EINVAL;

mutex_lock(&data->update_lock);
val = w83795_read(client, W83795_REG_CLR_CHASSIS);
Expand Down Expand Up @@ -1709,8 +1712,10 @@ static const struct sensor_device_attribute_2 w83795_pwm[][7] = {
};

static const struct sensor_device_attribute_2 sda_single_files[] = {
SENSOR_ATTR_2(chassis, S_IWUSR | S_IRUGO, show_alarm_beep,
SENSOR_ATTR_2(intrusion0_alarm, S_IWUSR | S_IRUGO, show_alarm_beep,
store_chassis_clear, ALARM_STATUS, 46),
SENSOR_ATTR_2(intrusion0_beep, S_IWUSR | S_IRUGO, show_alarm_beep,
store_beep, BEEP_ENABLE, 46),
SENSOR_ATTR_2(beep_enable, S_IWUSR | S_IRUGO, show_alarm_beep,
store_beep, BEEP_ENABLE, 47),
#ifdef CONFIG_SENSORS_W83795_FANCTRL
Expand Down

0 comments on commit 426d98b

Please sign in to comment.