fixes for 64bit archs
authorFrank Mori Hess <fmhess@speakeasy.net>
Wed, 21 Apr 2004 05:56:54 +0000 (05:56 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Wed, 21 Apr 2004 05:56:54 +0000 (05:56 +0000)
comedi/drivers/adl_pci9118.c
comedi/drivers/cb_pcidas64.c
comedi/drivers/daqboard2000.c
comedi/drivers/dt3000.c
comedi/drivers/icp_multi.c
comedi/drivers/ii_pci20kc.c
comedi/drivers/me_daq.c
comedi/drivers/ni_660x.c
comedi/drivers/pcm3730.c
comedi/drivers/usbdux.c

index 0f10e9665223204f34d5070312f921d657dcd2c2..119c710f606ca01dd2df6d507de990f899a103f0 100644 (file)
@@ -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);
index 2c12f020cd3b42c017eeb7eb9333196c77ce62c2..5077bd4d1ceae88a6d57461b38a728bab1abe269 100644 (file)
@@ -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;
index 6847c382e38558131318a178537ddf315f38dab8..e5469165312a2410319f495706f98665e2455088 100644 (file)
@@ -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;i<insn->n;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;
index 7a9044d444315ace08295a3b55a1bb4f74ec202c..241fa368e019893fee1d19659f1d3eb046d10251 100644 (file)
@@ -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;
 }
index 8dc69eebaf2567ace1e56c51d87846feaf75d43e..9d1f656ffdc6118b58e15327c233ff9da5233080 100644 (file)
@@ -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;
 
index 2c01075b1483bcc21b98607eac9afb5d2996041e..0ee79c9b3e88182e25b6b533c543cf52b806ade4 100644 (file)
@@ -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;
index 4264d0c2a2633b91443f44cd8784ac637f74caa1..617193c712d52b7de5125448994ad4b94d6c4adb 100644 (file)
@@ -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
 
index 557678a483773003e93006fad6e0802f68e28c2a..cf50b801d1c7b7d7e8e7e2ce8741cfceeafd80e1 100644 (file)
@@ -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 */
index bde98e354d1136a20a9e186e137bb426b2bb85e5..34be1f5c741b0c678a01fddf1583993f6e61684d 100644 (file)
@@ -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;
 }
 
index 9542221acfdb707e5391074167b9806c55e9147f..1d4c9aa52d2101b2d55c7bd147a50532c4de56f2 100644 (file)
@@ -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]);