Skip to content

Commit fbd1ec0

Browse files
z3ntudtor
authored andcommitted
Input: ili210x - fix return value of is_visible function
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: cc12ba1 ("Input: ili210x - optionally show calibrate sysfs attribute") Signed-off-by: Luca Weiss <[email protected]> Reviewed-by: Sven Van Asbroeck <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent b19efca commit fbd1ec0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/input/touchscreen/ili210x.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ static umode_t ili210x_calibrate_visible(struct kobject *kobj,
321321
struct i2c_client *client = to_i2c_client(dev);
322322
struct ili210x *priv = i2c_get_clientdata(client);
323323

324-
return priv->chip->has_calibrate_reg;
324+
return priv->chip->has_calibrate_reg ? attr->mode : 0;
325325
}
326326

327327
static const struct attribute_group ili210x_attr_group = {

0 commit comments

Comments
 (0)