Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 10591
b: refs/heads/master
c: e415e48
h: refs/heads/master
i:
  10589: a10c481
  10587: 3f17b40
  10583: 2820ca1
  10575: 132fa6f
  10559: c6d9cf8
v: v3
  • Loading branch information
Jean Delvare authored and Greg Kroah-Hartman committed Oct 28, 2005
1 parent 7ea20a1 commit 9003d08
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 13 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: 088341bd0c78143bf82ff21f7f0a715f99568c73
refs/heads/master: e415e48b68155bea8b5452113dedba4ec486f3f6
33 changes: 21 additions & 12 deletions trunk/drivers/hwmon/adm9240.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,25 +219,26 @@ static ssize_t show_in(struct device *dev, struct device_attribute *devattr,
attr->index));
}

static ssize_t show_in_min(struct device *dev, struct device_attribute *devattr,
char *buf)
static ssize_t show_in_min(struct device *dev,
struct device_attribute *devattr, char *buf)
{
struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
struct adm9240_data *data = adm9240_update_device(dev);
return sprintf(buf, "%d\n", IN_FROM_REG(data->in_min[attr->index],
attr->index));
}

static ssize_t show_in_max(struct device *dev, struct device_attribute *devattr,
char *buf)
static ssize_t show_in_max(struct device *dev,
struct device_attribute *devattr, char *buf)
{
struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
struct adm9240_data *data = adm9240_update_device(dev);
return sprintf(buf, "%d\n", IN_FROM_REG(data->in_max[attr->index],
attr->index));
}

static ssize_t set_in_min(struct device *dev, struct device_attribute *devattr,
static ssize_t set_in_min(struct device *dev,
struct device_attribute *devattr,
const char *buf, size_t count)
{
struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
Expand All @@ -253,7 +254,8 @@ static ssize_t set_in_min(struct device *dev, struct device_attribute *devattr,
return count;
}

static ssize_t set_in_max(struct device *dev, struct device_attribute *devattr,
static ssize_t set_in_max(struct device *dev,
struct device_attribute *devattr,
const char *buf, size_t count)
{
struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
Expand Down Expand Up @@ -326,7 +328,7 @@ static void adm9240_write_fan_div(struct i2c_client *client, int nr,
"to %u\n", nr + 1, 1 << old, 1 << fan_div);
}

/*
/*
* set fan speed low limit:
*
* - value is zero: disable fan speed low limit alarm
Expand Down Expand Up @@ -404,29 +406,34 @@ fan(1);
fan(2);

/* alarms */
static ssize_t show_alarms(struct device *dev, struct device_attribute *attr, char *buf)
static ssize_t show_alarms(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct adm9240_data *data = adm9240_update_device(dev);
return sprintf(buf, "%u\n", data->alarms);
}
static DEVICE_ATTR(alarms, S_IRUGO, show_alarms, NULL);

/* vid */
static ssize_t show_vid(struct device *dev, struct device_attribute *attr, char *buf)
static ssize_t show_vid(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct adm9240_data *data = adm9240_update_device(dev);
return sprintf(buf, "%d\n", vid_from_reg(data->vid, data->vrm));
}
static DEVICE_ATTR(cpu0_vid, S_IRUGO, show_vid, NULL);

/* analog output */
static ssize_t show_aout(struct device *dev, struct device_attribute *attr, char *buf)
static ssize_t show_aout(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct adm9240_data *data = adm9240_update_device(dev);
return sprintf(buf, "%d\n", AOUT_FROM_REG(data->aout));
}

static ssize_t set_aout(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
static ssize_t set_aout(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
struct i2c_client *client = to_i2c_client(dev);
struct adm9240_data *data = i2c_get_clientdata(client);
Expand All @@ -441,7 +448,9 @@ static ssize_t set_aout(struct device *dev, struct device_attribute *attr, const
static DEVICE_ATTR(aout_output, S_IRUGO | S_IWUSR, show_aout, set_aout);

/* chassis_clear */
static ssize_t chassis_clear(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
static ssize_t chassis_clear(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
struct i2c_client *client = to_i2c_client(dev);
unsigned long val = simple_strtol(buf, NULL, 10);
Expand Down

0 comments on commit 9003d08

Please sign in to comment.