Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

irqchip: Allow extra fields to be passed to IRQCHIP_PLATFORM_DRIVER_END

IRQCHIP_PLATFORM_DRIVER_* doesn't allow some fields (such as .pm)
to be set in the platform_driver structure.

Make IRQCHIP_PLATFORM_DRIVER_END variadic so that .pm or another
field can be set if needed.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
[maz: revamped commit message]
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220922161246.20586-3-Frank.Li@nxp.com

authored by

Frank Li and committed by
Marc Zyngier
334f7d42 aecd1de3

+3 -1
+3 -1
include/linux/irqchip.h
··· 44 44 #define IRQCHIP_MATCH(compat, fn) { .compatible = compat, \ 45 45 .data = typecheck_irq_init_cb(fn), }, 46 46 47 - #define IRQCHIP_PLATFORM_DRIVER_END(drv_name) \ 47 + 48 + #define IRQCHIP_PLATFORM_DRIVER_END(drv_name, ...) \ 48 49 {}, \ 49 50 }; \ 50 51 MODULE_DEVICE_TABLE(of, drv_name##_irqchip_match_table); \ ··· 57 56 .owner = THIS_MODULE, \ 58 57 .of_match_table = drv_name##_irqchip_match_table, \ 59 58 .suppress_bind_attrs = true, \ 59 + __VA_ARGS__ \ 60 60 }, \ 61 61 }; \ 62 62 builtin_platform_driver(drv_name##_driver)