0001
0002
0003
0004
0005
0006 #include <linux/interrupt.h>
0007 #include <linux/of_irq.h>
0008
0009 #include "pseries.h"
0010
0011 void __init request_event_sources_irqs(struct device_node *np,
0012 irq_handler_t handler,
0013 const char *name)
0014 {
0015 int i, virq, rc;
0016
0017 for (i = 0; i < 16; i++) {
0018 virq = of_irq_get(np, i);
0019 if (virq < 0)
0020 return;
0021 if (WARN(!virq, "event-sources: Unable to allocate "
0022 "interrupt number for %pOF\n", np))
0023 continue;
0024
0025 rc = request_irq(virq, handler, 0, name, NULL);
0026 if (WARN(rc, "event-sources: Unable to request interrupt %d for %pOF\n",
0027 virq, np))
0028 return;
0029 }
0030 }