Re: [PATCH] usb: gadget: udc: renesas_usb3: Fix RZ/V2M {modprobe,bind} error

From: Marc Zyngier
Date: Mon May 29 2023 - 07:15:39 EST


On Mon, 29 May 2023 11:03:27 +0100,
Biju Das <biju.das.jz@xxxxxxxxxxxxxx> wrote:
>
> > Do you understand the meaning of the "dev" parameter you pass to
> > devm_request_irq()?
>
> Yes, the resource is managed with particular device.

So what does it tell you about the life cycle of the interrupt you
request with the *wrong* device?

> I should not use devm_request_irq here. rather should use
> request_irq and free_irq during unload with parent device handle.

No, that's just papering over the real issue. You should just get the
driver that handles the interrupt to request it. Anything else is a
design bug.

M.

--
Without deviation from the norm, progress is not possible.