enabled pcmcia code for kernels with modular pcmcia support
authorFrank Mori Hess <fmhess@speakeasy.net>
Sun, 31 Mar 2002 04:18:00 +0000 (04:18 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Sun, 31 Mar 2002 04:18:00 +0000 (04:18 +0000)
comedi/drivers/das08.c
comedi/drivers/ni_labpc.c

index a7554d4501430a4aacaae12bfaf773aaa82876a3..5bbaaf68a1cee80888bd9a00706994f0e27e0f37 100644 (file)
@@ -68,7 +68,7 @@ driver.
 #include "8255.h"
 
 // pcmcia includes
-#ifdef CONFIG_PCMCIA
+#if defined(CONFIG_PCMCIA) || defined(CONFIG_PCMCIA_MODULE)
 #include <pcmcia/version.h>
 #include <pcmcia/cs_types.h>
 #include <pcmcia/cs.h>
@@ -178,7 +178,7 @@ static int das08jr_do_wbits(comedi_device *dev,comedi_subdevice *s,comedi_insn *
 static int das08jr_ao_winsn(comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,lsampl_t *data);
 static int das08ao_ao_winsn(comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,lsampl_t *data);
 
-#ifdef CONFIG_PCMCIA
+#if defined(CONFIG_PCMCIA) || defined(CONFIG_PCMCIA_MODULE)
 /*
    A linked list of "instances" of the das08_pcmcia device.  Each actual
    PCMCIA card corresponds to one device instance, and is described
@@ -446,7 +446,7 @@ static struct das08_board_struct das08_boards[]={
        i8254_offset:   4,
        iosize: 8,
        },
-#ifdef CONFIG_PCMCIA
+#if defined(CONFIG_PCMCIA) || defined(CONFIG_PCMCIA_MODULE)
        {
        name:           "pcm-das08",
        id:     0x0,    // XXX
@@ -734,7 +734,7 @@ static int das08_attach(comedi_device *dev,comedi_devconfig *it)
        int ret;
        int iobase, pci_iobase = 0;
        struct pci_dev *pdev;
-#ifdef CONFIG_PCMCIA
+#if defined(CONFIG_PCMCIA) || defined(CONFIG_PCMCIA_MODULE)
        dev_link_t *link = dev_list;    // XXX hack
 #endif
 
@@ -795,7 +795,7 @@ static int das08_attach(comedi_device *dev,comedi_devconfig *it)
                outw(INTR1_ENABLE | PCI_INTR_ENABLE, pci_iobase + INTCSR );
 #endif
 
-#ifdef CONFIG_PCMCIA
+#if defined(CONFIG_PCMCIA) || defined(CONFIG_PCMCIA_MODULE)
        }else if(thisboard->bustype == pcmcia)
        {
                if(link == NULL)
@@ -938,7 +938,7 @@ static int das08_detach(comedi_device *dev)
    be present but disabled -- but it can then be enabled for specific
    modules at load time with a 'pc_debug=#' option to insmod.
 */
-#ifdef CONFIG_PCMCIA
+#if defined(CONFIG_PCMCIA) || defined(CONFIG_PCMCIA_MODULE)
 
 #ifdef PCMCIA_DEBUG
 static int pc_debug = PCMCIA_DEBUG;
index 1bd20c7a0245792c0fa5760e06c3aed4f79ce2a3..08d2fb4fb67a43c2afdc5f7b08baaf6b141939dd 100644 (file)
@@ -89,7 +89,7 @@ NI manuals:
 #include "8255.h"
 #include "mite.h"
 
-#ifdef CONFIG_PCMCIA
+#if defined(CONFIG_PCMCIA) || defined(CONFIG_PCMCIA_MODULE)
 
 //#include <pcmcia/config.h>
 //#include <pcmcia/k_compat.h>
@@ -388,7 +388,7 @@ static comedi_lrange range_labpc_ao = {
 
 static labpc_board labpc_boards[] =
 {
-#ifdef CONFIG_PCMCIA
+#if defined(CONFIG_PCMCIA) || defined(CONFIG_PCMCIA_MODULE)
        {
                name:   "daqcard-1200",
                device_id:      0x103,  // 0x10b is manufacturer id, 0x103 is device id
@@ -517,7 +517,7 @@ static int labpc_attach(comedi_device *dev, comedi_devconfig *it)
        int i;
        unsigned long flags, isr_flags;
        int ret;
-#ifdef CONFIG_PCMCIA
+#if defined(CONFIG_PCMCIA) || defined(CONFIG_PCMCIA_MODULE)
        dev_link_t *link;
 #endif
 
@@ -550,7 +550,7 @@ static int labpc_attach(comedi_device *dev, comedi_devconfig *it)
                        irq = mite_irq(devpriv->mite);
                        break;
                case pcmcia_bustype:
-#ifdef CONFIG_PCMCIA
+#if defined(CONFIG_PCMCIA) || defined(CONFIG_PCMCIA_MODULE)
                        link = pcmcia_dev_list; /* XXX hack */
                        if(!link) return -EIO;
                        iobase = link->io.BasePort1;
@@ -2108,7 +2108,7 @@ static void write_caldac(comedi_device *dev, unsigned int channel, unsigned int
 }
 
 // PCMCIA crap
-#ifdef CONFIG_PCMCIA
+#if defined(CONFIG_PCMCIA) || defined(CONFIG_PCMCIA_MODULE)
 
 /*
    All the PCMCIA modules use PCMCIA_DEBUG to control debugging.  If