]> www.infradead.org Git - users/dwmw2/linux.git/commit
usb: gadget: udc: renesas_usb3: Fix RZ/V2M {modprobe,bind} error
authorBiju Das <biju.das.jz@bp.renesas.com>
Tue, 30 May 2023 16:17:20 +0000 (17:17 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Jun 2023 14:02:12 +0000 (16:02 +0200)
commit2e88e75bff60a2eb8f9bc06a72ee77d1c1deb0f7
tree3727bd6ba8d16775dc977281d89dcf7f23c827b3
parent85102a45c7390caf124a3a5796574446f1e037b9
usb: gadget: udc: renesas_usb3: Fix RZ/V2M {modprobe,bind} error

commit 3e6ac852fbc71a234de24b5455086f6b98d3d958 upstream.

Currently {modprobe, bind} after {rmmod, unbind} results in probe failure.

genirq: Flags mismatch irq 22. 00000004 (85070400.usb3drd) vs. 00000004 (85070400.usb3drd)
renesas_usb3: probe of 85070000.usb3peri failed with error -16

The reason is, it is trying to register an interrupt handler for the same
IRQ twice. The devm_request_irq() was called with the parent device.
So the interrupt handler won't be unregistered when the usb3-peri device
is unbound.

Fix this issue by replacing "parent dev"->"dev" as the irq resource
is managed by this driver.

Fixes: 9cad72dfc556 ("usb: gadget: Add support for RZ/V2M USB3DRD driver")
Cc: stable <stable@kernel.org>
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Message-ID: <20230530161720.179927-1-biju.das.jz@bp.renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/udc/renesas_usb3.c