From: David Schleef Date: Sat, 1 Dec 2001 04:45:54 +0000 (+0000) Subject: Change malloc.h to slab.h. Minor fixes for RTAI on PPC. X-Git-Tag: r0_7_62~82 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5e0c3c0249e3779b0d462b9ccb0c344c3d63c549;p=comedi.git Change malloc.h to slab.h. Minor fixes for RTAI on PPC. --- diff --git a/comedi/comedi_fops.c b/comedi/comedi_fops.c index 7773d9f1..93f93232 100644 --- a/comedi/comedi_fops.c +++ b/comedi/comedi_fops.c @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include diff --git a/comedi/drivers.c b/comedi/drivers.c index 50dc6b71..f98a07d1 100644 --- a/comedi/drivers.c +++ b/comedi/drivers.c @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include diff --git a/comedi/kvmem.h b/comedi/kvmem.h index 9b1960a7..fdcb19e0 100644 --- a/comedi/kvmem.h +++ b/comedi/kvmem.h @@ -5,7 +5,7 @@ #ifndef _KVMEM_H #define _KVMEM_H #include -#include +#include #include #include #include diff --git a/comedi/rt.c b/comedi/rt.c index f382a54a..4ca63814 100644 --- a/comedi/rt.c +++ b/comedi/rt.c @@ -32,14 +32,14 @@ #include #include #include -#include +#include #include #include #include "rt_pend_tq/rt_pend_tq.h" #ifdef CONFIG_COMEDI_RTAI -#include +#include #define RT_protect() hard_cli() #define RT_unprotect() hard_sti() @@ -146,12 +146,14 @@ void comedi_switch_to_rt(comedi_device *dev) struct comedi_irq_struct *it=comedi_irqs[dev->irq]; // this prevents crashes with comedi_rt_timer - if(it == NULL) + if(it == NULL){ + printk("BUG: comedi_switch_to_rt() called with bogus interrupt %d\n",dev->irq); return; + } // rt interrupts and shared interrupts don't mix if(it->flags & SA_SHIRQ){ - rt_printk("comedi: cannot switch shared interrupt to real time priority\n"); + printk("comedi: cannot switch shared interrupt to real time priority\n"); return; } @@ -204,6 +206,9 @@ void comedi_rt_pend_wakeup(wait_queue_head_t *q) /* RTAI section */ #ifdef CONFIG_COMEDI_RTAI +#ifdef CONFIG_PPC +#define HAVE_RT_REQUEST_IRQ_WITH_ARG +#endif #ifndef HAVE_RT_REQUEST_IRQ_WITH_ARG #define DECLARE_VOID_IRQ(irq) \ static void handle_void_irq_ ## irq (void){ handle_void_irq(irq);} @@ -286,8 +291,14 @@ static int rt_release_irq(struct comedi_irq_struct *it) static int rt_get_irq(struct comedi_irq_struct *it) { - rt_request_global_irq_arg(it->irq,it->handler,it->flags, + int ret; + + ret = rt_request_global_irq_arg(it->irq,it->handler,it->flags, it->device,it->dev_id); + if(ret<0){ + rt_printk("rt_request_global_irq_arg() returned %d\n",ret); + return ret; + } rt_startup_irq(it->irq); return 0;