got rid of pci_for_each_dev macro (which no longer exists in 2.6
authorFrank Mori Hess <fmhess@speakeasy.net>
Sat, 22 Jan 2005 14:22:18 +0000 (14:22 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Sat, 22 Jan 2005 14:22:18 +0000 (14:22 +0000)
kernels)

22 files changed:
comedi/drivers/adl_pci6208.c
comedi/drivers/adl_pci9111.c
comedi/drivers/adv_pci_dio.c
comedi/drivers/amcc_s5933.c
comedi/drivers/amplc_pc236.c
comedi/drivers/amplc_pc263.c
comedi/drivers/amplc_pci230.c
comedi/drivers/cb_pcidas.c
comedi/drivers/cb_pcidas64.c
comedi/drivers/cb_pcidda.c
comedi/drivers/cb_pcimdas.c
comedi/drivers/cb_pcimdda.c
comedi/drivers/contec_pci_dio.c
comedi/drivers/das08.c
comedi/drivers/icp_multi.h
comedi/drivers/ke_counter.c
comedi/drivers/me4000.c
comedi/drivers/me_daq.c
comedi/drivers/mite.c
comedi/drivers/rtd520.c
comedi/rt.c
include/linux/pci.h

index 962c9f8df0228f7274c44b6b340061439f993c47..c3a455c4f8d00e7bfaeb856f32daaef5907dc245 100644 (file)
@@ -303,8 +303,8 @@ pci6208_find_device(comedi_device *dev, int bus, int slot)
        struct pci_dev *pci_dev;
        int i;
        
-       pci_for_each_dev(pci_dev)
-       {
+       for(pci_dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, NULL); pci_dev != NULL ; 
+               pci_dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pci_dev)) {
                if (pci_dev->vendor == PCI_VENDOR_ID_ADLINK)
                {
                        for (i= 0; i< pci6208_board_nbr; i++)
index 734807ff84533a71b8d1628fe5c606b608fce365..b21f483a153ceba3914376bf5f235058365ebaca 100644 (file)
@@ -1192,143 +1192,143 @@ static int pci9111_reset (comedi_device *dev)
 
 static int pci9111_attach(comedi_device *dev,comedi_devconfig *it)
 {
-
-  comedi_subdevice *subdevice;
-  int io_base, io_range, lcr_io_base, lcr_io_range;
-  struct pci_dev* pci_device;
-  int error,i;
-  pci9111_board_struct* board;
-
-//
-// Probe the device to determine what device in the series it is.
-//
-  
-  printk("comedi%d: " PCI9111_DRIVER_NAME " driver\n",dev->minor);
-
-  pci_for_each_dev(pci_device)
-  {
-    if (pci_device->vendor == PCI_VENDOR_ID_ADLINK)
-    {
-      for (i= 0; i< pci9111_board_nbr; i++)
-      {
-       if(pci9111_boards[i].device_id == pci_device->device)
+       comedi_subdevice *subdevice;
+       int io_base, io_range, lcr_io_base, lcr_io_range;
+       struct pci_dev* pci_device;
+       int error,i;
+       pci9111_board_struct* board;
+       
+       //
+       // Probe the device to determine what device in the series it is.
+       //
+       
+       printk("comedi%d: " PCI9111_DRIVER_NAME " driver\n",dev->minor);
+
+       for(pci_device = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, NULL); pci_device != NULL ; 
+               pci_device = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pci_device)) 
        {
-         // was a particular bus/slot requested?
-         if((it->options[0] != 0) || (it->options[1] != 0))
-         {
-           // are we on the wrong bus/slot?
-           if(pci_device->bus->number != it->options[0] ||
-              PCI_SLOT(pci_device->devfn) != it->options[1])
-           {
-             continue;
-           }
-         }
-         
-         dev->board_ptr = pci9111_boards + i;
-         board = (pci9111_board_struct *) dev->board_ptr;
-         goto found;
+               if (pci_device->vendor == PCI_VENDOR_ID_ADLINK)
+               {
+                       for (i= 0; i< pci9111_board_nbr; i++)
+                       {
+                               if(pci9111_boards[i].device_id == pci_device->device)
+                               {
+                                       // was a particular bus/slot requested?
+                                       if((it->options[0] != 0) || (it->options[1] != 0))
+                                       {
+                                               // are we on the wrong bus/slot?
+                                               if(pci_device->bus->number != it->options[0] ||
+                                                       PCI_SLOT(pci_device->devfn) != it->options[1])
+                                               {
+                                                       continue;
+                                               }
+                                       }
+                                       
+                                       dev->board_ptr = pci9111_boards + i;
+                                       board = (pci9111_board_struct *) dev->board_ptr;
+                                       goto found;
+                               }
+                       }
+               }
        }
-      }
-    }
-  }
-  
-  printk ("comedi%d: no supported board found! (req. bus/slot : %d/%d)\n",
-         dev->minor,it->options[0], it->options[1]);
-  return -EIO;
-
+       
+       printk ("comedi%d: no supported board found! (req. bus/slot : %d/%d)\n",
+               dev->minor,it->options[0], it->options[1]);
+       return -EIO;
+       
 found:
-
-  printk("comedi%d: found %s (b:s:f=%d:%d:%d) , irq=%d\n", 
-        dev->minor,
-        pci9111_boards[i].name,
-        pci_device->bus->number,
-        PCI_SLOT(pci_device->devfn),
-        PCI_FUNC(pci_device->devfn),
-        pci_device->irq);
-
-  // TODO: Warn about non-tested boards.
-
-  switch(board->device_id)
-  {
-  };
-
-  // Read local configuration register base address [PCI_BASE_ADDRESS #1].
-  
-  lcr_io_base = pci_resource_start (pci_device, 1);
-  lcr_io_range = pci_resource_end (pci_device, 1) - lcr_io_base +1;
-  
-  printk ("comedi%d: local configuration registers at address 0x%4x [0x%4x]\n",
-         dev->minor,
-         lcr_io_base,
-         lcr_io_range);
-
-  // Read PCI6308 register base address [PCI_BASE_ADDRESS #2].
-
-  io_base = pci_resource_start (pci_device, 2);
-  io_range = pci_resource_end (pci_device, 2) - io_base +1;
-
-  printk ("comedi%d: 6503 registers at address 0x%4x [0x%4x]\n",
-         dev->minor,
-         io_base,
-         io_range);
-
-  // Allocate IO ressources
+       
+       printk("comedi%d: found %s (b:s:f=%d:%d:%d) , irq=%d\n", 
+               dev->minor,
+               pci9111_boards[i].name,
+               pci_device->bus->number,
+               PCI_SLOT(pci_device->devfn),
+               PCI_FUNC(pci_device->devfn),
+               pci_device->irq);
+       
+       // TODO: Warn about non-tested boards.
+       
+       switch(board->device_id)
+       {
+       };
+       
+       // Read local configuration register base address [PCI_BASE_ADDRESS #1].
+       
+       lcr_io_base = pci_resource_start (pci_device, 1);
+       lcr_io_range = pci_resource_end (pci_device, 1) - lcr_io_base +1;
+       
+       printk ("comedi%d: local configuration registers at address 0x%4x [0x%4x]\n",
+               dev->minor,
+               lcr_io_base,
+               lcr_io_range);
+       
+       // Read PCI6308 register base address [PCI_BASE_ADDRESS #2].
+       
+       io_base = pci_resource_start (pci_device, 2);
+       io_range = pci_resource_end (pci_device, 2) - io_base +1;
+       
+       printk ("comedi%d: 6503 registers at address 0x%4x [0x%4x]\n",
+               dev->minor,
+               io_base,
+               io_range);
+       
+       // Allocate IO ressources
        if(pci_request_regions(pci_device, PCI9111_DRIVER_NAME))
        {
                printk("comedi%d: I/O port conflict\n",dev->minor);
                return -EIO;
        }
-
-  dev->iobase=io_base;
-  dev->board_name = board->name;
-  
-  if(alloc_private(dev,sizeof(pci9111_private_data_struct))<0)
-    return -ENOMEM;
-  
-  dev_private->pci_device = pci_device;
-  dev_private->io_range = io_range;
-  dev_private->is_valid=0;
-  dev_private->lcr_io_base=lcr_io_base;
-  dev_private->lcr_io_range=lcr_io_range;
-  
-  pci9111_reset(dev);
-
-  // Irq setup
-  
-  dev->irq=0;
-  if (pci_device->irq>0) 
-  {
-    if (comedi_request_irq (pci_device->irq,
-                           pci9111_interrupt, 
-                           SA_SHIRQ, 
-                           PCI9111_DRIVER_NAME, 
-                           dev)!=0)
-    {
-      printk ("comedi%d: unable to allocate irq  %d\n", dev->minor, pci_device->irq);
-      return -EINVAL;
-    }
-  }
-  dev->irq = pci_device->irq;
-  
-//
-// TODO: Add external multiplexer setup (according to option[2]).
-//
-
-  if((error=alloc_subdevices(dev, 4))<0)
-    return  error;
-
-  subdevice                    = dev->subdevices + 0;
-  dev->read_subdev = subdevice;
-
-  subdevice->type              = COMEDI_SUBD_AI;
-  subdevice->subdev_flags      = SDF_READABLE|SDF_COMMON;
-
-//
-// TODO: Add external multiplexer data
-//
-//    if (devpriv->usemux) { subdevice->n_chan = devpriv->usemux; }
-//    else { subdevice->n_chan = this_board->n_aichan; }
-//
+       
+       dev->iobase=io_base;
+       dev->board_name = board->name;
+       
+       if(alloc_private(dev,sizeof(pci9111_private_data_struct))<0)
+               return -ENOMEM;
+       
+       dev_private->pci_device = pci_device;
+       dev_private->io_range = io_range;
+       dev_private->is_valid=0;
+       dev_private->lcr_io_base=lcr_io_base;
+       dev_private->lcr_io_range=lcr_io_range;
+       
+       pci9111_reset(dev);
+
+       // Irq setup
+       
+       dev->irq=0;
+       if (pci_device->irq>0) 
+       {
+               if (comedi_request_irq (pci_device->irq,
+                       pci9111_interrupt, 
+                       SA_SHIRQ, 
+                       PCI9111_DRIVER_NAME, 
+                       dev)!=0)
+               {
+                       printk ("comedi%d: unable to allocate irq  %d\n", dev->minor, pci_device->irq);
+                       return -EINVAL;
+               }
+       }
+       dev->irq = pci_device->irq;
+       
+       //
+       // TODO: Add external multiplexer setup (according to option[2]).
+       //
+       
+       if((error=alloc_subdevices(dev, 4))<0)
+               return  error;
+       
+       subdevice                       = dev->subdevices + 0;
+       dev->read_subdev = subdevice;
+       
+       subdevice->type                 = COMEDI_SUBD_AI;
+       subdevice->subdev_flags         = SDF_READABLE|SDF_COMMON;
+       
+       //
+       // TODO: Add external multiplexer data
+       //
+       //    if (devpriv->usemux) { subdevice->n_chan = devpriv->usemux; }
+       //    else { subdevice->n_chan = this_board->n_aichan; }
+       //
 
        subdevice->n_chan               = board->ai_channel_nbr;
        subdevice->maxdata              = board->ai_resolution_mask;
index 56eeb75714a7c6f866d8fedbdf258683dbe70d68..286b560c7047add19c085945d10d0044f41f0ffe 100644 (file)
@@ -896,7 +896,8 @@ static int pci_dio_attach(comedi_device *dev, comedi_devconfig *it)
                return -ENOMEM;
        }
 
-       pci_for_each_dev(pcidev) {
+       for(pcidev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, NULL); pcidev != NULL ; 
+               pcidev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pcidev)) {
                if ((pcidev->vendor!=this_board->vendor_id)||
                    (pcidev->device!=this_board->device_id))
                        continue;
index 1b75fb8db7e7c46a1ced6983d4167225c1b27401..5fe23d17e6e4b050b4ee5b4d435510e16f406392 100644 (file)
@@ -31,7 +31,8 @@ void pci_card_list_init(unsigned short pci_vendor, char display)
        amcc_devices=NULL;
        last=NULL;
 
-       pci_for_each_dev(pcidev){
+       for(pcidev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, NULL); pcidev != NULL ; 
+               pcidev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pcidev)) {
                if(pcidev->vendor==pci_vendor){
                        amcc=kmalloc(sizeof(*amcc),GFP_KERNEL);
                        memset(amcc,0,sizeof(*amcc));
index fd7231d75e5256f1093fb91fefb1cc35f43b4754..cce66bb91e83d767fb0599fbe49e9786efcb2436 100644 (file)
@@ -198,7 +198,8 @@ static int pc236_attach(comedi_device *dev,comedi_devconfig *it)
                }
 
                /* Look for matching PCI device. */
-               pci_for_each_dev(pci_dev) {
+               for(pci_dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, NULL); pci_dev != NULL ; 
+                       pci_dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pci_dev)) {
                        /* If bus/slot specified, check them. */
                        if (bus || slot) {
                                if (bus != pci_dev->bus->number
index d83cf77c05b29b1e353df5f39016fb79db3f55f9..b985721908059e668993dcfde4a35799b352e8fd 100644 (file)
@@ -169,7 +169,8 @@ static int pc263_attach(comedi_device *dev,comedi_devconfig *it)
                }
 
                /* Look for matching PCI device. */
-               pci_for_each_dev(pci_dev) {
+               for(pci_dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, NULL); pci_dev != NULL ; 
+                       pci_dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pci_dev)) {
                        /* If bus/slot specified, check them. */
                        if (bus || slot) {
                                if (bus != pci_dev->bus->number
index 109dfca04ffbef2c9d751ea35e258e7bf59b78dc..35c559e20a606e141ce6a78847ad976fd3c06525 100644 (file)
@@ -332,7 +332,8 @@ static int pci230_attach(comedi_device *dev,comedi_devconfig *it)
        printk("comedi%d: amplc_pci230\n",dev->minor);
        
        /* Find card */
-       pci_for_each_dev(pci_dev){
+       for(pci_dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, NULL); pci_dev != NULL ; 
+               pci_dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pci_dev)) {
                if(pci_dev->vendor != PCI_VENDOR_ID_AMPLICON)
                        continue;
                for(i=0;i<n_pci230_boards;i++){
index a6be21eaf5736f615dc276af10e9a39743a23f31..589a36d0270282c217dc03412afbd3997a8ab695 100644 (file)
@@ -526,7 +526,8 @@ static int cb_pcidas_attach(comedi_device *dev, comedi_devconfig *it)
  */
        printk("\n");
 
-       pci_for_each_dev(pcidev)
+       for(pcidev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, NULL); pcidev != NULL ; 
+               pcidev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pcidev)) 
        {
                // is it not a computer boards card?
                if(pcidev->vendor != PCI_VENDOR_ID_CB)
index 428f778ecfcd8a0fd20151aa6f7138168be1669d..955bd3534522f704d6ac380540a0e6fb46e2f753 100644 (file)
@@ -1644,7 +1644,8 @@ static int attach(comedi_device *dev, comedi_devconfig *it)
  * Probe the device to determine what device in the series it is.
  */
 
-       pci_for_each_dev( pcidev )
+       for(pcidev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, NULL); pcidev != NULL ; 
+               pcidev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pcidev)) 
        {
                // is it not a computer boards card?
                if( pcidev->vendor != PCI_VENDOR_ID_COMPUTERBOARDS )
index 6fa9570a0246915049b71725cdca99e8427c25c1..dc299ea7d6ba0825de0f769c40df2d710f04db90 100644 (file)
@@ -284,7 +284,8 @@ static int cb_pcidda_attach(comedi_device *dev, comedi_devconfig *it)
  */
        printk("\n");
 
-       pci_for_each_dev(pcidev){
+       for(pcidev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, NULL); pcidev != NULL ; 
+               pcidev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pcidev)) {
                if(pcidev->vendor==PCI_VENDOR_ID_CB){
                        if(it->options[0] || it->options[1]){
                                if(pcidev->bus->number==it->options[0] &&
index c13c3e28f3df2f2b72ddc61e57f974fd6b0814fc..57b8db5eaf321c6870a8c4edfd5e1516736d1463 100644 (file)
@@ -239,7 +239,8 @@ static int cb_pcimdas_attach(comedi_device *dev,comedi_devconfig *it)
  */
        printk("\n");
 
-       pci_for_each_dev(pcidev)
+       for(pcidev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, NULL); pcidev != NULL ; 
+               pcidev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pcidev))
        {
                // is it not a computer boards card?
                if(pcidev->vendor != PCI_VENDOR_ID_COMPUTERBOARDS)
index faf09c57f4f971cdf6af1dd754b8a25de88cc270..6c88e461f76b0be8c715907f48a575945774c945 100644 (file)
@@ -438,7 +438,8 @@ static int probe(comedi_device *dev, const comedi_devconfig *it)
     struct pci_dev *pcidev;
        int index, registers;
 
-       pci_for_each_dev(pcidev)
+       for(pcidev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, NULL); pcidev != NULL ; 
+               pcidev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pcidev))
        {
                // is it not a computer boards card?
                if(pcidev->vendor != PCI_VENDOR_ID_COMPUTERBOARDS)
index ab631b8790ab9e04d865123dbf5dd06e2ffe1e3f..3b1ff3b1a5670ce321e232aebf9b33f75ba11b05 100644 (file)
@@ -107,7 +107,8 @@ static int contec_attach(comedi_device *dev,comedi_devconfig *it)
        if(alloc_subdevices(dev, 2)<0)
                return -ENOMEM;
 
-       pci_for_each_dev ( pcidev ) {
+       for(pcidev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, NULL); pcidev != NULL ; 
+               pcidev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pcidev)) {
                
                if ( pcidev->vendor == PCI_VENDOR_ID_CONTEC && 
                     pcidev->device == PCI_DEVICE_ID_PIO1616L ) {
index 6e777a35b2b6c46c828b6b986b969baaba655d91..ebba53da808d22395948e2ceee17d0e1f00d5edc 100644 (file)
@@ -943,7 +943,8 @@ static int das08_attach(comedi_device *dev,comedi_devconfig *it)
                }
                printk("\n");
                // find card
-               pci_for_each_dev(pdev){
+               for(pdev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, NULL); pdev != NULL ; 
+                       pdev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pdev)) {
                        if(pdev->vendor == PCI_VENDOR_ID_COMPUTERBOARDS &&
                                pdev->device == PCI_DEVICE_ID_PCIDAS08){
                                if(it->options[0] || it->options[1]){
index 0307aa2babc812fadaa69be9729de7a04170b79e..27cc3c4f6ac4b709ae18c46f843e7dec9991445b 100644 (file)
@@ -60,11 +60,8 @@ static void pci_card_list_init(unsigned short pci_vendor, char display)
        inova_devices=NULL;
        last=NULL;
        
-#if LINUX_VERSION_CODE < 0x020300
-       for(pcidev=pci_devices;pcidev;pcidev=pcidev->next){
-#else
-       pci_for_each_dev(pcidev){
-#endif
+       for(pcidev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, NULL); pcidev != NULL ; 
+               pcidev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pcidev)) {
                if(pcidev->vendor==pci_vendor){
                        inova=kmalloc(sizeof(*inova),GFP_KERNEL);
                        memset(inova,0,sizeof(*inova));
index 8aea37eed6b03e3963317e0e14bd064bc0aa0fca..0685c7e90d905c797d89cc25c9d5db443f5e9402 100644 (file)
@@ -140,7 +140,8 @@ static int cnt_attach(comedi_device *dev, comedi_devconfig *it)
   int              error, i;
 
   /* Probe the device to determine what device in the series it is. */
-  pci_for_each_dev(pci_device)
+       for(pci_device = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, NULL); pci_device != NULL ; 
+               pci_device = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pci_device))
   {
     if(pci_device->vendor == PCI_VENDOR_ID_KOLTER)
     {
index 0124d6db55874c4a5305b4de40198479f392e488..a4b82150d505a3d60437f3ba7b0e51577aceba00 100644 (file)
@@ -397,7 +397,8 @@ static int me4000_probe(comedi_device *dev, comedi_devconfig *it){
     /*
      * Probe the device to determine what device in the series it is.
      */
-    pci_for_each_dev(pci_device){
+       for(pci_device = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, NULL); pci_device != NULL ; 
+               pci_device = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pci_device)) {
        if(pci_device->vendor == PCI_VENDOR_ID_MEILHAUS){
            for(i = 0; i < ME4000_BOARD_VERSIONS; i++){
                if(me4000_boards[i].device_id == pci_device->device){
index 617193c712d52b7de5125448994ad4b94d6c4adb..2785d7ad3fe7c566bccd22495f64c169855f6b2a 100644 (file)
@@ -684,7 +684,8 @@ static int me_attach(comedi_device *dev,comedi_devconfig *it)
 //
 // Probe the device to determine what device in the series it is.
 //
-  pci_for_each_dev(pci_device)
+       for(pci_device = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, NULL); pci_device != NULL ; 
+               pci_device = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pci_device))
   {
     if(pci_device->vendor == PCI_VENDOR_ID_MEILHAUS)
     {
index 463b923c463904f46dcae940ccfc6cb40ac4911a..6bdc4368f86955931b992668b921c908b7ed97a3 100644 (file)
@@ -72,7 +72,8 @@ void mite_init(void)
        struct pci_dev *pcidev;
        struct mite_struct *mite;
 
-       pci_for_each_dev(pcidev){
+       for(pcidev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, NULL); pcidev != NULL ; 
+               pcidev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pcidev)) {
                if(pcidev->vendor==PCI_VENDOR_ID_NATINST){
                        mite=kmalloc(sizeof(*mite),GFP_KERNEL);
                        if(!mite){
index bc0a072e50bdf11d57c99aab271544a8441a2d94..71df9d86a8fd4f87a6aa3006571b6defd88ce7bc 100644 (file)
@@ -774,7 +774,8 @@ static int rtd_attach (
     /*
      * Probe the device to determine what device in the series it is.
      */
-    pci_for_each_dev (pcidev) {
+       for(pcidev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, NULL); pcidev != NULL ; 
+               pcidev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pcidev)) {
        if (pcidev->vendor == PCI_VENDOR_ID_RTD) {
            if (it->options[0] || it->options[1]) {
                if (pcidev->bus->number == it->options[0]
index a5fea293b3c88cf3e113a8af663a152ab848836b..1a03fc84adfb530d9e41c18cf20efc5ec1662784 100644 (file)
@@ -135,10 +135,10 @@ int comedi_request_irq(unsigned irq, irqreturn_t (*handler)(int, void *,struct p
        struct comedi_irq_struct *it;
        int ret;
 
-       it=kmalloc(sizeof(*it),GFP_KERNEL);
+       it=kmalloc(sizeof(struct comedi_irq_struct),GFP_KERNEL);
        if(!it)
                return -ENOMEM;
-       memset(it,0,sizeof(*it));
+       memset(it,0,sizeof(struct comedi_irq_struct));
 
        it->handler=handler;
        it->irq=irq;
index 600ae0b3135764650978760d3a38a91ad78ffa57..b4edba12045173488c8fe03a2532602d6d124b29 100644 (file)
 #include_next <linux/pci.h>
 #define PCI_SUPPORT_VER2
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
-/* we should get rid of this, as it has been dropped from 2.6 */
-#define pci_for_each_dev(x) \
-       for((x) = pci_find_device(PCI_ANY_ID,PCI_ANY_ID,NULL); \
-               (x); \
-               (x) = pci_find_device(PCI_ANY_ID,PCI_ANY_ID,(x)))
-#endif
-
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0) /* XXX */
 
 struct pci_driver {
@@ -39,9 +31,6 @@ struct pci_driver {
 static inline int pci_module_init(struct pci_driver *drv) { return 0; }
 static inline void pci_unregister_driver(struct pci_driver *) { return; }
 
-#define pci_for_each_dev(x)    \
-       for((x)=pci_devices;(x);(x)=(x)->next)
-
 static inline int pci_enable_device(struct pci_dev *dev){return 0;}
 #define pci_disable_device(x)