]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: use DEVICE_ATTR_RW to declare temp1_max
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>
Fri, 17 Apr 2015 19:12:25 +0000 (15:12 -0400)
committerDavid S. Miller <davem@davemloft.net>
Fri, 17 Apr 2015 19:58:37 +0000 (15:58 -0400)
commit630fbf92403447e7a65dad1021d050e5a6fe4b86
tree4da80804e57296d9cbe7a48f22d6734b557c9c64
parent292a6c35ad3a2bfbb7cfb934862f2295d1401fcb
net: dsa: use DEVICE_ATTR_RW to declare temp1_max

Since commit b87cfd2 (sysfs: Use only return value from is_visible for
the file mode), it is possible to reduce the permissions of a file.

So declare temp1_max with the DEVICE_ATTR_RW macro and remove the write
permission in dsa_hwmon_attrs_visible if set_temp_limit isn't provided.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/dsa.c