Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 323016
b: refs/heads/master
c: 3ceefe4
h: refs/heads/master
v: v3
  • Loading branch information
Guenter Roeck committed Sep 18, 2012
1 parent e19c4f5 commit 402612a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4e21f4eaa49f78d3e977e316514c941053871c76
refs/heads/master: 3ceefe4319636d89d4bdf40dca9471970f942e4f
8 changes: 8 additions & 0 deletions trunk/drivers/hwmon/ad7314.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,18 @@ static ssize_t ad7314_show_temperature(struct device *dev,
}
}

static ssize_t ad7314_show_name(struct device *dev,
struct device_attribute *devattr, char *buf)
{
return sprintf(buf, "%s\n", to_spi_device(dev)->modalias);
}

static DEVICE_ATTR(name, S_IRUGO, ad7314_show_name, NULL);
static SENSOR_DEVICE_ATTR(temp1_input, S_IRUGO,
ad7314_show_temperature, NULL, 0);

static struct attribute *ad7314_attributes[] = {
&dev_attr_name.attr,
&sensor_dev_attr_temp1_input.dev_attr.attr,
NULL,
};
Expand Down

0 comments on commit 402612a

Please sign in to comment.