From: David Schleef Date: Thu, 13 Jul 2000 00:46:26 +0000 (+0000) Subject: module, Makefile, config changes X-Git-Tag: r0_7_46~9 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=31e704e8308de837cade1cf044dedb11ba36931e;p=comedi.git module, Makefile, config changes --- diff --git a/comedi/Config.in b/comedi/Config.in index e9fa10c4..229b9e35 100644 --- a/comedi/Config.in +++ b/comedi/Config.in @@ -3,7 +3,6 @@ comment 'Comedi Features' #bool 'Backwards compatibility' CONFIG_COMEDI_BACKWARDS -tristate 'Kernel Comedilib' CONFIG_COMEDI_KLIB if [ "$CONFIG_RTL" = "y" ];then bool 'Real-time support' CONFIG_COMEDI_RT if [ "$CONFIG_COMEDI_RT" = "y" ];then @@ -20,69 +19,70 @@ fi bool 'Verbose Debugging' CONFIG_COMEDI_DEBUG #bool 'Version 0.8 support' CONFIG_COMEDI_VER08 -comment 'Hardware device drivers' +dep_tristate 'Kernel Comedilib' CONFIG_COMEDI_KLIB $CONFIG_COMEDI +comment 'Hardware device drivers' bool 'Data Translation boards' CONFIG_COMEDI_DT if [ "$CONFIG_COMEDI_DT" = "y" ];then - tristate ' DT 2801' CONFIG_COMEDI_DT2801 - tristate ' DT 2811' CONFIG_COMEDI_DT2811 - tristate ' DT 2814' CONFIG_COMEDI_DT2814 - tristate ' DT 2815' CONFIG_COMEDI_DT2815 - tristate ' DT 2817' CONFIG_COMEDI_DT2817 - tristate ' DT 2821 series' CONFIG_COMEDI_DT282x + dep_tristate ' DT 2801' CONFIG_COMEDI_DT2801 $CONFIG_COMEDI + dep_tristate ' DT 2811' CONFIG_COMEDI_DT2811 $CONFIG_COMEDI + dep_tristate ' DT 2814' CONFIG_COMEDI_DT2814 $CONFIG_COMEDI + dep_tristate ' DT 2815' CONFIG_COMEDI_DT2815 $CONFIG_COMEDI + dep_tristate ' DT 2817' CONFIG_COMEDI_DT2817 $CONFIG_COMEDI + dep_tristate ' DT 2821 series' CONFIG_COMEDI_DT282x $CONFIG_COMEDI if [ "$CONFIG_PCI" = "y" ];then - tristate ' DT3000' CONFIG_COMEDI_DT3000 + dep_tristate ' DT3000' CONFIG_COMEDI_DT3000 $CONFIG_COMEDI fi fi bool 'National Instruments boards' CONFIG_COMEDI_NI if [ "$CONFIG_COMEDI_NI" = "y" ];then - tristate ' AT-MIO E series' CONFIG_COMEDI_NI_ATMIO + dep_tristate ' AT-MIO E series' CONFIG_COMEDI_NI_ATMIO $CONFIG_COMEDI if [ "$CONFIG_PCMCIA" = "y" -o "$CONFIG_PCMCIA" = "m" ];then - tristate ' PCMCIA MIO E series' CONFIG_COMEDI_NI_MIO_CS + dep_tristate ' PCMCIA MIO E series' CONFIG_COMEDI_NI_MIO_CS $CONFIG_COMEDI fi if [ "$CONFIG_PCI" = "y" ];then - tristate ' PCI-MIO E series' CONFIG_COMEDI_NI_PCIMIO - tristate ' NI PCI-DIO series' CONFIG_COMEDI_NI_PCIDIO + dep_tristate ' PCI-MIO E series' CONFIG_COMEDI_NI_PCIMIO $CONFIG_COMEDI + dep_tristate ' NI PCI-DIO series' CONFIG_COMEDI_NI_PCIDIO $CONFIG_COMEDI if [ "$CONFIG_COMEDI_NI_PCIMIO" = "y" -o "$CONFIG_COMEDI_NI_PCIDIO" = "y" ];then define_bool CONFIG_COMEDI_MITE y else if [ "$CONFIG_COMEDI_NI_PCIMIO" = "m" -o "$CONFIG_COMEDI_NI_PCIDIO" = "m" ];then - define_bool CONFIG_COMEDI_MITE y + define_bool CONFIG_COMEDI_MITE m fi fi fi - tristate ' AT-MIO-16D' CONFIG_COMEDI_NI_ATMIO16D + dep_tristate ' AT-MIO-16D' CONFIG_COMEDI_NI_ATMIO16D $CONFIG_COMEDI fi -tristate 'new DAS08 compatible driver' CONFIG_COMEDI_DAS08_NEW -tristate 'new DAS16 compatible driver' CONFIG_COMEDI_DAS16_NEW -tristate 'Computer Boards DAS-08 series' CONFIG_COMEDI_DAS08 -tristate 'Computer Boards DAS-08jr' CONFIG_COMEDI_DAS08JR -tristate 'Keithley Metrabyte DAS-1600 and compatibles' CONFIG_COMEDI_DAS1600 -tristate 'DAS16' CONFIG_COMEDI_DAS16 -tristate 'DAS-6402 and compatibles' CONFIG_COMEDI_DAS6402 -tristate 'Generic 8255 support' CONFIG_COMEDI_8255 -tristate 'Quanser Consulting MultiQ-3' CONFIG_COMEDI_MULTIQ3 -tristate 'Generic parallel port support' CONFIG_COMEDI_PARPORT -tristate 'PCL-711, PCL-711b, ACL-8112, and compatibles' CONFIG_COMEDI_PCL711 -tristate 'PCL-725' CONFIG_COMEDI_PCL725 -tristate 'PCL-726' CONFIG_COMEDI_PCL726 -tristate 'Advantech PCL-812PG, PCL-813B' CONFIG_COMEDI_PCL812 -tristate 'Advantech PCL-818/L/H/HD/HG, PCL-718' CONFIG_COMEDI_PCL818 -tristate 'Analog Devices RTI-800/815' CONFIG_COMEDI_RTI800 -tristate 'Analog Devices RTI-802' CONFIG_COMEDI_RTI802 -tristate 'Intelligent Instrumentation PCI-20001C' CONFIG_COMEDI_II_PCI20KC +dep_tristate 'new DAS08 compatible driver' CONFIG_COMEDI_DAS08_NEW $CONFIG_COMEDI +dep_tristate 'new DAS16 compatible driver' CONFIG_COMEDI_DAS16_NEW $CONFIG_COMEDI +dep_tristate 'Computer Boards DAS-08 series' CONFIG_COMEDI_DAS08 $CONFIG_COMEDI +dep_tristate 'Computer Boards DAS-08jr' CONFIG_COMEDI_DAS08JR $CONFIG_COMEDI +dep_tristate 'Keithley Metrabyte DAS-1600 and compatibles' CONFIG_COMEDI_DAS1600 $CONFIG_COMEDI +dep_tristate 'DAS16' CONFIG_COMEDI_DAS16 $CONFIG_COMEDI +dep_tristate 'DAS-6402 and compatibles' CONFIG_COMEDI_DAS6402 $CONFIG_COMEDI +dep_tristate 'Generic 8255 support' CONFIG_COMEDI_8255 $CONFIG_COMEDI +dep_tristate 'Quanser Consulting MultiQ-3' CONFIG_COMEDI_MULTIQ3 $CONFIG_COMEDI +dep_tristate 'Generic parallel port support' CONFIG_COMEDI_PARPORT $CONFIG_COMEDI +dep_tristate 'PCL-711, PCL-711b, ACL-8112, and compatibles' CONFIG_COMEDI_PCL711 $CONFIG_COMEDI +dep_tristate 'PCL-725' CONFIG_COMEDI_PCL725 $CONFIG_COMEDI +dep_tristate 'PCL-726' CONFIG_COMEDI_PCL726 $CONFIG_COMEDI +dep_tristate 'Advantech PCL-812PG, PCL-813B' CONFIG_COMEDI_PCL812 $CONFIG_COMEDI +dep_tristate 'Advantech PCL-818/L/H/HD/HG, PCL-718' CONFIG_COMEDI_PCL818 $CONFIG_COMEDI +dep_tristate 'Analog Devices RTI-800/815' CONFIG_COMEDI_RTI800 $CONFIG_COMEDI +dep_tristate 'Analog Devices RTI-802' CONFIG_COMEDI_RTI802 $CONFIG_COMEDI +dep_tristate 'Intelligent Instrumentation PCI-20001C' CONFIG_COMEDI_II_PCI20KC $CONFIG_COMEDI if [ "$CONFIG_PCI" = "y" ];then - tristate 'IOtech DaqBoard/2000' CONFIG_COMEDI_DAQBOARD2000 + dep_tristate 'IOtech DaqBoard/2000' CONFIG_COMEDI_DAQBOARD2000 $CONFIG_COMEDI fi if [ "$CONFIG_COMEDI_RT" = "y" ];then comment 'Virtual device drivers' - tristate 'Command emulator (timer)' CONFIG_COMEDI_VD_TIMER - tristate 'Direct Digital Synthesis' CONFIG_COMEDI_VD_DDS + dep_tristate 'Command emulator (timer)' CONFIG_COMEDI_VD_TIMER $CONFIG_COMEDI + dep_tristate 'Direct Digital Synthesis' CONFIG_COMEDI_VD_DDS $CONFIG_COMEDI fi diff --git a/comedi/Makefile b/comedi/Makefile index 7ec368e7..fc645293 100644 --- a/comedi/Makefile +++ b/comedi/Makefile @@ -5,6 +5,8 @@ ALL_SUB_DIRS := kcomedilib drivers realtime MOD_SUB_DIRS := drivers MOD_IN_SUB_DIRS := +EXTRA_CFLAGS := -I . + ifneq ($(CONFIG_COMEDI_KLIB),n) MOD_SUB_DIRS += kcomedilib SUB_DIRS += kcomedilib @@ -17,9 +19,17 @@ endif MOD_LIST_NAME := MISC_MODULES -M_OBJS := comedi.o -MI_OBJS := comedi_fops.o dummy.o proc.o range.o drivers.o kvmem.o -MIX_OBJS := comedi_ksyms.o +ifeq ($(CONFIG_COMEDI),y) + O_TARGET := comedi.o + O_OBJS := comedi_fops.o dummy.o proc.o range.o drivers.o kvmem.o + OX_OBJS := comedi_ksyms.o +else + ifeq ($(CONFIG_COMEDI),m) + M_OBJS := comedi.o + MI_OBJS := comedi_fops.o dummy.o proc.o range.o drivers.o kvmem.o + MIX_OBJS := comedi_ksyms.o + endif +endif ifeq ($(CONFIG_COMEDI_RT),y) @@ -38,28 +48,13 @@ ifeq ($(CONFIG_COMEDI_RTL_V1),y) MI_OBJS += rtl_v1.o endif -#range-y := range.c -#range-$(CONFIG_COMEDI_DT2801) += drivers/dt2801.c -#range-$(CONFIG_COMEDI_DT2811) += drivers/dt2811.c -#range-$(CONFIG_COMEDI_DT2815) += drivers/dt2815.c -#range-$(CONFIG_COMEDI_DT282x) += drivers/dt282x.c -#range-$(CONFIG_COMEDI_DT3000) += drivers/dt3000.c -#range-$(CONFIG_COMEDI_NI_ATMIO) += drivers/ni_mio_common.c -#ifndef CONFIG_COMEDI_NI_ATMIO -#range-$(CONFIG_COMEDI_NI_PCIMIO) += drivers/ni_mio_common.c -#endif - -#range-$(CONFIG_COMEDI_PCL711) += drivers/pcl711.c -#range-$(CONFIG_COMEDI_RTI800) += drivers/rti800.c -#range-$(CONFIG_COMEDI_DAS1600) += drivers/das1600.c - - - include $(TOPDIR)/Rules.make +ifeq ($(CONFIG_COMEDI),m) comedi.o: $(MI_OBJS) $(MIX_OBJS) $(LD) -r -o $@ $(MI_OBJS) $(MIX_OBJS) +endif diff --git a/comedi/drivers/8255.c b/comedi/drivers/8255.c index 182d5958..fd1661d4 100644 --- a/comedi/drivers/8255.c +++ b/comedi/drivers/8255.c @@ -62,7 +62,7 @@ static int dev_8255_attach(comedi_device * dev, comedi_devconfig * it); static int dev_8255_detach(comedi_device * dev); comedi_driver driver_8255={ driver_name: "8255", - module: &__this_module, + module: THIS_MODULE, attach: dev_8255_attach, detach: dev_8255_detach, }; @@ -220,6 +220,7 @@ static int dev_8255_attach(comedi_device *dev,comedi_devconfig *it) } printk("\n"); + return 0; } diff --git a/comedi/drivers/Makefile b/comedi/drivers/Makefile index a0274e5c..f69eaf0e 100644 --- a/comedi/drivers/Makefile +++ b/comedi/drivers/Makefile @@ -4,7 +4,11 @@ MOD_SUB_DIRS := SUB_DIRS := MOD_LIST_NAME := MISC_MODULES -EXTRA_CFLAGS := -I ../ +EXTRA_CFLAGS := -I ../ -I ./ + +ifeq ($(CONFIG_COMEDI),y) +O_TARGET := drivers.o +endif export-objs := mite.o 8255.o @@ -17,6 +21,8 @@ obj-$(CONFIG_COMEDI_8255) += 8255.o obj-$(CONFIG_COMEDI_DAQBOARD2000) += daqboard2000.o +obj-$(CONFIG_COMEDI_DAS08_NEW) += das08-new.o +obj-$(CONFIG_COMEDI_DAS16_NEW) += das16-new.o obj-$(CONFIG_COMEDI_DAS08) += das08.o obj-$(CONFIG_COMEDI_DAS08JR) += das08jr.o obj-$(CONFIG_COMEDI_DAS16) += das16.o @@ -53,12 +59,10 @@ obj-$(CONFIG_COMEDI_PARPORT) += comedi_parport.o obj-$(CONFIG_COMEDI_RTI800) += rti800.o obj-$(CONFIG_COMEDI_RTI802) += rti802.o -obj-m += $(obj-y) +#obj-m += $(obj-y) -#L_OBJS := $(sort $(filter-out $(export-objs), $(obj-y))) -#LX_OBJS := $(sort $(filter $(export-objs), $(obj-y))) -#MI_OBJS := $(sort $(filter-out $(export-objs), $(obj-y))) -#MIX_OBJS := $(sort $(filter $(export-objs), $(obj-y))) +O_OBJS := $(sort $(filter-out $(export-objs), $(obj-y))) +OX_OBJS := $(sort $(filter $(export-objs), $(obj-y))) M_OBJS := $(sort $(filter-out $(export-objs), $(obj-m))) MX_OBJS := $(sort $(filter $(export-objs), $(obj-m))) @@ -67,9 +71,6 @@ MX_OBJS := $(sort $(filter $(export-objs), $(obj-m))) include $(TOPDIR)/Rules.make -drivers.o: $(obj-y) - $(LD) -r -o $@ $(obj-y) - ni_pcimio.o: ni_mio_common.c ni_atmio.o: ni_mio_common.c diff --git a/comedi/drivers/comedi_parport.c b/comedi/drivers/comedi_parport.c index 3e7a6b42..ed54cb2a 100644 --- a/comedi/drivers/comedi_parport.c +++ b/comedi/drivers/comedi_parport.c @@ -56,7 +56,7 @@ static int parport_attach(comedi_device *dev,comedi_devconfig *it); static int parport_detach(comedi_device *dev); comedi_driver driver_parport={ driver_name: "parport", - module: &__this_module, + module: THIS_MODULE, attach: parport_attach, detach: parport_detach, }; diff --git a/comedi/drivers/daqboard2000.c b/comedi/drivers/daqboard2000.c index 67b1b36f..8d782b48 100644 --- a/comedi/drivers/daqboard2000.c +++ b/comedi/drivers/daqboard2000.c @@ -292,7 +292,7 @@ static int daqboard2000_recognize(char *name); comedi_driver driver_daqboard2000 = { driver_name: "daqboard2000", - module: &__this_module, + module: THIS_MODULE, attach: daqboard2000_attach, detach: daqboard2000_detach, recognize: daqboard2000_recognize, diff --git a/comedi/drivers/das08.c b/comedi/drivers/das08.c index 6687d736..b0e4d746 100644 --- a/comedi/drivers/das08.c +++ b/comedi/drivers/das08.c @@ -162,7 +162,7 @@ static int das08_detach(comedi_device *dev); static int das08_recognize(char *name); comedi_driver driver_das08={ driver_name: "das08", - module: &__this_module, + module: THIS_MODULE, attach: das08_attach, detach: das08_detach, recognize: das08_recognize, diff --git a/comedi/drivers/das08jr.c b/comedi/drivers/das08jr.c index be72f765..fab75262 100644 --- a/comedi/drivers/das08jr.c +++ b/comedi/drivers/das08jr.c @@ -80,7 +80,7 @@ static int das08jr_attach(comedi_device *dev,comedi_devconfig *it); static int das08jr_detach(comedi_device *dev); comedi_driver driver_das08jr={ driver_name: "das08jr", - module: &__this_module, + module: THIS_MODULE, attach: das08jr_attach, detach: das08jr_detach, }; diff --git a/comedi/drivers/das16.c b/comedi/drivers/das16.c index cf19c1e4..c9522862 100644 --- a/comedi/drivers/das16.c +++ b/comedi/drivers/das16.c @@ -181,7 +181,7 @@ static int das16_attach(comedi_device *dev,comedi_devconfig *it); static int das16_detach(comedi_device *dev); comedi_driver driver_das16={ driver_name: "das16", - module: &__this_module, + module: THIS_MODULE, attach: das16_attach, detach: das16_detach, }; diff --git a/comedi/drivers/das1600.c b/comedi/drivers/das1600.c index a681dac7..629c1f43 100644 --- a/comedi/drivers/das1600.c +++ b/comedi/drivers/das1600.c @@ -135,7 +135,7 @@ static int das1600_detach(comedi_device *dev); static int das1600_recognize(char *name); comedi_driver driver_das1600={ driver_name: "das1600", - module: &__this_module, + module: THIS_MODULE, attach: das1600_attach, detach: das1600_detach, recognize: das1600_recognize, diff --git a/comedi/drivers/das6402.c b/comedi/drivers/das6402.c index 7dc7599d..c1946983 100644 --- a/comedi/drivers/das6402.c +++ b/comedi/drivers/das6402.c @@ -98,7 +98,7 @@ static int das6402_attach(comedi_device *dev,comedi_devconfig *it); static int das6402_detach(comedi_device *dev); comedi_driver driver_das6402={ driver_name: "das6402", - module: &__this_module, + module: THIS_MODULE, attach: das6402_attach, detach: das6402_detach, }; diff --git a/comedi/drivers/dt2801.c b/comedi/drivers/dt2801.c index 08bc8f4f..d73b773b 100644 --- a/comedi/drivers/dt2801.c +++ b/comedi/drivers/dt2801.c @@ -72,7 +72,7 @@ static int dt2801_attach(comedi_device *dev,comedi_devconfig *it); static int dt2801_detach(comedi_device *dev); comedi_driver driver_dt2801={ driver_name: "dt2801", - module: &__this_module, + module: THIS_MODULE, attach: dt2801_attach, detach: dt2801_detach, }; diff --git a/comedi/drivers/dt2811.c b/comedi/drivers/dt2811.c index 3635f13a..87e9faf9 100644 --- a/comedi/drivers/dt2811.c +++ b/comedi/drivers/dt2811.c @@ -177,7 +177,7 @@ static int dt2811_detach(comedi_device *dev); static int dt2811_recognize(char *name); comedi_driver driver_dt2811={ driver_name: "dt2811", - module: &__this_module, + module: THIS_MODULE, attach: dt2811_attach, detach: dt2811_detach, recognize: dt2811_recognize, diff --git a/comedi/drivers/dt2814.c b/comedi/drivers/dt2814.c index 6b506b94..458aed1e 100644 --- a/comedi/drivers/dt2814.c +++ b/comedi/drivers/dt2814.c @@ -57,7 +57,7 @@ static int dt2814_attach(comedi_device *dev,comedi_devconfig *it); static int dt2814_detach(comedi_device *dev); comedi_driver driver_dt2814={ driver_name: "dt2814", - module: &__this_module, + module: THIS_MODULE, attach: dt2814_attach, detach: dt2814_detach, }; diff --git a/comedi/drivers/dt2815.c b/comedi/drivers/dt2815.c index eb5f1b63..92a2431c 100644 --- a/comedi/drivers/dt2815.c +++ b/comedi/drivers/dt2815.c @@ -52,7 +52,7 @@ static int dt2815_attach(comedi_device *dev,comedi_devconfig *it); static int dt2815_detach(comedi_device *dev); comedi_driver driver_dt2815={ driver_name: "dt2815", - module: &__this_module, + module: THIS_MODULE, attach: dt2815_attach, detach: dt2815_detach, }; diff --git a/comedi/drivers/dt2817.c b/comedi/drivers/dt2817.c index d2e6c994..450e7ca1 100644 --- a/comedi/drivers/dt2817.c +++ b/comedi/drivers/dt2817.c @@ -47,7 +47,7 @@ static int dt2817_attach(comedi_device *dev,comedi_devconfig *it); static int dt2817_detach(comedi_device *dev); comedi_driver driver_dt2817={ driver_name: "dt2817", - module: &__this_module, + module: THIS_MODULE, attach: dt2817_attach, detach: dt2817_detach, }; diff --git a/comedi/drivers/dt282x.c b/comedi/drivers/dt282x.c index b6c65c9b..504f35e5 100644 --- a/comedi/drivers/dt282x.c +++ b/comedi/drivers/dt282x.c @@ -340,7 +340,7 @@ static int dt282x_detach(comedi_device * dev); static int dt282x_recognize(char *name); comedi_driver driver_dt282x={ driver_name: "dt282x", - module: &__this_module, + module: THIS_MODULE, attach: dt282x_attach, detach: dt282x_detach, recognize: dt282x_recognize, diff --git a/comedi/drivers/dt3000.c b/comedi/drivers/dt3000.c index 1352c7b1..967e1aab 100644 --- a/comedi/drivers/dt3000.c +++ b/comedi/drivers/dt3000.c @@ -225,7 +225,7 @@ static int dt3000_attach(comedi_device *dev,comedi_devconfig *it); static int dt3000_detach(comedi_device *dev); comedi_driver driver_dt3000={ driver_name: "dt3000", - module: &__this_module, + module: THIS_MODULE, attach: dt3000_attach, detach: dt3000_detach, }; diff --git a/comedi/drivers/ii_pci20kc.c b/comedi/drivers/ii_pci20kc.c index 7d7f9901..2ae24c74 100644 --- a/comedi/drivers/ii_pci20kc.c +++ b/comedi/drivers/ii_pci20kc.c @@ -95,7 +95,7 @@ static int pci20xxx_detach(comedi_device * dev); comedi_driver driver_pci20xxx = { driver_name:"pci20xxx", - module:&__this_module, + module:THIS_MODULE, attach:pci20xxx_attach, detach:pci20xxx_detach, }; diff --git a/comedi/drivers/multiq3.c b/comedi/drivers/multiq3.c index df3c878c..fd102db5 100644 --- a/comedi/drivers/multiq3.c +++ b/comedi/drivers/multiq3.c @@ -89,7 +89,7 @@ static int multiq3_attach(comedi_device *dev,comedi_devconfig *it); static int multiq3_detach(comedi_device *dev); comedi_driver driver_multiq3={ driver_name: "multiq3", - module: &__this_module, + module: THIS_MODULE, attach: multiq3_attach, detach: multiq3_detach, }; diff --git a/comedi/drivers/ni_atmio.c b/comedi/drivers/ni_atmio.c index 2757247b..5953e69e 100644 --- a/comedi/drivers/ni_atmio.c +++ b/comedi/drivers/ni_atmio.c @@ -270,6 +270,7 @@ typedef struct{ unsigned short gpct_input_select0; unsigned short gpct_input_select1; + unsigned int ai_n_chans; unsigned int ai_chanlistptr; unsigned short ai_xorlist[512]; }ni_private; @@ -279,7 +280,7 @@ static int atmio_attach(comedi_device *dev,comedi_devconfig *it); static int atmio_detach(comedi_device *dev); comedi_driver driver_atmio={ driver_name: "atmio-E", - module: &__this_module, + module: THIS_MODULE, attach: atmio_attach, detach: atmio_detach, }; diff --git a/comedi/drivers/ni_atmio16d.c b/comedi/drivers/ni_atmio16d.c index e86912b7..abb77e1f 100644 --- a/comedi/drivers/ni_atmio16d.c +++ b/comedi/drivers/ni_atmio16d.c @@ -140,7 +140,7 @@ static void reset_atmio16d(comedi_device *dev); /* main driver struct */ comedi_driver driver_atmio16d={ driver_name: "atmio16", - module: &__this_module, + module: THIS_MODULE, attach: atmio16d_attach, detach: atmio16d_detach, recognize: atmio16d_recognize, diff --git a/comedi/drivers/ni_pcidio.c b/comedi/drivers/ni_pcidio.c index f1ea1e42..36fa8233 100644 --- a/comedi/drivers/ni_pcidio.c +++ b/comedi/drivers/ni_pcidio.c @@ -149,7 +149,7 @@ static int nidio_attach(comedi_device *dev,comedi_devconfig *it); static int nidio_detach(comedi_device *dev); comedi_driver driver_pcidio={ driver_name: "nidio", - module: &__this_module, + module: THIS_MODULE, attach: nidio_attach, detach: nidio_detach, }; diff --git a/comedi/drivers/ni_pcimio.c b/comedi/drivers/ni_pcimio.c index 8fdb55b4..9a302140 100644 --- a/comedi/drivers/ni_pcimio.c +++ b/comedi/drivers/ni_pcimio.c @@ -336,7 +336,7 @@ static int pcimio_attach(comedi_device *dev,comedi_devconfig *it); static int pcimio_detach(comedi_device *dev); comedi_driver driver_pcimio={ driver_name: "pcimio-E", - module: &__this_module, + module: THIS_MODULE, attach: pcimio_attach, detach: pcimio_detach, }; @@ -411,6 +411,7 @@ typedef struct{ unsigned short gpct_input_select0; unsigned short gpct_input_select1; + unsigned int ai_n_chans; unsigned int ai_chanlistptr; unsigned short ai_xorlist[512]; }ni_private; diff --git a/comedi/drivers/pcl711.c b/comedi/drivers/pcl711.c index f02b18e2..e20841d3 100644 --- a/comedi/drivers/pcl711.c +++ b/comedi/drivers/pcl711.c @@ -123,7 +123,7 @@ static int pcl711_detach(comedi_device *dev); static int pcl711_recognize(char *name); comedi_driver driver_pcl711={ driver_name: "pcl711", - module: &__this_module, + module: THIS_MODULE, attach: pcl711_attach, detach: pcl711_detach, recognize: pcl711_recognize, diff --git a/comedi/drivers/pcl725.c b/comedi/drivers/pcl725.c index 36e1e799..c8d4bd81 100644 --- a/comedi/drivers/pcl725.c +++ b/comedi/drivers/pcl725.c @@ -28,7 +28,7 @@ static int pcl725_attach(comedi_device *dev,comedi_devconfig *it); static int pcl725_detach(comedi_device *dev); comedi_driver driver_pcl725={ driver_name: "pcl725", - module: &__this_module, + module: THIS_MODULE, attach: pcl725_attach, detach: pcl725_detach, }; diff --git a/comedi/drivers/pcl726.c b/comedi/drivers/pcl726.c index 952e87bd..36f3c8a9 100644 --- a/comedi/drivers/pcl726.c +++ b/comedi/drivers/pcl726.c @@ -61,7 +61,7 @@ static int pcl726_attach(comedi_device *dev,comedi_devconfig *it); static int pcl726_detach(comedi_device *dev); comedi_driver driver_pcl726={ driver_name: "pcl726", - module: &__this_module, + module: THIS_MODULE, attach: pcl726_attach, detach: pcl726_detach, }; diff --git a/comedi/drivers/pcl812.c b/comedi/drivers/pcl812.c index 70540710..6d7abdc6 100644 --- a/comedi/drivers/pcl812.c +++ b/comedi/drivers/pcl812.c @@ -124,7 +124,7 @@ static int i8253_osc_base = 500; /* 2 Mhz */ comedi_driver driver_pcl812={ driver_name: "pcl812", - module: &__this_module, + module: THIS_MODULE, attach: pcl812_attach, detach: pcl812_detach, recognize: pcl812_recognize, diff --git a/comedi/drivers/pcl818.c b/comedi/drivers/pcl818.c index 74ac4474..905b502b 100644 --- a/comedi/drivers/pcl818.c +++ b/comedi/drivers/pcl818.c @@ -211,7 +211,7 @@ static int RTC_timer_lock = 0; /* RTC int lock */ comedi_driver driver_pcl818={ driver_name: "pcl818", - module: &__this_module, + module: THIS_MODULE, attach: pcl818_attach, detach: pcl818_detach, recognize: pcl818_recognize, diff --git a/comedi/drivers/rti800.c b/comedi/drivers/rti800.c index f2f1f68c..36e962d9 100644 --- a/comedi/drivers/rti800.c +++ b/comedi/drivers/rti800.c @@ -101,7 +101,7 @@ static int rti800_detach(comedi_device *dev); static int rti800_recognize(char *name); comedi_driver driver_rti800={ driver_name: "rti800", - module: &__this_module, + module: THIS_MODULE, attach: rti800_attach, detach: rti800_detach, recognize: rti800_recognize, diff --git a/comedi/drivers/rti802.c b/comedi/drivers/rti802.c index 3cf022c5..5d3189bb 100644 --- a/comedi/drivers/rti802.c +++ b/comedi/drivers/rti802.c @@ -46,7 +46,7 @@ static int rti802_attach(comedi_device *dev,comedi_devconfig *it); static int rti802_detach(comedi_device *dev); comedi_driver driver_rti802={ driver_name: "rti802", - module: &__this_module, + module: THIS_MODULE, attach: rti802_attach, detach: rti802_detach, }; diff --git a/comedi/kcomedilib/Makefile b/comedi/kcomedilib/Makefile index 4442fc8e..02f64c72 100644 --- a/comedi/kcomedilib/Makefile +++ b/comedi/kcomedilib/Makefile @@ -6,9 +6,15 @@ MOD_LIST_NAME := MISC_MODULES EXTRA_CFLAGS := -I ../ -MI_OBJS := data.o dio.o -MIX_OBJS := kcomedilib_main.o -M_OBJS := kcomedilib.o +ifeq ($(CONFIG_COMEDI_KLIB),y) + O_TARGET := kcomedilib.o + OX_OBJS := kcomedilib_main.o + O_OBJS := data.o dio.o +else + MI_OBJS := data.o dio.o + MIX_OBJS := kcomedilib_main.o + M_OBJS := kcomedilib.o +endif include $(TOPDIR)/Rules.make diff --git a/scripts/check_kernel b/scripts/check_kernel index 72ed648d..ebaffe07 100755 --- a/scripts/check_kernel +++ b/scripts/check_kernel @@ -2,7 +2,7 @@ -if [ $(grep -c "$(uname -r)" /usr/include/linux/version.h) != 0 ] +if [ $(grep -c "$(uname -r)" ${LINUXDIR}/version.h) != 0 ] then echo <