Re: [PATCH 1/6] gpio: make the gpiochip a real device

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

 



On Thu, Nov 05, 2015 at 10:44:11AM +0100, Johan Hovold wrote:
> On Wed, Nov 04, 2015 at 11:48:47AM +0100, Linus Walleij wrote:

> > Thinking about it maybe it's simplest to just make ->dev a pointer
> > and kzalloc() it at gpiochip_add().

> > That should solve this.

> You'd avoid ever reregistering the same struct device, but that would
> not solve the bigger life-time issue by itself.

You'd need to do something like have the file reference things via
something attached to that device and then ensure that it's made safe
(eg, by setting a pointer to NULL and then checking for that on use)
when removing the device.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux