lkml.org 
[lkml]   [2021]   [Jun]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] gpio: regmap: move drvdata to config data
On Fri, Jun 4, 2021 at 1:04 PM 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().
>
> Reported-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
> Signed-off-by: Michael Walle <michael@walle.cc>

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

> Btw, I'm not sure how to handle this "was part of another patch by another
> author" thing. Should I leave the Sob and just add mine?

Ideally just stack Sign-offs it is called the "delivery path".

Yours,
Linus Walleij

\
 
 \ /
  Last update: 2021-06-05 00:01    [W:1.504 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site