diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-09-26 21:07:20 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-09-26 21:07:20 -0400 |
commit | 5905db5ca0ac9a6d5bfe87f86b87cd1bdec3755a (patch) | |
tree | 6edb13ed37d842ef0b70d072b94e4c78010f90cf /drivers/hwmon/ad7314.c | |
parent | c5aa1e554a20fb3542c62688ae46049c9225a965 (diff) | |
parent | 6f0f9b6b3fcfe5e156f20d4f804f0d505c750b3c (diff) | |
download | op-kernel-dev-5905db5ca0ac9a6d5bfe87f86b87cd1bdec3755a.zip op-kernel-dev-5905db5ca0ac9a6d5bfe87f86b87cd1bdec3755a.tar.gz |
Merge remote branch 'origin' into for-next
Diffstat (limited to 'drivers/hwmon/ad7314.c')
-rw-r--r-- | drivers/hwmon/ad7314.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/hwmon/ad7314.c b/drivers/hwmon/ad7314.c index cfec802..f915eb1 100644 --- a/drivers/hwmon/ad7314.c +++ b/drivers/hwmon/ad7314.c @@ -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, }; |