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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux