]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
Input: ili210x - fix return value of is_visible function
authorLuca Weiss <luca@z3ntu.xyz>
Sun, 9 Feb 2020 22:42:36 +0000 (14:42 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Feb 2020 18:54:10 +0000 (19:54 +0100)
commitacac3bcff8e07fd99abb18836a1fbe231aa8f0b6
tree1254c6f892c7b0f50e07b39856f4105367007c05
parentd0f2d8f74ea4fc2870360f641cf4dfcbd1cfb4ca
Input: ili210x - fix return value of is_visible function

commit fbd1ec000213c8b457dd4fb15b6de9ba02ec5482 upstream.

The is_visible function expects the permissions associated with an
attribute of the sysfs group or 0 if an attribute is not visible.

Change the code to return the attribute permissions when the attribute
should be visible which resolves the warning:

  Attribute calibrate: Invalid permissions 01

Fixes: cc12ba1872c6 ("Input: ili210x - optionally show calibrate sysfs attribute")
Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
Reviewed-by: Sven Van Asbroeck <TheSven73@gmail.com>
Link: https://lore.kernel.org/r/20200209145628.649409-1-luca@z3ntu.xyz
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/input/touchscreen/ili210x.c