From 2c0cd2e750e4d087bae9ad5cb8b74f36e3d282d0 Mon Sep 17 00:00:00 2001 From: Frank Mori Hess Date: Wed, 21 Apr 2004 05:56:54 +0000 Subject: [PATCH] fixes for 64bit archs --- comedi/drivers/adl_pci9118.c | 4 ++-- comedi/drivers/cb_pcidas64.c | 2 +- comedi/drivers/daqboard2000.c | 10 +++++----- comedi/drivers/dt3000.c | 2 +- comedi/drivers/icp_multi.c | 2 +- comedi/drivers/ii_pci20kc.c | 6 +++--- comedi/drivers/me_daq.c | 4 ++-- comedi/drivers/ni_660x.c | 2 +- comedi/drivers/pcm3730.c | 4 ++-- comedi/drivers/usbdux.c | 6 +++--- 10 files changed, 21 insertions(+), 21 deletions(-) diff --git a/comedi/drivers/adl_pci9118.c b/comedi/drivers/adl_pci9118.c index 0f10e966..119c710f 100644 --- a/comedi/drivers/adl_pci9118.c +++ b/comedi/drivers/adl_pci9118.c @@ -1873,8 +1873,8 @@ static int pci9118_detach(comedi_device *dev) if (devpriv->valid) pci9118_reset(dev); release_region(devpriv->iobase_a,this_board->iorange_amcc); if (devpriv->allocated) pci_card_free(devpriv->amcc); - if (devpriv->dmabuf_virt[0]) free_pages((unsigned int)devpriv->dmabuf_virt[0],devpriv->dmabuf_pages[0]); - if (devpriv->dmabuf_virt[1]) free_pages((unsigned int)devpriv->dmabuf_virt[1],devpriv->dmabuf_pages[1]); + if (devpriv->dmabuf_virt[0]) free_pages((unsigned long)devpriv->dmabuf_virt[0],devpriv->dmabuf_pages[0]); + if (devpriv->dmabuf_virt[1]) free_pages((unsigned long)devpriv->dmabuf_virt[1],devpriv->dmabuf_pages[1]); } if(dev->irq) comedi_free_irq(dev->irq,dev); diff --git a/comedi/drivers/cb_pcidas64.c b/comedi/drivers/cb_pcidas64.c index 2c12f020..5077bd4d 100644 --- a/comedi/drivers/cb_pcidas64.c +++ b/comedi/drivers/cb_pcidas64.c @@ -3617,7 +3617,7 @@ static uint16_t read_eeprom(comedi_device *dev, uint8_t address) static const int read_command = 0x6; unsigned int bitstream = (read_command << 8) | address; unsigned int bit; - const int plx_control_addr = priv(dev)->plx9080_iobase + PLX_CONTROL_REG; + const unsigned long plx_control_addr = priv(dev)->plx9080_iobase + PLX_CONTROL_REG; uint16_t value; static const int value_length = 16; static const int eeprom_comedi_udelay = 1; diff --git a/comedi/drivers/daqboard2000.c b/comedi/drivers/daqboard2000.c index 6847c382..e5469165 100644 --- a/comedi/drivers/daqboard2000.c +++ b/comedi/drivers/daqboard2000.c @@ -78,7 +78,7 @@ Configuration options: | | +-------- Simultaneous sample and hold | +---------- Signed data format +------------------------- Correction offset low - + Word2: +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ! | | | ! | | | ! | | | ! | | | ! @@ -438,7 +438,7 @@ static int daqboard2000_ao_insn_write(comedi_device *dev, comedi_subdevice *s, int timeout; for(i=0;in;i++){ - /* + /* * OK, since it works OK without enabling the DAC's, let's keep * it as simple as possible... */ @@ -546,7 +546,7 @@ static int initialize_daqboard2000(comedi_device *dev, daqboard2000_pulseProgPin(dev); if(daqboard2000_pollCPLD(dev, DAQBOARD2000_CPLD_INIT)) { for (i = 0 ; i < len ; i++) { - if (cpld_array[i] == 0xff && cpld_array[i+1] == 0x20) { + if (cpld_array[i] == 0xff && cpld_array[i+1] == 0x20) { #ifdef DEBUG_EEPROM printk("Preamble found at %d\n", i); #endif @@ -752,8 +752,8 @@ static int daqboard2000_attach(comedi_device *dev, comedi_devconfig *it) printk("Interrupt after is: %x\n", interrupt); */ - dev->iobase = (int)devpriv->daq; - + dev->iobase = (unsigned long)devpriv->daq; + dev->board_name = this_board->name; s = dev->subdevices + 0; diff --git a/comedi/drivers/dt3000.c b/comedi/drivers/dt3000.c index 7a9044d4..241fa368 100644 --- a/comedi/drivers/dt3000.c +++ b/comedi/drivers/dt3000.c @@ -883,7 +883,7 @@ static int setup_pci(comedi_device *dev) printk("0x%08lx mapped to %p, ",devpriv->phys_addr,devpriv->io_addr); #endif - dev->iobase = (int)devpriv->io_addr; + dev->iobase = (unsigned long)devpriv->io_addr; return 0; } diff --git a/comedi/drivers/icp_multi.c b/comedi/drivers/icp_multi.c index 8dc69eeb..9d1f656f 100644 --- a/comedi/drivers/icp_multi.c +++ b/comedi/drivers/icp_multi.c @@ -919,7 +919,7 @@ static int icp_multi_attach(comedi_device *dev,comedi_devconfig *it) printk("0x%08lx mapped to %p, ", iobase, devpriv->io_addr); #endif - dev->iobase = (int)devpriv->io_addr; + dev->iobase = (unsigned long)devpriv->io_addr; dev->board_name = this_board->name; diff --git a/comedi/drivers/ii_pci20kc.c b/comedi/drivers/ii_pci20kc.c index 2c01075b..0ee79c9b 100644 --- a/comedi/drivers/ii_pci20kc.c +++ b/comedi/drivers/ii_pci20kc.c @@ -137,14 +137,14 @@ options for PCI-20341M: typedef union { - int iobase; + unsigned long iobase; struct { - int iobase; + unsigned long iobase; comedi_lrange *ao_range_list[2]; /* range of channels of ao module */ lsampl_t last_data[2]; }pci20006; struct { - int iobase; + unsigned long iobase; int timebase; int settling_time; int ai_gain; diff --git a/comedi/drivers/me_daq.c b/comedi/drivers/me_daq.c index 4264d0c2..617193c7 100644 --- a/comedi/drivers/me_daq.c +++ b/comedi/drivers/me_daq.c @@ -261,8 +261,8 @@ COMEDI_INITCLEANUP(me_driver); typedef struct { struct pci_dev* pci_device; - unsigned int plx_regbase; // PLX configuration base address - unsigned int me_regbase; // Base address of the Meilhaus card + unsigned long plx_regbase; // PLX configuration base address + unsigned long me_regbase; // Base address of the Meilhaus card unsigned int plx_regbase_size; // Size of PLX configuration space unsigned int me_regbase_size; // Size of Meilhaus space diff --git a/comedi/drivers/ni_660x.c b/comedi/drivers/ni_660x.c index 557678a4..cf50b801 100644 --- a/comedi/drivers/ni_660x.c +++ b/comedi/drivers/ni_660x.c @@ -840,7 +840,7 @@ ni_660x_GPCT_rinsn(comedi_device *dev, comedi_subdevice *s, value is */ int tmpdata[2]; - int address; + unsigned long address; /* ============================================================ */ /* 1 subdevice with 8 channels, differentation based on channel */ diff --git a/comedi/drivers/pcm3730.c b/comedi/drivers/pcm3730.c index bde98e35..34be1f5c 100644 --- a/comedi/drivers/pcm3730.c +++ b/comedi/drivers/pcm3730.c @@ -47,7 +47,7 @@ static int pcm3730_do_insn_bits(comedi_device *dev,comedi_subdevice *s, if(data[0]){ s->state &= ~data[0]; s->state |= (data[0]&data[1]); - outb(s->state,dev->iobase+(int)(s->private)); + outb(s->state,dev->iobase+(unsigned long)(s->private)); } data[1] = s->state; @@ -58,7 +58,7 @@ static int pcm3730_di_insn_bits(comedi_device *dev,comedi_subdevice *s, comedi_insn *insn,lsampl_t *data) { if(insn->n!=2)return -EINVAL; - data[1] = inb(dev->iobase+(int)(s->private)); + data[1] = inb(dev->iobase+(unsigned long)(s->private)); return 2; } diff --git a/comedi/drivers/usbdux.c b/comedi/drivers/usbdux.c index 9542221a..1d4c9aa5 100644 --- a/comedi/drivers/usbdux.c +++ b/comedi/drivers/usbdux.c @@ -917,11 +917,11 @@ int usbduxsub_submit_InURBs(usbduxsub_t* usbduxsub) { usbduxsub->urbIn[i]->status = 0; usbduxsub->urbIn[i]->transfer_flags = URB_ISO_ASAP; #ifdef CONFIG_COMEDI_DEBUG - printk("comedi%d: usbdux: submitting in-urb[%d]: %x,%x\n", + printk("comedi%d: usbdux: submitting in-urb[%d]: %p,%p\n", usbduxsub->comedidev->minor, i, - (int)(usbduxsub->urbIn[i]->context), - (int)(usbduxsub->urbIn[i]->dev)); + (usbduxsub->urbIn[i]->context), + (usbduxsub->urbIn[i]->dev)); #endif errFlag = USB_SUBMIT_URB (usbduxsub->urbIn[i]); -- 2.26.2