summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHerve Codina <herve.codina@bootlin.com>2024-06-14 19:32:19 +0200
committerThomas Gleixner <tglx@linutronix.de>2024-06-17 15:48:15 +0200
commit2ada5ed6ecac06e32defe39b15b33e9a6b004413 (patch)
treeb64cf591629fb3ba121d320a72a4ea1e336034e9
parent7c53626cd11820a11f9cb2c54c02d47fc062a265 (diff)
downloadlinux-stable-2ada5ed6ecac06e32defe39b15b33e9a6b004413.tar.gz
linux-stable-2ada5ed6ecac06e32defe39b15b33e9a6b004413.tar.bz2
linux-stable-2ada5ed6ecac06e32defe39b15b33e9a6b004413.zip
irqdomain: Convert domain creation functions to irq_domain_instantiate()
Domain creation functions use __irq_domain_add(). With the introduction of irq_domain_instantiate(), __irq_domain_add() becomes obsolete. In order to fully remove __irq_domain_add(), convert domain creation function to irq_domain_instantiate() Signed-off-by: Herve Codina <herve.codina@bootlin.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/r/20240614173232.1184015-19-herve.codina@bootlin.com
-rw-r--r--kernel/irq/irqdomain.c26
1 files changed, 21 insertions, 5 deletions
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index 4d2a40359eb2..c9b076c09eb4 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -442,10 +442,17 @@ struct irq_domain *irq_domain_create_simple(struct fwnode_handle *fwnode,
const struct irq_domain_ops *ops,
void *host_data)
{
+ struct irq_domain_info info = {
+ .fwnode = fwnode,
+ .size = size,
+ .hwirq_max = size,
+ .ops = ops,
+ .host_data = host_data,
+ };
struct irq_domain *domain;
- domain = __irq_domain_add(fwnode, size, size, 0, ops, host_data);
- if (!domain)
+ domain = irq_domain_instantiate(&info);
+ if (IS_ERR(domain))
return NULL;
if (first_irq > 0) {
@@ -498,11 +505,20 @@ struct irq_domain *irq_domain_create_legacy(struct fwnode_handle *fwnode,
const struct irq_domain_ops *ops,
void *host_data)
{
+ struct irq_domain_info info = {
+ .fwnode = fwnode,
+ .size = first_hwirq + size,
+ .hwirq_max = first_hwirq + size,
+ .ops = ops,
+ .host_data = host_data,
+ };
struct irq_domain *domain;
- domain = __irq_domain_add(fwnode, first_hwirq + size, first_hwirq + size, 0, ops, host_data);
- if (domain)
- irq_domain_associate_many(domain, first_irq, first_hwirq, size);
+ domain = irq_domain_instantiate(&info);
+ if (IS_ERR(domain))
+ return NULL;
+
+ irq_domain_associate_many(domain, first_irq, first_hwirq, size);
return domain;
}