From 70551f67ae830ef27139843c09c0df609873930f Mon Sep 17 00:00:00 2001 From: Frank Mori Hess Date: Tue, 2 May 2006 01:52:34 +0000 Subject: [PATCH] Fixed some compile warnings, and replaced pci_for_each_dev with a for loop using pci_get_device(). --- comedi/drivers/adl_pci7432.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/comedi/drivers/adl_pci7432.c b/comedi/drivers/adl_pci7432.c index 609d1bae..dd8ee444 100644 --- a/comedi/drivers/adl_pci7432.c +++ b/comedi/drivers/adl_pci7432.c @@ -31,6 +31,7 @@ Configuration Options: */ #include +#include #include #define PCI7432_DI 0x00 @@ -101,12 +102,14 @@ static int adl_pci7432_attach(comedi_device *dev,comedi_devconfig *it) if(alloc_subdevices(dev, 2)<0) return -ENOMEM; - pci_for_each_dev ( pcidev ) { + for(pcidev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, NULL); pcidev != NULL ; + pcidev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pcidev)) + { if ( pcidev->vendor == PCI_VENDOR_ID_ADLINK && pcidev->device == PCI_DEVICE_ID_PCI7432 ) { dev->iobase = pci_resource_start ( pcidev, 2 ); - printk ( "comedi: base addr %4x\n", dev->iobase ); + printk ( "comedi: base addr %4lx\n", dev->iobase ); dev->board_ptr = adl_pci7432_boards + 0; @@ -157,7 +160,7 @@ static int adl_pci7432_do_insn_bits(comedi_device *dev,comedi_subdevice *s, come s->state &= ~data[0]; s->state |= (data[0]&data[1]); - printk ( "comedi: out: %8x on iobase %4x\n", s->state, dev->iobase + PCI7432_DO); + printk ( "comedi: out: %8x on iobase %4lx\n", s->state, dev->iobase + PCI7432_DO); outl(s->state & 0xffffffff, dev->iobase + PCI7432_DO); } return 2; -- 2.26.2