From: Bartosz Golaszewski <brgl@bgdev.pl>
To: Stephen Boyd <swboyd@chromium.org>
Cc: Linus Walleij <linus.walleij@linaro.org>,
linux-kernel@vger.kernel.org, patches@lists.linux.dev,
linux-gpio@vger.kernel.org,
Dmitry Torokhov <dmitry.torokhov@gmail.com>
Subject: Re: [PATCH v2] gpiolib: Pass consumer device through to core in devm_fwnode_gpiod_get_index()
Date: Tue, 27 Feb 2024 14:18:22 +0100 [thread overview]
Message-ID: <CAMRc=McvYEuK-0bfF67qDbb5FS017NcMkOGaLtWucx3LYL0DMQ@mail.gmail.com> (raw)
In-Reply-To: <20240223065254.3795204-1-swboyd@chromium.org>
On Fri, Feb 23, 2024 at 7:52 AM Stephen Boyd <swboyd@chromium.org> wrote:
>
> This devm API takes a consumer device as an argument to setup the devm
> action, but throws it away when calling further into gpiolib. This leads
> to odd debug messages like this:
>
> (NULL device *): using DT '/gpio-keys/switch-pen-insert' for '(null)' GPIO lookup
>
> Let's pass the consumer device down, by directly calling what
> fwnode_gpiod_get_index() calls but pass the device used for devm. This
> changes the message to look like this instead:
>
> gpio-keys gpio-keys: using DT '/gpio-keys/switch-pen-insert' for '(null)' GPIO lookup
>
> Note that callers of fwnode_gpiod_get_index() will still see the NULL
> device pointer debug message, but there's not much we can do about that
> because the API doesn't take a struct device.
>
> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> Fixes: 8eb1f71e7acc ("gpiolib: consolidate GPIO lookups")
> Signed-off-by: Stephen Boyd <swboyd@chromium.org>
> ---
Applied, thanks!
Bart
next prev parent reply other threads:[~2024-02-27 13:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-23 6:52 [PATCH v2] gpiolib: Pass consumer device through to core in devm_fwnode_gpiod_get_index() Stephen Boyd
2024-02-27 13:18 ` Bartosz Golaszewski [this message]
2024-02-28 18:57 ` Andy Shevchenko
2024-02-28 21:28 ` Bartosz Golaszewski
2024-02-28 21:35 ` Andy Shevchenko
2024-02-28 21:37 ` Bartosz Golaszewski
2024-02-28 21:38 ` Stephen Boyd
2024-02-29 10:58 ` Andy Shevchenko
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='CAMRc=McvYEuK-0bfF67qDbb5FS017NcMkOGaLtWucx3LYL0DMQ@mail.gmail.com' \
--to=brgl@bgdev.pl \
--cc=dmitry.torokhov@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@lists.linux.dev \
--cc=swboyd@chromium.org \
/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).