diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-02-20 20:52:08 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-02-20 20:52:08 +0300 |
commit | 507b500726fa501b9411493d969a99236f2b10e1 (patch) | |
tree | 623b83c5b360b97a162ae4a850022e75e038f565 /drivers/hwmon/nct6683.c | |
parent | ce1bf97965abb7faaa98b6bd89201855159471c8 (diff) | |
parent | 2f1736ff0664937636f8c0a4994c4a5a23da2090 (diff) | |
download | linux-507b500726fa501b9411493d969a99236f2b10e1.tar.xz |
Merge tag 'hwmon-for-linus-v4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
Pull hwmon updates from Guenter Roeck:
- new driver for stts751
- it87: Added support for IT8622E and IT8792E; improved support for
other chips
- lm70: Added support for TMP122/124
- use permission-specific DEVICE_ATTR variants where possible
- fixed overflows in various drivers
- minor improvements in various drivers
* tag 'hwmon-for-linus-v4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (95 commits)
hwmon: (sht15) Add device tree support
devicetree: add lm90 thermal_zone sensor support
hwmon: (it87) Add support for IT8792E
hwmon: (it87) Do not overwrite bit 2..6 of pwm control registers
hwmon: (it87) Fix pwm4 detection for IT8620 and IT8628
hwmon: (it87) Ensure that pwm control cache is current before updating values
hwmon: (it87) Improve IT8622 support
hwmon: (it87) Add support for IT8622E
hwmon: (it87) Add feature flag indicating that VIN3 is connected to 5V
DT: add binding documentation for STTS751
hwmon: new driver for ST stts751 thermal sensor
hwmon: Register thermal zone only if 'dev' parameter was provided
hwmon: Relax name attribute validation for new APIs
hwmon: Update documentation to clarify rules for the 'name' attribute
hwmon: Make name attribute mandatory for new APIs
hwmon: (lm70) Add support for TI TMP122/124
hwmon: (lm70) Utilize dev_warn instead of pr_warn
hwmon: (ltc4151) Export OF device ID table as module aliases
hwmon: (adc128d818) Preserve operation mode
hwmon: (adc128d818) Support operation modes 1-3
...
Diffstat (limited to 'drivers/hwmon/nct6683.c')
-rw-r--r-- | drivers/hwmon/nct6683.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/hwmon/nct6683.c b/drivers/hwmon/nct6683.c index 559c596b24f9..8b0bc4fc06e8 100644 --- a/drivers/hwmon/nct6683.c +++ b/drivers/hwmon/nct6683.c @@ -979,7 +979,7 @@ static const struct sensor_template_group nct6683_pwm_template_group = { }; static ssize_t -show_global_beep(struct device *dev, struct device_attribute *attr, char *buf) +beep_enable_show(struct device *dev, struct device_attribute *attr, char *buf) { struct nct6683_data *data = dev_get_drvdata(dev); int ret; @@ -1004,7 +1004,7 @@ error: } static ssize_t -store_global_beep(struct device *dev, struct device_attribute *attr, +beep_enable_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct nct6683_data *data = dev_get_drvdata(dev); @@ -1039,7 +1039,8 @@ error: /* Case open detection */ static ssize_t -show_caseopen(struct device *dev, struct device_attribute *attr, char *buf) +intrusion0_alarm_show(struct device *dev, struct device_attribute *attr, + char *buf) { struct nct6683_data *data = dev_get_drvdata(dev); int ret; @@ -1064,8 +1065,8 @@ error: } static ssize_t -clear_caseopen(struct device *dev, struct device_attribute *attr, - const char *buf, size_t count) +intrusion0_alarm_store(struct device *dev, struct device_attribute *attr, + const char *buf, size_t count) { struct nct6683_data *data = dev_get_drvdata(dev); unsigned long val; @@ -1102,10 +1103,8 @@ error: return count; } -static DEVICE_ATTR(intrusion0_alarm, S_IWUSR | S_IRUGO, show_caseopen, - clear_caseopen); -static DEVICE_ATTR(beep_enable, S_IWUSR | S_IRUGO, show_global_beep, - store_global_beep); +static DEVICE_ATTR_RW(intrusion0_alarm); +static DEVICE_ATTR_RW(beep_enable); static struct attribute *nct6683_attributes_other[] = { &dev_attr_intrusion0_alarm.attr, |