From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
To: Michael Walle <michael@walle.cc>
Cc: linux-gpio <linux-gpio@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Linus Walleij <linus.walleij@linaro.org>,
Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Subject: Re: [PATCH v2] gpio: regmap: move drvdata to config data
Date: Mon, 7 Jun 2021 15:39:44 +0200 [thread overview]
Message-ID: <CAMpxmJWQf6JYy9CBD0Avp_KP5KqL6ew05ohGLmHyzX62hu1f3A@mail.gmail.com> (raw)
In-Reply-To: <20210604225857.18694-1-michael@walle.cc>
On Sat, Jun 5, 2021 at 1:01 AM Michael Walle <michael@walle.cc> wrote:
>
> Drop gpio_regmap_set_drvdata() and instead add it to the configuration
> data passed to gpio_regmap_register().
>
> gpio_regmap_set_drvdata() can't really be used in a race free way. This
> is because the gpio_regmap object which is needed by _set_drvdata() is
> returned by gpio_regmap_register(). On the other hand, the callbacks
> which use the drvdata might already be called right after the
> gpiochip_add() call in gpio_regmap_register(). Therefore, we have to
> provide the drvdata early before we call gpiochip_add().
>
> Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
> Signed-off-by: Michael Walle <michael@walle.cc>
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
> ---
Applied, thanks!
Bart
prev parent reply other threads:[~2021-06-07 13:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-04 22:58 [PATCH v2] gpio: regmap: move drvdata to config data Michael Walle
2021-06-07 13:39 ` Bartosz Golaszewski [this message]
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=CAMpxmJWQf6JYy9CBD0Avp_KP5KqL6ew05ohGLmHyzX62hu1f3A@mail.gmail.com \
--to=bgolaszewski@baylibre.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matti.vaittinen@fi.rohmeurope.com \
--cc=michael@walle.cc \
/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).