]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/thermal/thermal_sysfs.c
treewide: Use DEVICE_ATTR_RW
[mirror_ubuntu-bionic-kernel.git] / drivers / thermal / thermal_sysfs.c
index fb80c96d8f73a52a6d821a3bd57b78c08b6f5e26..c008af7fb48088fc5f50b09a97fc4aee497f14e7 100644 (file)
@@ -398,14 +398,13 @@ create_s32_tzp_attr(offset);
  */
 static DEVICE_ATTR(type, 0444, type_show, NULL);
 static DEVICE_ATTR(temp, 0444, temp_show, NULL);
-static DEVICE_ATTR(policy, S_IRUGO | S_IWUSR, policy_show, policy_store);
+static DEVICE_ATTR_RW(policy);
 static DEVICE_ATTR(available_policies, S_IRUGO, available_policies_show, NULL);
-static DEVICE_ATTR(sustainable_power, S_IWUSR | S_IRUGO, sustainable_power_show,
-                  sustainable_power_store);
+static DEVICE_ATTR_RW(sustainable_power);
 
 /* These thermal zone device attributes are created based on conditions */
-static DEVICE_ATTR(mode, 0644, mode_show, mode_store);
-static DEVICE_ATTR(passive, S_IRUGO | S_IWUSR, passive_show, passive_store);
+static DEVICE_ATTR_RW(mode);
+static DEVICE_ATTR_RW(passive);
 
 /* These attributes are unconditionally added to a thermal zone */
 static struct attribute *thermal_zone_dev_attrs[] = {