On Tue, Nov 7, 2017 at 7:15 PM, Thierry Reding <thierry.red...@gmail.com> wrote:

> From: Thierry Reding <tred...@nvidia.com>
>
> In order to avoid lockdep boilerplate in individual drivers, turn the
> gpiochip_add_data() function into a macro that creates a unique class
> key for each driver.
>
> Note that this has the slight disadvantage of adding a key for each
> driver registered with the system. However, these keys are 8 bytes in
> size, which is negligible and a small price to pay for generic
> infrastructure.
>
> Suggested-by: Grygorii Strashko <grygorii.stras...@ti.com>
> Signed-off-by: Thierry Reding <tred...@nvidia.com>

> -extern int gpiochip_add_data(struct gpio_chip *chip, void *data);
> +extern int __gpiochip_add_data(struct gpio_chip *chip, void *data,
> +                              struct lock_class_key *lock_key);

As it happens I hate __functions because this syntax is so ambigous.
So I just took the liberty to rename this
gpiochip_add_data_with_key() when applying.

Apart from that it is fine :)

Yours,
Linus Walleij

Reply via email to