Hi Luca, On Tue, Jan 13, 2026 at 6:31 PM Luca Ceresoli <[email protected]> wrote: [...] > >> @@ -789,8 +789,12 @@ static void meson_dw_hdmi_unbind(struct device *dev, > >> struct device *master, > >> void *data) > >> { > >> struct meson_dw_hdmi *meson_dw_hdmi = dev_get_drvdata(dev); > >> + struct platform_device *pdev = to_platform_device(dev); > >> + int irq = platform_get_irq(pdev, 0); > >> > >> + devm_free_irq(dev, irq, meson_dw_hdmi); > > I have one question (so I can understand things better): > > is there a particular reason why you went with free'ing the IRQ > > instead of "just" masking it (so the hardware won't fire anymore of > > those IRQs)? > > One reason is symmetry: _bind requests the irq, so _unbind does the > reverse. > > Another is I don't have the hardware, so I wanted my changes to be as small > and clear as possible. Understood, thanks!
> In principle one could request/free the irq in probe/remove and then > enable/disable it in bind/unbind. Whether it would be a good or bad idea I > don't know, but surely it would be more complex and I wouldn't want to do > it without any chance to test it on hardware. > > Also, that would only optimize the case of multiple bind/unbind cycles, > which are not quite realistic without bridge hotplug. And brigde hotplug > does not exist yet in mainline, and when it will arrive it will be used > only for a few use cases. > > I hope this answers your question. Yes, I was curious whether you considered devm_free_irq() as the only "correct" approach (in this case I would have recommended a comment) or whether other approaches are fine too. This is useful knowledge for me in case we ever need to restructure the driver. Best regards, Martin
