Re: [PATCH 2/3] gpiolib: provide gpiod_to_gpio_device()

From: Andy Shevchenko
Date: Wed Oct 11 2023 - 11:29:30 EST


On Wed, Oct 11, 2023 at 4:02 PM Bartosz Golaszewski <brgl@xxxxxxxx> wrote:

...

> +struct gpio_device *gpiod_to_gpio_device(struct gpio_desc *desc)
> +{
> + if (!desc)
> + return NULL;
> +
> + return desc->gdev;

Wondering if we may use (part of) the validate_desc() (in a form of
VALIDATE_DESC_VOID() macro call).

> +}

--
With Best Regards,
Andy Shevchenko