From 719782f5e0a2d5ab80673f5b4f5a7b4ed2a6b93a Mon Sep 17 00:00:00 2001 From: David Schleef Date: Wed, 9 Feb 2000 23:55:47 +0000 Subject: [PATCH] RTL fixes, export functions for kcomedilib --- comedi/Makefile | 4 ++++ comedi/comedi_ksyms.c | 5 +++++ comedi/rtl.c | 46 +++++++++++++++++++------------------------ 3 files changed, 29 insertions(+), 26 deletions(-) diff --git a/comedi/Makefile b/comedi/Makefile index bbc0046d..3e0ae4c2 100644 --- a/comedi/Makefile +++ b/comedi/Makefile @@ -17,6 +17,10 @@ MI_OBJS := comedi_fops.o dummy.o proc.o range.o drivers.o kvmem.o MIX_OBJS := comedi_ksyms.o +ifeq ($(CONFIG_COMEDI_RT),y) +MI_OBJS += rt.o +endif + ifeq ($(CONFIG_COMEDI_RTL),y) MI_OBJS += rtl.o endif diff --git a/comedi/comedi_ksyms.c b/comedi/comedi_ksyms.c index 751447ed..e9962ad9 100644 --- a/comedi/comedi_ksyms.c +++ b/comedi/comedi_ksyms.c @@ -66,6 +66,11 @@ EXPORT_SYMBOL(do_pack); EXPORT_SYMBOL(di_unpack); EXPORT_SYMBOL(comedi_eobuf); EXPORT_SYMBOL(comedi_eos); +#ifdef CONFIG_COMEDI_RT +EXPORT_SYMBOL(comedi_change_irq_flags); +EXPORT_SYMBOL(comedi_free_irq); +EXPORT_SYMBOL(comedi_request_irq); +#endif /* for kcomedilib */ EXPORT_SYMBOL(comedi_devices); diff --git a/comedi/rtl.c b/comedi/rtl.c index 98a0a357..554da70c 100644 --- a/comedi/rtl.c +++ b/comedi/rtl.c @@ -21,6 +21,7 @@ +#if 0 /* rt_printk() section */ #define BUF_LEN (16384) @@ -76,23 +77,6 @@ int rt_printk(const char *fmt, ...) return len; } - -void rt_printk_interrupt(int irq,void *junk,struct pt_regs *regs) -{ - int tmp; - - for(;;){ - tmp=buf_front; - if(buf_back>tmp){ - printk("%.*s",BUF_LEN-buf_back,rt_printk_buf+buf_back); - buf_back=0; - } - if(buf_back==tmp)break; - printk("%.*s",tmp-buf_back,rt_printk_buf+buf_back); - buf_back=tmp; - } -} - void rt_printk_cleanup(void) { free_irq(rt_printk_irq,NULL); @@ -110,6 +94,23 @@ int rt_printk_init(void) return 0; } +void rt_printk_interrupt(int irq,void *junk,struct pt_regs *regs) +{ + int tmp; + + for(;;){ + tmp=buf_front; + if(buf_back>tmp){ + printk("%.*s",BUF_LEN-buf_back,rt_printk_buf+buf_back); + buf_back=0; + } + if(buf_back==tmp)break; + printk("%.*s",tmp-buf_back,rt_printk_buf+buf_back); + buf_back=tmp; + } +} +#endif + #if 0 @@ -184,13 +185,6 @@ struct rtl_file_operations comedi_rtl_fops={ #endif -static struct comedi_irq_struct rtl_irq_struct; - -struct comedi_irq_struct * get_irq_struct(unsigned int irq) -{ - return &rtl_irq_struct; -} - static unsigned int handle_rtl_irq(unsigned int irq,struct pt_regs *regs) { struct comedi_irq_struct *it; @@ -219,13 +213,13 @@ int free_priority_irq(struct comedi_irq_struct *it) void comedi_rtl_init(void) { - rt_printk_init(); + //rt_printk_init(); //rtl_register_chardev(COMEDI_MAJOR,"comedi",&comedi_rtl_fops); } void comedi_rtl_cleanup(void) { - rt_printk_cleanup(); + //rt_printk_cleanup(); //rtl_unregister_chardev(COMEDI_MAJOR); } -- 2.26.2