From: Sven Van Asbroeck <thesven73@gmail.com>
To: Luca Weiss <luca@z3ntu.xyz>
Cc: linux-input@vger.kernel.org,
~postmarketos/upstreaming@lists.sr.ht,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Marek Vasut <marex@denx.de>, Thomas Gleixner <tglx@linutronix.de>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Input: ili210x - fix return value of is_visible function
Date: Mon, 10 Feb 2020 10:07:34 -0500 [thread overview]
Message-ID: <CAGngYiUCC10epFwLO7wXMT-ko2g-zXRDecMwaK5=Y4nCCHHVEw@mail.gmail.com> (raw)
In-Reply-To: <20200209145628.649409-1-luca@z3ntu.xyz>
Luca,
Good catch. That's what happens when I post a patch I can't test :)
Reviewed-by: Sven Van Asbroeck <TheSven73@gmail.com>
On Sun, Feb 9, 2020 at 9:58 AM Luca Weiss <luca@z3ntu.xyz> wrote:
>
> 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>
> ---
> drivers/input/touchscreen/ili210x.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/input/touchscreen/ili210x.c b/drivers/input/touchscreen/ili210x.c
> index 37526baff8a6..199cf3daec10 100644
> --- a/drivers/input/touchscreen/ili210x.c
> +++ b/drivers/input/touchscreen/ili210x.c
> @@ -351,7 +351,7 @@ static umode_t ili210x_calibrate_visible(struct kobject *kobj,
> struct i2c_client *client = to_i2c_client(dev);
> struct ili210x *priv = i2c_get_clientdata(client);
>
> - return priv->chip->has_calibrate_reg;
> + return priv->chip->has_calibrate_reg ? attr->mode : 0;
> }
>
> static const struct attribute_group ili210x_attr_group = {
> --
> 2.25.0
>
next prev parent reply other threads:[~2020-02-10 15:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-09 14:56 [PATCH] Input: ili210x - fix return value of is_visible function Luca Weiss
2020-02-10 15:07 ` Sven Van Asbroeck [this message]
2020-02-15 23:48 ` Dmitry Torokhov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAGngYiUCC10epFwLO7wXMT-ko2g-zXRDecMwaK5=Y4nCCHHVEw@mail.gmail.com' \
--to=thesven73@gmail.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luca@z3ntu.xyz \
--cc=marex@denx.de \
--cc=tglx@linutronix.de \
--cc=~postmarketos/upstreaming@lists.sr.ht \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).