Skip to content

Commit

Permalink
irqchip: Allow extra fields to be passed to IRQCHIP_PLATFORM_DRIVER_END
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Frank Li authored and Marc Zyngier committed Sep 28, 2022
1 parent aecd1de commit 334f7d4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion include/linux/irqchip.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ static const struct of_device_id drv_name##_irqchip_match_table[] = {
#define IRQCHIP_MATCH(compat, fn) { .compatible = compat, \
.data = typecheck_irq_init_cb(fn), },

#define IRQCHIP_PLATFORM_DRIVER_END(drv_name) \

#define IRQCHIP_PLATFORM_DRIVER_END(drv_name, ...) \
{}, \
}; \
MODULE_DEVICE_TABLE(of, drv_name##_irqchip_match_table); \
Expand All @@ -56,6 +57,7 @@ static struct platform_driver drv_name##_driver = { \
.owner = THIS_MODULE, \
.of_match_table = drv_name##_irqchip_match_table, \
.suppress_bind_attrs = true, \
__VA_ARGS__ \
}, \
}; \
builtin_platform_driver(drv_name##_driver)
Expand Down

0 comments on commit 334f7d4

Please sign in to comment.