Added MODULE_DEVICE_TABLE() and pci_enable_device()
authorDavid Schleef <ds@schleef.org>
Wed, 5 Sep 2001 23:39:15 +0000 (23:39 +0000)
committerDavid Schleef <ds@schleef.org>
Wed, 5 Sep 2001 23:39:15 +0000 (23:39 +0000)
comedi/drivers/daqboard2000.c

index 4250cd779c114899979881798d389f53aaca2718..e2ff78a5f066c6ef812b28517fc5634360eb570a 100644 (file)
 #include <linux/timex.h>
 #include <linux/timer.h>
 #include <linux/pci.h>
+#include <linux/init.h>
 #include <asm/io.h>
 #include <asm/uaccess.h>
 #include <linux/comedidev.h>
@@ -309,6 +310,12 @@ static boardtype boardtypes[]={
 #define n_boardtypes (sizeof(boardtypes)/sizeof(boardtype))
 #define this_board ((boardtype *)dev->board_ptr)
 
+static struct pci_device_id daqboard2000_pci_table[] __devinitdata = {
+       { 0x1616, 0x0409, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+       { 0 }
+};
+MODULE_DEVICE_TABLE(pci, daqboard2000_pci_table);
+
 typedef struct {
   enum {
     card_daqboard_2000
@@ -688,6 +695,10 @@ static int daqboard2000_attach(comedi_device *dev, comedi_devconfig *it)
     goto out;
   }
 
+  if((result = pci_enable_device(card))<0){
+    goto out;
+  }
+
   if (card->hdr_type == PCI_HEADER_TYPE_NORMAL) {
     u32 id;
     int i;