diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2018-04-03 15:19:04 +0530 |
---|---|---|
committer | Zhang Rui <rui.zhang@intel.com> | 2018-05-22 10:07:23 +0800 |
commit | e76a4386b2f57e187d617bef947feda9e84d422f (patch) | |
tree | 52cdbdf189fb5a5b45a76db6e89c122b80f4a75c /drivers/thermal/thermal_sysfs.c | |
parent | 33e678d47d1f3e8d485d38c87bc494ad7bf697f0 (diff) | |
download | linux-e76a4386b2f57e187d617bef947feda9e84d422f.tar.bz2 |
thermal: Use DEVICE_ATTR_{RO|RW|WO}() variants
Use the DEVICE_ATTR_{RO|RW|WO}() variants instead of DEVICE_ATTR().
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Diffstat (limited to 'drivers/thermal/thermal_sysfs.c')
-rw-r--r-- | drivers/thermal/thermal_sysfs.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/thermal/thermal_sysfs.c b/drivers/thermal/thermal_sysfs.c index ba1df6953da6..721726565fef 100644 --- a/drivers/thermal/thermal_sysfs.c +++ b/drivers/thermal/thermal_sysfs.c @@ -381,7 +381,7 @@ sustainable_power_store(struct device *dev, struct device_attribute *devattr, \ return count; \ } \ - static DEVICE_ATTR(name, S_IWUSR | S_IRUGO, name##_show, name##_store) + static DEVICE_ATTR_RW(name) create_s32_tzp_attr(k_po); create_s32_tzp_attr(k_pu); @@ -724,8 +724,8 @@ cur_state_store(struct device *dev, struct device_attribute *attr, static struct device_attribute dev_attr_cdev_type = __ATTR(type, 0444, cdev_type_show, NULL); -static DEVICE_ATTR(max_state, 0444, max_state_show, NULL); -static DEVICE_ATTR(cur_state, 0644, cur_state_show, cur_state_store); +static DEVICE_ATTR_RO(max_state); +static DEVICE_ATTR_RW(cur_state); static struct attribute *cooling_device_attrs[] = { &dev_attr_cdev_type.attr, @@ -886,10 +886,10 @@ static ssize_t trans_table_show(struct device *dev, return len; } -static DEVICE_ATTR(total_trans, 0444, total_trans_show, NULL); -static DEVICE_ATTR(time_in_state_ms, 0444, time_in_state_ms_show, NULL); -static DEVICE_ATTR(reset, 0200, NULL, reset_store); -static DEVICE_ATTR(trans_table, 0444, trans_table_show, NULL); +static DEVICE_ATTR_RO(total_trans); +static DEVICE_ATTR_RO(time_in_state_ms); +static DEVICE_ATTR_WO(reset); +static DEVICE_ATTR_RO(trans_table); static struct attribute *cooling_device_stats_attrs[] = { &dev_attr_total_trans.attr, |