Re: [PATCH 1/2] net: dsa: use DEVICE_ATTR_RW to declare temp1_max

2015-04-16 Thread Guenter Roeck
On Thu, Apr 16, 2015 at 02:38:18PM -0400, Vivien Didelot wrote: > Since commit da4759c, sysfs will only use the permissions returned by > is_visible, instead of OR'ing them with the default file mode. > > This allows us to declare temp1_max with the DEVICE_ATTR_RW macro and > just return the desir

Re: [PATCH 1/2] net: dsa: use DEVICE_ATTR_RW to declare temp1_max

2015-04-16 Thread Vivien Didelot
Hello Sergei, > > Since commit da4759c, sysfs will only use the permissions returned by > > Please also specify that commit's summary line in parens. Duly noted. da4759c is "sysfs: Use only return value from is_visible for the file mode" (see: https://git.kernel.org/cgit/linux/kernel/git/t

Re: [PATCH 1/2] net: dsa: use DEVICE_ATTR_RW to declare temp1_max

2015-04-16 Thread Sergei Shtylyov
Hello. On 04/16/2015 09:38 PM, Vivien Didelot wrote: Since commit da4759c, sysfs will only use the permissions returned by Please also specify that commit's summary line in parens. is_visible, instead of OR'ing them with the default file mode. This allows us to declare temp1_max with

[PATCH 1/2] net: dsa: use DEVICE_ATTR_RW to declare temp1_max

2015-04-16 Thread Vivien Didelot
Since commit da4759c, sysfs will only use the permissions returned by is_visible, instead of OR'ing them with the default file mode. This allows us to declare temp1_max with the DEVICE_ATTR_RW macro and just return the desired permissions for the hwmon sysfs attributes in dsa_hwmon_attrs_visible.