Messages in this thread | | | From | Linus Walleij <> | Date | Tue, 15 Mar 2022 01:44:43 +0100 | Subject | Re: [PATCH 0/5] gpiolib: Handle immutable irq_chip structures |
| |
On Wed, Feb 23, 2022 at 4:44 PM Marc Zyngier <maz@kernel.org> wrote:
> I recently realised that the gpiolib play ugly tricks on the > unsuspecting irq_chip structures by patching the callbacks.
Sorry about that...
> My current approach is to add a new irq_chip flag (IRQCHIP_IMMUTABLE) > which does what it says on the tin: don't you dare writing there. > Gpiolib is further updated not to install its own callbacks, and it > becomes the responsibility of the driver to call into the gpiolib when > required. This is similar to what we do for other subsystems such as > PCI-MSI.
OK if there is a precedent it is usually wise to follow.
> I'd welcome comments on the approach. If deemed acceptable, there are > another 300+ drivers to update! Not to mention the documentation. I > appreciate that this is a lot of potential changes, but the current > situation is messy.
I'm happy with this approach as long as the 300+ drivers get fixed and the old way of doing it gets deleted.
Yours, Linus Walleij
| |