linux/drivers/thermal/int340x_thermal
Julia Lawall 5184eeb3b0 thermal: int340x_thermal: use permission-specific DEVICE_ATTR variants
Use DEVICE_ATTR_RW for read-write attributes.  This simplifies the
source code, improves readbility, and reduces the chance of
inconsistencies.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@rw@
declarer name DEVICE_ATTR;
identifier x,x_show,x_store;
@@

DEVICE_ATTR(x, \(0644\|S_IRUGO|S_IWUSR\), x_show, x_store);

@script:ocaml@
x << rw.x;
x_show << rw.x_show;
x_store << rw.x_store;
@@

if not (x^"_show" = x_show && x^"_store" = x_store)
then Coccilib.include_match false

@@
declarer name DEVICE_ATTR_RW;
identifier rw.x,rw.x_show,rw.x_store;
@@

- DEVICE_ATTR(x, \(0644\|S_IRUGO|S_IWUSR\), x_show, x_store);
+ DEVICE_ATTR_RW(x);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2016-11-23 10:05:25 +08:00
..
acpi_thermal_rel.c ACPI/int340x_thermal: enumerate INT340X devices even if they're not in _ART/_TRT 2015-01-06 08:17:06 +08:00
acpi_thermal_rel.h Thermal: int340x_thermal: expose acpi thermal relationship tables 2014-10-11 09:35:48 +08:00
int340x_thermal_zone.c thermal: int340x: New Interface to read trip and notify 2016-09-27 14:37:14 +08:00
int340x_thermal_zone.h thermal: int340x: New Interface to read trip and notify 2016-09-27 14:37:14 +08:00
int3400_thermal.c thermal: int340x_thermal: use permission-specific DEVICE_ATTR variants 2016-11-23 10:05:25 +08:00
int3402_thermal.c thermal: int340x: New Interface to read trip and notify 2016-09-27 14:37:14 +08:00
int3403_thermal.c thermal: int3403: Process trip change notification 2016-09-27 14:37:17 +08:00
int3406_thermal.c Thermal-INT3406: Delete owner assignment 2016-08-19 21:32:48 +08:00
Kconfig Thermal / ACPI / video: add INT3406 thermal driver 2016-05-11 02:15:31 +02:00
Makefile Thermal / ACPI / video: add INT3406 thermal driver 2016-05-11 02:15:31 +02:00
processor_thermal_device.c thermal: int340x: New Interface to read trip and notify 2016-09-27 14:37:14 +08:00