Hi Hans, Thanks for the review! On Fri, Mar 03, 2023 at 09:21:03AM +0100, Hans Verkuil wrote: > On 01/02/2023 22:45, Sakari Ailus wrote: > > Use request_irq() instead of devm_request_irq(), as a handler set using > > devm_request_irq() may still be called once the driver's remove() callback > > has been called. > > > > Also register the IRQ earlier on. > > Why register it earlier? You do not explain the reason. The device nodes are created before the interrupt handler is registered. It should happen in the other way around. I'll change tha patch description. > > Also, does this patch (and also 18/26) belong in this patch series? > It seems more like a normal bug fix and not related to life-time management. > > And isn't it the responsibility of the driver to ensure that the irqs are > masked in the remove() callback to prevent the irq from being called? > > devm_request_irq() is used a lot in the kernel, so if this is a > common issue, then just fixing it in two drivers isn't going to make > much of a difference. I came to think of this after sending the patch as well. It's memory that is the problem, any hardware access needs to end before remove is called. I'll drop the devm removal. -- Kind regrads, Sakari Ailus