diff options
author | Emilio López | 2015-09-21 15:38:20 +0200 |
---|---|---|
committer | Olof Johansson | 2015-10-08 00:05:31 +0200 |
commit | 7f5028cf6190407b7a632b0f30b83187577824cc (patch) | |
tree | 5f2ebc65f91ad1d816cefa2ea686bc76188456cf /drivers/pinctrl/pinctrl-adi2.h | |
parent | platform/chrome: cros_ec: Fix possible leak in led_rgb_store() (diff) | |
download | kernel-qcow2-linux-7f5028cf6190407b7a632b0f30b83187577824cc.tar.gz kernel-qcow2-linux-7f5028cf6190407b7a632b0f30b83187577824cc.tar.xz kernel-qcow2-linux-7f5028cf6190407b7a632b0f30b83187577824cc.zip |
sysfs: Support is_visible() on binary attributes
According to the sysfs header file:
"The returned value will replace static permissions defined in
struct attribute or struct bin_attribute."
but this isn't the case, as is_visible is only called on struct attribute
only. This patch introduces a new is_bin_visible() function to implement
the same functionality for binary attributes, and updates documentation
accordingly.
Note that to keep functionality and code similar to that of normal
attributes, the mode is now checked as well to ensure it contains only
read/write permissions or SYSFS_PREALLOC.
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Emilio López <emilio.lopez@collabora.co.uk>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'drivers/pinctrl/pinctrl-adi2.h')
0 files changed, 0 insertions, 0 deletions