回复: [PATCH 11/11] irqchip: Pass platform device to platform drivers

From: Changhuang Liang

Date: Tue Oct 14 2025 - 03:43:57 EST


Hi, Johan

Thanks for the patch.

> The IRQCHIP_PLATFORM_DRIVER macros can be used to convert OF irqchip
> drivers to platform drivers but currently reuse the OF init callback prototype
> that only takes OF nodes as arguments. This forces drivers to do reverse
> lookups of their struct devices during probe if they need them for things like
> dev_printk() and device managed resources.
>
> Half of the drivers doing reverse lookups also currently fail to release the
> additional reference taken during the lookup, while other drivers have had the
> reference leak plugged in various ways (e.g. using non-intuitive cleanup
> constructs which still confuse static checkers).
>
> Switch to using a probe callback that takes a platform device as its first
> argument to simplify drivers and plug the remaining (mostly
> benign) reference leaks.
>
> Fixes: 32c6c054661a ("irqchip: Add Broadcom BCM2712 MSI-X interrupt
> controller")
> Fixes: 70afdab904d2 ("irqchip: Add IMX MU MSI controller driver")
> Fixes: a6199bb514d8 ("irqchip: Add Qualcomm MPM controller driver")
> Signed-off-by: Johan Hovold <johan@xxxxxxxxxx>

Reviewed-by: Changhuang Liang <changhuang.liang@xxxxxxxxxxxxxxxx>