#include <asm/processor.h>
#include <asm/immap.h>
-#define NR_IRQS (CFG_NUM_IRQS)
+#define NR_IRQS (CONFIG_SYS_NUM_IRQS)
/*
* Interrupt vector functions.
*/
void irq_install_handler (int vec, interrupt_handler_t * handler, void *arg)
{
- if ((vec < 0) || (vec > NR_IRQS)) {
+ if ((vec < 0) || (vec >= NR_IRQS)) {
printf ("irq_install_handler: wrong interrupt vector %d\n",
vec);
return;
void irq_free_handler (int vec)
{
- if ((vec < 0) || (vec > NR_IRQS)) {
+ if ((vec < 0) || (vec >= NR_IRQS)) {
return;
}
vec = (fp->vector >> 2) & 0xff;
if (vec > 0x40)
vec -= 0x40;
- else
- return;
if (irq_vecs[vec].handler != NULL) {
irq_vecs[vec].handler (irq_vecs[vec].arg);