Re: [PATCH] pci: host: dra7xx: use GPIO descriptor

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

 



On Fri, Feb 10, 2017 at 9:45 PM, Bjorn Helgaas <helgaas@xxxxxxxxxx> wrote:

> Kishon's is slightly different because it uses devm_gpiod_get_optional()
> instead of devm_gpiod_get().

Fair enough.

> They both look slightly funny because we throw away the struct gpio_desc *
> that's returned, without ever using it anywhere (except to test for error).
> I *assume* that's what you want, since that's the way it was before the
> patch, too.

It's a hog-type usecase: when you request the GPIO it is set to a value
that you never want to change.

When the module is .exit():ed the descriptor will be garbage collected
thanks to using the devm_* accessor.

Yours,
Linus Walleij



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux