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

irqchip/atmel-aic: Handle aic_common_irq_fixup in aic_common_of_init

AIC IRQ fixup is handled in each IRQ chip driver.
It can be moved into aic_common_of_init() before returning the result.
Then, aic_common_irq_fixup() can be changed to static type.

Signed-off-by: Milo Kim <milo.kim@ti.com>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Ludovic Desroches <ludovic.desroches@atmel.com>
Cc: Nicholas Ferre <nicolas.ferre@atmel.com>
Link: http://lkml.kernel.org/r/1452669592-3401-1-git-send-email-milo.kim@ti.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

authored by

Milo Kim and committed by
Thomas Gleixner
dd85c791 388f7b1d

+8 -11
+4 -2
drivers/irqchip/irq-atmel-aic-common.c
··· 193 193 } 194 194 } 195 195 196 - void __init aic_common_irq_fixup(const struct of_device_id *matches) 196 + static void __init aic_common_irq_fixup(const struct of_device_id *matches) 197 197 { 198 198 struct device_node *root = of_find_node_by_path("/"); 199 199 const struct of_device_id *match; ··· 214 214 215 215 struct irq_domain *__init aic_common_of_init(struct device_node *node, 216 216 const struct irq_domain_ops *ops, 217 - const char *name, int nirqs) 217 + const char *name, int nirqs, 218 + const struct of_device_id *matches) 218 219 { 219 220 struct irq_chip_generic *gc; 220 221 struct irq_domain *domain; ··· 265 264 } 266 265 267 266 aic_common_ext_irq_of_init(domain); 267 + aic_common_irq_fixup(matches); 268 268 269 269 return domain; 270 270
+2 -3
drivers/irqchip/irq-atmel-aic-common.h
··· 30 30 31 31 struct irq_domain *__init aic_common_of_init(struct device_node *node, 32 32 const struct irq_domain_ops *ops, 33 - const char *name, int nirqs); 33 + const char *name, int nirqs, 34 + const struct of_device_id *matches); 34 35 35 36 void __init aic_common_rtc_irq_fixup(struct device_node *root); 36 37 37 38 void __init aic_common_rtt_irq_fixup(struct device_node *root); 38 - 39 - void __init aic_common_irq_fixup(const struct of_device_id *matches); 40 39 41 40 #endif /* __IRQ_ATMEL_AIC_COMMON_H */
+1 -3
drivers/irqchip/irq-atmel-aic.c
··· 248 248 return -EEXIST; 249 249 250 250 domain = aic_common_of_init(node, &aic_irq_ops, "atmel-aic", 251 - NR_AIC_IRQS); 251 + NR_AIC_IRQS, aic_irq_fixups); 252 252 if (IS_ERR(domain)) 253 253 return PTR_ERR(domain); 254 - 255 - aic_common_irq_fixup(aic_irq_fixups); 256 254 257 255 aic_domain = domain; 258 256 gc = irq_get_domain_generic_chip(domain, 0);
+1 -3
drivers/irqchip/irq-atmel-aic5.c
··· 312 312 return -EEXIST; 313 313 314 314 domain = aic_common_of_init(node, &aic5_irq_ops, "atmel-aic5", 315 - nirqs); 315 + nirqs, aic5_irq_fixups); 316 316 if (IS_ERR(domain)) 317 317 return PTR_ERR(domain); 318 - 319 - aic_common_irq_fixup(aic5_irq_fixups); 320 318 321 319 aic5_domain = domain; 322 320 nchips = aic5_domain->revmap_size / 32;