Cleaned up resource types. Used unsigned int for IRQs. Used unsigned long
authorIan Abbott <abbotti@mev.co.uk>
Mon, 7 Aug 2006 17:33:24 +0000 (17:33 +0000)
committerIan Abbott <abbotti@mev.co.uk>
Mon, 7 Aug 2006 17:33:24 +0000 (17:33 +0000)
for I/O ports.  Used resource_size_t for physical memory regions.

73 files changed:
comedi/drivers/8255.c
comedi/drivers/adl_pci6208.c
comedi/drivers/adl_pci9111.c
comedi/drivers/adl_pci9118.c
comedi/drivers/adv_pci1710.c
comedi/drivers/adv_pci_dio.c
comedi/drivers/amplc_dio200.c
comedi/drivers/amplc_pc236.c
comedi/drivers/amplc_pc263.c
comedi/drivers/amplc_pci224.c
comedi/drivers/amplc_pci230.c
comedi/drivers/c6xdigio.c
comedi/drivers/cb_das16_cs.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/comedi_parport.c
comedi/drivers/das08_cs.c
comedi/drivers/das16.c
comedi/drivers/das16m1.c
comedi/drivers/das1800.c
comedi/drivers/das6402.c
comedi/drivers/das800.c
comedi/drivers/dt2801.c
comedi/drivers/dt2811.c
comedi/drivers/dt2814.c
comedi/drivers/dt2815.c
comedi/drivers/dt2817.c
comedi/drivers/dt282x.c
comedi/drivers/dt3000.c
comedi/drivers/fl512.c
comedi/drivers/gsc_hpdi.c
comedi/drivers/icp_multi.c
comedi/drivers/icp_multi.h
comedi/drivers/ke_counter.c
comedi/drivers/me4000.h
comedi/drivers/me_daq.c
comedi/drivers/mite.c
comedi/drivers/mite.h
comedi/drivers/mpc624.c
comedi/drivers/multiq3.c
comedi/drivers/ni_at_a2150.c
comedi/drivers/ni_atmio.c
comedi/drivers/ni_atmio16d.c
comedi/drivers/ni_daq_dio24.c
comedi/drivers/ni_labpc.c
comedi/drivers/ni_labpc.h
comedi/drivers/ni_labpc_cs.c
comedi/drivers/ni_mio_cs.c
comedi/drivers/ni_pcidio.c
comedi/drivers/ni_pcimio.c
comedi/drivers/pcl711.c
comedi/drivers/pcl724.c
comedi/drivers/pcl725.c
comedi/drivers/pcl726.c
comedi/drivers/pcl730.c
comedi/drivers/pcl812.c
comedi/drivers/pcl816.c
comedi/drivers/pcl818.c
comedi/drivers/pcm3724.c
comedi/drivers/pcm3730.c
comedi/drivers/pcmad.c
comedi/drivers/pcmda12.c
comedi/drivers/pcmuio.c
comedi/drivers/poc.c
comedi/drivers/quatech_daqp_cs.c
comedi/drivers/rtd520.c
comedi/drivers/rti800.c
comedi/drivers/rti802.c
comedi/drivers/s626.c
include/linux/comedidev.h

index fa752385d2ab49d2e6ed404a5339723a2764db8a..963ce1e4270d6f185aa5769ba06b6b953fc72ebf 100644 (file)
@@ -134,7 +134,7 @@ void subdev_8255_interrupt(comedi_device *dev, comedi_subdevice *s)
 
 static int subdev_8255_cb(int dir,int port,int data,unsigned long arg)
 {
-       int iobase=arg;
+       unsigned long iobase=arg;
 
        if(dir){
                outb(data,iobase+port);
@@ -362,7 +362,7 @@ void subdev_8255_cleanup(comedi_device *dev,comedi_subdevice *s)
 static int dev_8255_attach(comedi_device *dev,comedi_devconfig *it)
 {
        int ret;
-       int iobase;
+       unsigned long iobase;
        int i;
 
        printk("comedi%d: 8255:",dev->minor);
@@ -384,7 +384,7 @@ static int dev_8255_attach(comedi_device *dev,comedi_devconfig *it)
        for(i=0;i<dev->n_subdevices;i++){
                iobase=it->options[i];
 
-               printk(" 0x%04x",iobase);
+               printk(" 0x%04lx",iobase);
                if(!request_region(iobase,_8255_SIZE,"8255")){
                        printk(" (I/O port conflict)");
 
@@ -401,7 +401,8 @@ static int dev_8255_attach(comedi_device *dev,comedi_devconfig *it)
 
 static int dev_8255_detach(comedi_device *dev)
 {
-       int i,iobase;
+       int i;
+       unsigned long iobase;
        comedi_subdevice *s;
 
        printk("comedi%d: 8255: remove\n",dev->minor);
index ba577e89a1c19c38aaeb33505506c17a351b030a..5b083095c2dfda8f813cd25f239fb256f1a60710 100644 (file)
@@ -122,7 +122,7 @@ COMEDI_INITCLEANUP(driver_pci6208);
 static int
 pci6208_find_device(comedi_device *dev, int bus, int slot);
 static int
-pci6208_pci_setup(struct pci_dev *pci_dev, int *io_base_ptr, int dev_minor);
+pci6208_pci_setup(struct pci_dev *pci_dev, unsigned long *io_base_ptr, int dev_minor);
 
 /*read/write functions*/
 static int pci6208_ao_winsn(comedi_device *dev,comedi_subdevice *s,
@@ -143,7 +143,8 @@ static int pci6208_ao_rinsn(comedi_device *dev,comedi_subdevice *s,
 static int pci6208_attach(comedi_device *dev,comedi_devconfig *it)
 {
        comedi_subdevice *s;
-       int retval, io_base;
+       int retval;
+       unsigned long io_base;
        
        printk("comedi%d: pci6208: ", dev->minor);
 
@@ -358,9 +359,9 @@ found:
 }
 
 static int 
-pci6208_pci_setup(struct pci_dev *pci_dev, int *io_base_ptr, int dev_minor)
+pci6208_pci_setup(struct pci_dev *pci_dev, unsigned long *io_base_ptr, int dev_minor)
 {
-       int io_base, io_range, lcr_io_base, lcr_io_range;
+       unsigned long io_base, io_range, lcr_io_base, lcr_io_range;
 
        // Enable PCI device
        if (pci_enable_device(pci_dev) < 0) {
@@ -370,9 +371,9 @@ pci6208_pci_setup(struct pci_dev *pci_dev, int *io_base_ptr, int dev_minor)
        
        // Read local configuration register base address [PCI_BASE_ADDRESS #1].
        lcr_io_base = pci_resource_start(pci_dev, 1);
-       lcr_io_range = pci_resource_end(pci_dev, 1) - lcr_io_base +1;
+       lcr_io_range = pci_resource_len(pci_dev, 1);
          
-       printk("comedi%d: local config registers at address 0x%4x [0x%4x]\n",
+       printk("comedi%d: local config registers at address 0x%4lx [0x%4lx]\n",
                dev_minor,
                lcr_io_base,
                lcr_io_range);
@@ -381,7 +382,7 @@ pci6208_pci_setup(struct pci_dev *pci_dev, int *io_base_ptr, int dev_minor)
        io_base = pci_resource_start (pci_dev, 2);
        io_range = pci_resource_end (pci_dev, 2) - io_base +1;
        
-       printk ("comedi%d: 6208 registers at address 0x%4x [0x%4x]\n",
+       printk ("comedi%d: 6208 registers at address 0x%4lx [0x%4lx]\n",
                dev_minor,
                io_base,
                io_range);
index a147bf5fa4e006117fcc933c3dc4348150c5555c..070a3f23999a300c29533af57e65ed859b2c7c7a 100644 (file)
@@ -353,10 +353,10 @@ COMEDI_INITCLEANUP(pci9111_driver);
 typedef struct
 {
        struct pci_dev* pci_device;
-       int             io_range;                       // PCI6503 io range
+       unsigned long   io_range;                       // PCI6503 io range
 
-       int             lcr_io_base;                    // Local configuration register base address
-       int             lcr_io_range;
+       unsigned long   lcr_io_base;                    // Local configuration register base address
+       unsigned long   lcr_io_range;
 
        int             stop_counter;
        int             stop_is_none;
@@ -397,7 +397,7 @@ pci9111_private_data_struct;
 #define PLX9050_PCI_INTERRUPT_ENABLE   (1 << 6)
 #define PLX9050_SOFTWARE_INTERRUPT     (1 << 7)
 
-static void plx9050_interrupt_control (int io_base,
+static void plx9050_interrupt_control (unsigned long io_base,
                                       bool LINTi1_enable,
                                       bool LINTi1_active_high,
                                       bool LINTi2_enable,
@@ -1256,7 +1256,7 @@ 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;
+       unsigned long io_base, io_range, lcr_io_base, lcr_io_range;
        struct pci_dev* pci_device;
        int error,i;
        pci9111_board_struct* board;
@@ -1323,9 +1323,9 @@ found:
        // 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;
+       lcr_io_range = pci_resource_len (pci_device, 1);
        
-       printk ("comedi%d: local configuration registers at address 0x%4x [0x%4x]\n",
+       printk ("comedi%d: local configuration registers at address 0x%4lx [0x%4lx]\n",
                dev->minor,
                lcr_io_base,
                lcr_io_range);
@@ -1340,9 +1340,9 @@ found:
        // 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;
+       io_range = pci_resource_len (pci_device, 2);
        
-       printk ("comedi%d: 6503 registers at address 0x%4x [0x%4x]\n",
+       printk ("comedi%d: 6503 registers at address 0x%4lx [0x%4lx]\n",
                dev->minor,
                io_base,
                io_range);
@@ -1374,7 +1374,7 @@ found:
                        PCI9111_DRIVER_NAME, 
                        dev)!=0)
                {
-                       printk ("comedi%d: unable to allocate irq  %d\n", dev->minor, pci_device->irq);
+                       printk ("comedi%d: unable to allocate irq  %u\n", dev->minor, pci_device->irq);
                        return -EINVAL;
                }
        }
index e52e45863b89bfa12a0bdea543420123ba085b7a..d374033752287fbf5b8d9f9ff3e95a32509a2c73 100644 (file)
@@ -241,7 +241,7 @@ static comedi_driver driver_pci9118={
 COMEDI_INITCLEANUP(driver_pci9118);
 
 typedef struct{
-       int                     iobase_a;       // base+size for AMCC chip
+       unsigned long           iobase_a;       // base+size for AMCC chip
        unsigned int            master;         // master capable
        struct pci_dev          *pcidev;                // ptr to actual pcidev
        unsigned int            usemux;         // we want to use external multiplexor!
@@ -1668,8 +1668,9 @@ static int pci9118_attach(comedi_device *dev,comedi_devconfig *it)
 {
        comedi_subdevice *s;
        int ret,pages,i;
-       unsigned short master,irq;
-        unsigned int iobase_a,iobase_9;
+       unsigned short master;
+       unsigned int irq;
+        unsigned long iobase_a,iobase_9;
        struct pci_dev *pcidev;
        int opt_bus, opt_slot;
        const char *errstr;
@@ -1739,7 +1740,7 @@ static int pci9118_attach(comedi_device *dev,comedi_devconfig *it)
        iobase_a = pci_resource_start(pcidev, 0);
        iobase_9 = pci_resource_start(pcidev, 2);
 
-       rt_printk(", b:s:f=%d:%d:%d, io=0x%4x, 0x%4x",pci_bus,pci_slot,pci_func,iobase_9,iobase_a);
+       rt_printk(", b:s:f=%d:%d:%d, io=0x%4lx, 0x%4lx",pci_bus,pci_slot,pci_func,iobase_9,iobase_a);
        
         dev->iobase=iobase_9;
        dev->board_name = this_board->name;
@@ -1754,7 +1755,7 @@ static int pci9118_attach(comedi_device *dev,comedi_devconfig *it)
                        rt_printk(", unable to allocate IRQ %d, DISABLING IT", irq);
                        irq=0; /* Can't use IRQ */
                } else {
-                       rt_printk(", irq=%d", irq);
+                       rt_printk(", irq=%u", irq);
                }    
        } else {
                        rt_printk(", IRQ disabled");
index eed2315ac35da65d15788295a48f2fa21b1175c6..ac03e34401196a9bbf3ed2803258607f974f9c46 100644 (file)
@@ -1220,8 +1220,8 @@ static int pci1710_attach(comedi_device *dev,comedi_devconfig *it)
 {
        comedi_subdevice *s;
        int ret,subdev,n_subdevices;
-       unsigned short irq;
-        unsigned int iobase;
+       unsigned int irq;
+        unsigned long iobase;
        struct pci_dev *pcidev;
        int opt_bus, opt_slot;
        const char *errstr;
@@ -1280,7 +1280,7 @@ static int pci1710_attach(comedi_device *dev,comedi_devconfig *it)
        irq = pcidev->irq;
        iobase = pci_resource_start(pcidev, 2);
 
-       rt_printk(", b:s:f=%d:%d:%d, io=0x%4x",pci_bus,pci_slot,pci_func,iobase);
+       rt_printk(", b:s:f=%d:%d:%d, io=0x%4lx",pci_bus,pci_slot,pci_func,iobase);
 
         dev->iobase=iobase;
 
@@ -1305,7 +1305,7 @@ static int pci1710_attach(comedi_device *dev,comedi_devconfig *it)
                                rt_printk(", unable to allocate IRQ %d, DISABLING IT", irq);
                                irq=0; /* Can't use IRQ */
                        } else {
-                               rt_printk(", irq=%d", irq);
+                               rt_printk(", irq=%u", irq);
                        }    
                } else {
                        rt_printk(", IRQ disabled");
index 15ab391b937de05959d8157c40a49c4d16cf3d2d..60ac2128edaaef9d3ec5efd5c93112d60b4ef832 100644 (file)
@@ -873,7 +873,8 @@ static int CheckAndAllocCard(comedi_device *dev, comedi_devconfig *it,
 static int pci_dio_attach(comedi_device *dev, comedi_devconfig *it)
 {
        comedi_subdevice *s;
-       int ret, subdev, n_subdevices, i, j, iobase, found=0;
+       int ret, subdev, n_subdevices, i, j, found=0;
+       unsigned long iobase;
        struct pci_dev* pcidev;
 
        rt_printk("comedi%d: adv_pci_dio: board=%s",
@@ -916,7 +917,7 @@ static int pci_dio_attach(comedi_device *dev, comedi_devconfig *it)
                return -EIO;
        }       
        iobase=pci_resource_start(pcidev, this_board->main_pci_region);
-       rt_printk(", b:s:f=%d:%d:%d, io=0x%4x",
+       rt_printk(", b:s:f=%d:%d:%d, io=0x%4lx",
                pcidev->bus->number, PCI_SLOT(pcidev->devfn), PCI_FUNC(pcidev->devfn),
                iobase);
        
index 3f4b8fe558fc1fc2a417e1692e5f335959e61b82..91016fc8969f4cd09a247c3450816ebd29b7ac75 100644 (file)
@@ -1187,7 +1187,8 @@ dio200_attach(comedi_device *dev,comedi_devconfig *it)
 {
        comedi_subdevice *s;
        struct pci_dev *pci_dev = NULL;
-       int iobase = 0, irq = 0;
+       unsigned long iobase = 0;
+       unsigned int irq = 0;
        int bus = 0, slot = 0;
        dio200_layout *layout;
        int share_irq = 0;
@@ -1313,21 +1314,21 @@ dio200_attach(comedi_device *dev,comedi_devconfig *it)
                                        DIO200_DRIVER_NAME, dev) >= 0) {
                        dev->irq = irq;
                } else {
-                       printk(KERN_WARNING "comedi%d: warning! irq %d unavailable!\n",
+                       printk(KERN_WARNING "comedi%d: warning! irq %u unavailable!\n",
                                        dev->minor, irq);
                }
        }
 
        printk(KERN_INFO "comedi%d: %s ", dev->minor, dev->board_name);
        if (thisboard->bustype == isa_bustype) {
-               printk("(base %#x) ", iobase);
+               printk("(base %#lx) ", iobase);
        } else {
                printk("(pci %02x:%02x.%x) ", pci_dev->bus->number,
                                PCI_SLOT(pci_dev->devfn),
                                PCI_FUNC(pci_dev->devfn));
        }
        if (irq) {
-               printk("(irq %d%s) ", irq, (dev->irq ? "" : " UNAVAILABLE"));
+               printk("(irq %u%s) ", irq, (dev->irq ? "" : " UNAVAILABLE"));
        } else {
                printk("(no irq) ");
        }
index a0a7f658fb7cd16c5db8c6b8930744786a848524..ac3eefe1d6bb8488d15a2ee03bfcaeb3e696a0b0 100644 (file)
@@ -117,7 +117,7 @@ MODULE_DEVICE_TABLE(pci, pc236_pci_table);
 typedef struct{
        /* PCI device */
        struct pci_dev *pci_dev;
-       int lcr_iobase; /* PLX PCI9052 config registers in PCIBAR1 */
+       unsigned long lcr_iobase;       /* PLX PCI9052 config registers in PCIBAR1 */
        int enable_irq;
 }pc236_private;
 
@@ -165,7 +165,8 @@ static int pc236_attach(comedi_device *dev,comedi_devconfig *it)
 {
        comedi_subdevice *s;
        struct pci_dev *pci_dev = NULL;
-       int iobase = 0, irq = 0;
+       unsigned long iobase = 0;
+       unsigned int irq = 0;
        int bus = 0, slot = 0;
        struct pci_device_id *pci_id;
        int share_irq = 0;
@@ -303,14 +304,14 @@ static int pc236_attach(comedi_device *dev,comedi_devconfig *it)
                }
        }
        if (thisboard->bustype == isa_bustype) {
-               printk("(base %#x) ", iobase);
+               printk("(base %#lx) ", iobase);
        } else {
                printk("(pci %02x:%02x.%x) ", pci_dev->bus->number,
                                PCI_SLOT(pci_dev->devfn),
                                PCI_FUNC(pci_dev->devfn));
        }
        if (irq) {
-               printk("(irq %d%s) ", irq, (dev->irq ? "" : " UNAVAILABLE"));
+               printk("(irq %u%s) ", irq, (dev->irq ? "" : " UNAVAILABLE"));
        } else {
                printk("(no irq) ");
        }
index 82bb27a80d0bb6b9131319cab63eef0b2ca5cef3..abf6020b84f58d5d82690f4f9664921b3ae26e05 100644 (file)
@@ -142,7 +142,7 @@ static int pc263_attach(comedi_device *dev,comedi_devconfig *it)
 {
        comedi_subdevice *s;
        struct pci_dev *pci_dev = NULL;
-       int iobase = 0;
+       unsigned long iobase = 0;
        int bus = 0, slot = 0;
        struct pci_device_id *pci_id;
        int ret;
@@ -262,7 +262,7 @@ static int pc263_attach(comedi_device *dev,comedi_devconfig *it)
        s->state = s->state | (inb(dev->iobase) << 8);
 
        if (thisboard->bustype == isa_bustype) {
-               printk("(base %#x) ", iobase);
+               printk("(base %#lx) ", iobase);
        } else {
                printk("(pci %02x:%02x.%x) ", pci_dev->bus->number,
                                PCI_SLOT(pci_dev->devfn),
index 019078543497fc291453e4c99518a52a3a5c990f..364acdb165c6e24aa398ade5657091c5a4ed63df 100644 (file)
@@ -1324,7 +1324,7 @@ pci224_attach(comedi_device *dev,comedi_devconfig *it)
 {
        comedi_subdevice *s;
        struct pci_dev *pci_dev;
-       int irq;
+       unsigned int irq;
        int bus = 0, slot = 0;
        unsigned n;
        int ret;
@@ -1478,7 +1478,7 @@ pci224_attach(comedi_device *dev,comedi_devconfig *it)
                                DRIVER_NAME, dev);
                if (ret < 0) {
                        printk(KERN_ERR "comedi%d: error! "
-                                       "unable to allocate irq %d\n",
+                                       "unable to allocate irq %u\n",
                                        dev->minor, irq);
                        return ret;
                } else {
@@ -1491,7 +1491,7 @@ pci224_attach(comedi_device *dev,comedi_devconfig *it)
                        PCI_SLOT(pci_dev->devfn),
                        PCI_FUNC(pci_dev->devfn));
        if (irq) {
-               printk("(irq %d%s) ", irq, (dev->irq ? "" : " UNAVAILABLE"));
+               printk("(irq %u%s) ", irq, (dev->irq ? "" : " UNAVAILABLE"));
        } else {
                printk("(no irq) ");
        }
index 24ab4770041973906d765609423e82cbec915114..c4f75fe8120a249cf59f118b20dfb61e30bdbbe3 100644 (file)
@@ -207,7 +207,7 @@ MODULE_DEVICE_TABLE(pci, pci230_pci_table);
 struct pci230_private{
        struct pci_dev *pci_dev;
        lsampl_t ao_readback[2];        /* Used for AO readback */
-       unsigned int pci_iobase;        /* PCI230's I/O space 1 */      
+       unsigned long pci_iobase;       /* PCI230's I/O space 1 */      
        /* Divisors for 8254 counter/timer. */    
        unsigned int clk_src0;          /* which clock to use for the counter/timers: 10MHz, 1MHz, 100kHz etc */
        unsigned int clk_src1;
@@ -331,7 +331,7 @@ static void pci230_ao_write(comedi_device *dev, sampl_t data, int chan)
 static int pci230_attach(comedi_device *dev,comedi_devconfig *it)
 {
        comedi_subdevice *s;
-       int pci_iobase, iobase = 0;             /* PCI230's I/O spaces 1 and 2 respectively. */
+       unsigned long pci_iobase, iobase;               /* PCI230's I/O spaces 1 and 2 respectively. */
        struct pci_dev *pci_dev;
        int i=0,irq_hdl;
 
@@ -375,7 +375,7 @@ static int pci230_attach(comedi_device *dev,comedi_devconfig *it)
                return -EIO;
        }
 
-       printk("comedi%d: amplc_pci230: I/O region 1 0x%04x I/O region 2 0x%04x\n",dev->minor, pci_iobase, iobase);
+       printk("comedi%d: amplc_pci230: I/O region 1 0x%04lx I/O region 2 0x%04lx\n",dev->minor, pci_iobase, iobase);
 
        devpriv->pci_iobase = pci_iobase;
        dev->iobase = iobase;
@@ -396,7 +396,7 @@ static int pci230_attach(comedi_device *dev,comedi_devconfig *it)
        }
        else {
                dev->irq = devpriv->pci_dev->irq;
-               printk("comedi%d: amplc_pci230: registered irq %d\n", dev->minor, devpriv->pci_dev->irq);
+               printk("comedi%d: amplc_pci230: registered irq %u\n", dev->minor, devpriv->pci_dev->irq);
        }
        
 /*
index 60918c1b104ba4acdeb013a6423eb09482ef9fbc..9899ce90642d248e651a817856d6cf701c64b684 100644 (file)
@@ -48,13 +48,13 @@ http://robot0.ge.uiuc.edu/~spong/mecha/
 #include <linux/comedidev.h>
 #include <linux/pnp.h>
 
-static u8 ReadByteFromHwPort(int addr)
+static u8 ReadByteFromHwPort(unsigned long addr)
 {
   u8 result = inb(addr);
   return result;
 }
 
-static void WriteByteToHwPort(int addr, u8 val)
+static void WriteByteToHwPort(unsigned long addr, u8 val)
 {
   outb_p(val, addr);
 }
@@ -103,7 +103,7 @@ comedi_driver driver_c6xdigio={
        detach:         c6xdigio_detach,
 };
 
-static void  C6X_pwmInit( unsigned baseAddr ) {
+static void  C6X_pwmInit( unsigned long baseAddr ) {
        int timeout=0;
 
 //printk("Inside C6X_pwmInit\n");
@@ -133,7 +133,7 @@ static void  C6X_pwmInit( unsigned baseAddr ) {
        
 }
 
-static void  C6X_pwmOutput( unsigned baseAddr, unsigned channel, int value )
+static void  C6X_pwmOutput( unsigned long baseAddr, unsigned channel, int value )
 {
        unsigned ppcmd;
        union pwmcmdtype pwm;
@@ -202,7 +202,7 @@ static void  C6X_pwmOutput( unsigned baseAddr, unsigned channel, int value )
        
 }
 
-static int C6X_encInput( unsigned baseAddr, unsigned channel)
+static int C6X_encInput( unsigned long baseAddr, unsigned channel)
 {
        unsigned ppcmd;
        union encvaluetype enc;
@@ -301,7 +301,7 @@ static int C6X_encInput( unsigned baseAddr, unsigned channel)
        return(enc.value ^ 0x800000);
 }
 
-static void C6X_encResetAll( unsigned baseAddr )
+static void C6X_encResetAll( unsigned long baseAddr )
 {
     unsigned timeout=0;
 
@@ -429,12 +429,12 @@ static struct pnp_driver c6xdigio_pnp_driver = {
 static int c6xdigio_attach(comedi_device * dev, comedi_devconfig * it)
 {
   int result = 0;
-  int iobase;
-  int irq;
+  unsigned long iobase;
+  unsigned int irq;
   comedi_subdevice *s;
 
     iobase = it->options[0];
-    printk("comedi%d: c6xdigio: 0x%04x\n", dev->minor, iobase);
+    printk("comedi%d: c6xdigio: 0x%04lx\n", dev->minor, iobase);
     if (!request_region(iobase, C6XDIGIO_SIZE, "c6xdigio")) {
       printk("comedi%d: I/O port conflict\n", dev->minor);
       return -EIO;
@@ -451,7 +451,7 @@ static int c6xdigio_attach(comedi_device * dev, comedi_devconfig * it)
 
       irq = it->options[1];
       if (irq > 0) {
-       printk("comedi%d: irq = %d ignored\n", dev->minor, irq);
+       printk("comedi%d: irq = %u ignored\n", dev->minor, irq);
       } else if(irq == 0) {
        printk("comedi%d: no irq\n", dev->minor);
       }
index 29e0f67559416278a71aeb1808975708c4dc5eff..aa38a195c926dfaef14df17b4d6d7a4896dcaeff 100644 (file)
@@ -187,7 +187,7 @@ static int das16cs_attach(comedi_device *dev,comedi_devconfig *it)
                return ret;
        }
        dev->irq = link->irq.AssignedIRQ;
-       printk("irq=%d ",dev->irq);
+       printk("irq=%u ",dev->irq);
 
        dev->board_ptr = das16cs_probe(dev, link);
        if(!dev->board_ptr)return -EIO;
@@ -949,7 +949,7 @@ static void das16cs_pcmcia_config(dev_link_t *link)
        if (link->conf.Vpp1)
        printk(", Vpp %d.%d", link->conf.Vpp1/10, link->conf.Vpp1%10);
        if (link->conf.Attributes & CONF_ENABLE_IRQ)
-       printk(", irq %d", link->irq.AssignedIRQ);
+       printk(", irq %u", link->irq.AssignedIRQ);
        if (link->io.NumPorts1)
        printk(", io 0x%04x-0x%04x", link->io.BasePort1,
                        link->io.BasePort1+link->io.NumPorts1-1);
index 8c573213de5e67001445ec3ee121705625401945..3975d0c3a9d16080f7c9437687e4afc1759acb29 100644 (file)
@@ -408,11 +408,11 @@ typedef struct
        /* would be useful for a PCI device */
        struct pci_dev *pci_dev;
        // base addresses
-       unsigned int s5933_config;
-       unsigned int control_status;
-       unsigned int adc_fifo;
-       unsigned int pacer_counter_dio;
-       unsigned int ao_registers;
+       unsigned long s5933_config;
+       unsigned long control_status;
+       unsigned long adc_fifo;
+       unsigned long pacer_counter_dio;
+       unsigned long ao_registers;
        // divisors of master clock for analog input pacing
        unsigned int divisor1;
        unsigned int divisor2;
@@ -646,8 +646,7 @@ found:
 
        /* 8255 */
        s = dev->subdevices + 2;
-       subdev_8255_init(dev, s, NULL,
-               (unsigned long)(devpriv->pacer_counter_dio + DIO_8255));
+       subdev_8255_init(dev, s, NULL, devpriv->pacer_counter_dio + DIO_8255);
 
        // serial EEPROM,
        s = dev->subdevices + 3;
index 68900bdb520bd77687bcec82d698db090282a5f9..7aa3f4cc0577dbe11fc6ef1ad0a3fa89304350bc 100644 (file)
@@ -1088,9 +1088,9 @@ typedef struct
 {
        struct pci_dev *hw_dev; // pointer to board's pci_dev struct
        // base addresses (physical)
-       unsigned long plx9080_phys_iobase;
-       unsigned long main_phys_iobase;
-       unsigned long dio_counter_phys_iobase;
+       resource_size_t plx9080_phys_iobase;
+       resource_size_t main_phys_iobase;
+       resource_size_t dio_counter_phys_iobase;
        // base addresses (ioremapped)
        void *plx9080_iobase;
        void *main_iobase;
@@ -1729,17 +1729,17 @@ static int attach(comedi_device *dev, comedi_devconfig *it)
                return -ENOMEM;
        }
 
-       DEBUG_PRINT(" plx9080 remapped to 0x%lx\n", priv(dev)->plx9080_iobase);
-       DEBUG_PRINT(" main remapped to 0x%lx\n", priv(dev)->main_iobase);
-       DEBUG_PRINT(" diocounter remapped to 0x%lx\n", priv(dev)->dio_counter_iobase);
+       DEBUG_PRINT(" plx9080 remapped to 0x%p\n", priv(dev)->plx9080_iobase);
+       DEBUG_PRINT(" main remapped to 0x%p\n", priv(dev)->main_iobase);
+       DEBUG_PRINT(" diocounter remapped to 0x%p\n", priv(dev)->dio_counter_iobase);
 
        // figure out what local addresses are
        local_range = readl(priv(dev)->plx9080_iobase + PLX_LAS0RNG_REG) & LRNG_MEM_MASK;
        local_decode = readl(priv(dev)->plx9080_iobase + PLX_LAS0MAP_REG) & local_range & LMAP_MEM_MASK ;
-       priv(dev)->local0_iobase = (priv(dev)->main_phys_iobase & ~local_range) | local_decode;
+       priv(dev)->local0_iobase = ((uint32_t)priv(dev)->main_phys_iobase & ~local_range) | local_decode;
        local_range = readl(priv(dev)->plx9080_iobase + PLX_LAS1RNG_REG) & LRNG_MEM_MASK;
        local_decode = readl(priv(dev)->plx9080_iobase + PLX_LAS1MAP_REG) & local_range & LMAP_MEM_MASK ;
-       priv(dev)->local1_iobase = (priv(dev)->dio_counter_phys_iobase & ~local_range) | local_decode;
+       priv(dev)->local1_iobase = ((uint32_t)priv(dev)->dio_counter_phys_iobase & ~local_range) | local_decode;
 
        DEBUG_PRINT(" local 0 io addr 0x%x\n", priv(dev)->local0_iobase);
        DEBUG_PRINT(" local 1 io addr 0x%x\n", priv(dev)->local1_iobase);
@@ -1752,11 +1752,11 @@ static int attach(comedi_device *dev, comedi_devconfig *it)
        // get irq
        if(comedi_request_irq(pcidev->irq, handle_interrupt, SA_SHIRQ, "cb_pcidas64", dev ))
        {
-               printk(" unable to allocate irq %d\n", pcidev->irq);
+               printk(" unable to allocate irq %u\n", pcidev->irq);
                return -EINVAL;
        }
        dev->irq = pcidev->irq;
-       printk(" irq %i\n", dev->irq);
+       printk(" irq %u\n", dev->irq);
 
        init_plx9080(dev);
        init_stc_registers( dev );
index 100d10543406c90ac2d7440e49ce9a576c60867d..080eb9ad1c3bab3026976e7cde6f546d140f9899 100644 (file)
@@ -363,10 +363,9 @@ found:
 
        // two 8255 digital io subdevices
        s = dev->subdevices + 1;
-       subdev_8255_init(dev, s, NULL, (unsigned long)(devpriv->digitalio));
+       subdev_8255_init(dev, s, NULL, devpriv->digitalio);
        s = dev->subdevices + 2;
-       subdev_8255_init(dev, s, NULL,
-               (unsigned long)(devpriv->digitalio + PORT2A));
+       subdev_8255_init(dev, s, NULL, devpriv->digitalio + PORT2A);
 
        printk(" eeprom:");
        for(index = 0; index < EEPROM_SIZE; index++)
index 16ee8575bfbbe60e0958f481e8e080650d7b19c0..e9b3b75f9b10750e5304fefe840e7722993ee879 100644 (file)
@@ -146,11 +146,11 @@ typedef struct{
        struct pci_dev *pci_dev;
 
        //base addresses
-       unsigned int BADR0;
-       unsigned int BADR1;
-       unsigned int BADR2;
-       unsigned int BADR3;
-       unsigned int BADR4;
+       unsigned long BADR0;
+       unsigned long BADR1;
+       unsigned long BADR2;
+       unsigned long BADR3;
+       unsigned long BADR4;
 
        /* Used for AO readback */
        lsampl_t ao_readback[2];
@@ -278,11 +278,11 @@ found:
        devpriv->BADR4 = pci_resource_start(devpriv->pci_dev, 4); 
 
 #ifdef CBPCIMDAS_DEBUG
-       printk("devpriv->BADR0 = %d\n",devpriv->BADR0);
-       printk("devpriv->BADR1 = %d\n",devpriv->BADR1);
-       printk("devpriv->BADR2 = %d\n",devpriv->BADR2);
-       printk("devpriv->BADR3 = %d\n",devpriv->BADR3);
-       printk("devpriv->BADR4 = %d\n",devpriv->BADR4);
+       printk("devpriv->BADR0 = 0x%lx\n",devpriv->BADR0);
+       printk("devpriv->BADR1 = 0x%lx\n",devpriv->BADR1);
+       printk("devpriv->BADR2 = 0x%lx\n",devpriv->BADR2);
+       printk("devpriv->BADR3 = 0x%lx\n",devpriv->BADR3);
+       printk("devpriv->BADR4 = 0x%lx\n",devpriv->BADR4);
 #endif
 
 
@@ -290,7 +290,7 @@ found:
 //     // get irq
 //     if(comedi_request_irq(devpriv->pci_dev->irq, cb_pcimdas_interrupt, SA_SHIRQ, "cb_pcimdas", dev ))
 //     {
-//             printk(" unable to allocate irq %d\n", devpriv->pci_dev->irq);
+//             printk(" unable to allocate irq %u\n", devpriv->pci_dev->irq);
 //             return -EINVAL;
 //     }
 //     dev->irq = devpriv->pci_dev->irq;
@@ -331,8 +331,7 @@ found:
        s = dev->subdevices + 2;
        /* digital i/o subdevice */
        if(thisboard->has_dio){
-               subdev_8255_init(dev, s, NULL,
-                       (unsigned long)(devpriv->BADR4));
+               subdev_8255_init(dev, s, NULL, devpriv->BADR4);
        }else{
                s->type = COMEDI_SUBD_UNUSED;
        }
@@ -356,11 +355,11 @@ static int cb_pcimdas_detach(comedi_device *dev)
 #ifdef CBPCIMDAS_DEBUG
        if(devpriv)
        {
-               printk("devpriv->BADR0 = %d\n",devpriv->BADR0);
-               printk("devpriv->BADR1 = %d\n",devpriv->BADR1);
-               printk("devpriv->BADR2 = %d\n",devpriv->BADR2);
-               printk("devpriv->BADR3 = %d\n",devpriv->BADR3);
-               printk("devpriv->BADR4 = %d\n",devpriv->BADR4);
+               printk("devpriv->BADR0 = 0x%lx\n",devpriv->BADR0);
+               printk("devpriv->BADR1 = 0x%lx\n",devpriv->BADR1);
+               printk("devpriv->BADR2 = 0x%lx\n",devpriv->BADR2);
+               printk("devpriv->BADR3 = 0x%lx\n",devpriv->BADR3);
+               printk("devpriv->BADR4 = 0x%lx\n",devpriv->BADR4);
        }
 #endif
        printk("comedi%d: cb_pcimdas: remove\n",dev->minor);
index 8734345fd7c8d6ed7f68a8f4e2de01570c32eb6f..1ea66a6d9d025a8c09f8139d52ec3b9a314795ce 100644 (file)
@@ -157,8 +157,8 @@ MODULE_DEVICE_TABLE(pci, pci_table);
    several hardware drivers keep similar information in this structure,
    feel free to suggest moving the variable to the comedi_device struct.  */
 typedef struct {
-        int registers; /* set by probe */
-        int dio_registers;
+        unsigned long registers; /* set by probe */
+        unsigned long dio_registers;
         char  attached_to_8255; /* boolean */
         char  attached_successfully; /* boolean */
   /* would be useful for a PCI device */
@@ -302,8 +302,7 @@ static int attach(comedi_device *dev,comedi_devconfig *it)
         switch(thisboard->dio_method) {
         case DIO_8255:
            /* this is a straight 8255, so register us with the 8255 driver */
-            subdev_8255_init(dev, s, NULL,  
-                             (unsigned long)(devpriv->dio_registers));
+            subdev_8255_init(dev, s, NULL, devpriv->dio_registers);
             devpriv->attached_to_8255 = 1;
             break;
         case DIO_INTERNAL:
@@ -366,7 +365,7 @@ static int ao_winsn(comedi_device *dev, comedi_subdevice *s, comedi_insn *insn,
 {
    int i;
    int chan = CR_CHAN(insn->chanspec);
-   int offset = devpriv->registers + chan*2;
+   unsigned long offset = devpriv->registers + chan*2;
 
        /* Writing a list of values to an AO channel is probably not
         * very useful, but that's how the interface is defined. */
@@ -439,8 +438,9 @@ static int ao_rinsn(comedi_device *dev, comedi_subdevice *s, comedi_insn *insn,
  */
 static int probe(comedi_device *dev, const comedi_devconfig *it) 
 {
-    struct pci_dev *pcidev;
-       int index, registers;
+       struct pci_dev *pcidev;
+       int index;
+       unsigned long registers;
 
        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))
index e6cf461a81b27d541caf66e33e9d59121858e344..7c8c98144fa1884c3c173137e26fba5c1f40f352 100644 (file)
@@ -284,12 +284,12 @@ static irqreturn_t parport_interrupt(int irq,void *d,struct pt_regs *regs)
 static int parport_attach(comedi_device *dev,comedi_devconfig *it)
 {
        int ret;
-       int irq;
-       int iobase;
+       unsigned int irq;
+       unsigned long iobase;
        comedi_subdevice *s;
 
        iobase=it->options[0];
-       printk("comedi%d: parport: 0x%04x ",dev->minor,iobase);
+       printk("comedi%d: parport: 0x%04lx ",dev->minor,iobase);
        if(!request_region(iobase,PARPORT_SIZE,"parport (comedi)")){
                printk("I/O port conflict\n");
                return -EIO;
@@ -298,7 +298,7 @@ static int parport_attach(comedi_device *dev,comedi_devconfig *it)
 
        irq=it->options[1];
        if(irq){
-               printk(" irq=%d",irq);
+               printk(" irq=%u",irq);
                ret = comedi_request_irq(irq,parport_interrupt,0,
                        "comedi_parport",dev);
                if(ret<0){
index 8f7d2f3224f2b9080b3ebe74c32e6caa06faf085..10927c3ede1f7414de5b87d8f69068ef4ed684a6 100644 (file)
@@ -459,7 +459,7 @@ static void das08_pcmcia_config(dev_link_t *link)
        if (link->conf.Vpp1)
        printk(", Vpp %d.%d", link->conf.Vpp1/10, link->conf.Vpp1%10);
        if (link->conf.Attributes & CONF_ENABLE_IRQ)
-       printk(", irq %d", link->irq.AssignedIRQ);
+       printk(", irq %u", link->irq.AssignedIRQ);
        if (link->io.NumPorts1)
        printk(", io 0x%04x-0x%04x", link->io.BasePort1,
                        link->io.BasePort1+link->io.NumPorts1-1);
index 0b8de4cfc143388ec9d910d1081775e9054e5d8f..984feecd690d60278cc5a62522a51e0296ab1d25 100644 (file)
@@ -1384,9 +1384,10 @@ static int das1600_mode_detect(comedi_device *dev)
 static int das16_attach(comedi_device *dev, comedi_devconfig *it)
 {
        comedi_subdevice *s;
-       int ret, irq;
-       int iobase;
-       int dma_chan;
+       int ret;
+       unsigned int irq;
+       unsigned long iobase;
+       unsigned int dma_chan;
        int timer_mode;
        unsigned long flags;
        comedi_krange *user_ai_range, *user_ao_range;
@@ -1420,23 +1421,23 @@ static int das16_attach(comedi_device *dev, comedi_devconfig *it)
                return ret;
 
        if(thisboard->size<0x400){
-               printk(" 0x%04x-0x%04x\n", iobase, iobase+thisboard->size);
+               printk(" 0x%04lx-0x%04lx\n", iobase, iobase+thisboard->size);
                if(!request_region(iobase,thisboard->size,"das16")){
                        printk(" I/O port conflict\n");
                        return -EIO;
                }
        }else{
-               printk(" 0x%04x-0x%04x 0x%04x-0x%04x\n",
+               printk(" 0x%04lx-0x%04lx 0x%04lx-0x%04lx\n",
                           iobase,iobase+0x0f,
                           iobase+0x400,iobase+0x400+(thisboard->size&0x3ff));
                if(!request_region(iobase,0x10,"das16")){
-                       printk(" I/O port conflict:  0x%04x-0x%04x\n",
+                       printk(" I/O port conflict:  0x%04lx-0x%04lx\n",
                                   iobase,iobase+0x0f);
                        return -EIO;
                }
                if(!request_region(iobase+0x400,thisboard->size&0x3ff,"das16")){
                        release_region(iobase, 0x10);
-                       printk(" I/O port conflict:  0x%04x-0x%04x\n",
+                       printk(" I/O port conflict:  0x%04lx-0x%04lx\n",
                                   iobase+0x400,
                                   iobase+0x400+(thisboard->size&0x3ff));
                        return -EIO;
@@ -1471,7 +1472,7 @@ static int das16_attach(comedi_device *dev, comedi_devconfig *it)
                if((ret=comedi_request_irq(irq, das16_dma_interrupt, 0, "das16",dev)) < 0)
                        return ret;
                dev->irq = irq;
-               printk(" ( irq = %d )",irq);
+               printk(" ( irq = %u )",irq);
        }else if(irq == 0){
                printk(" ( no irq )");
        }else
@@ -1503,7 +1504,7 @@ static int das16_attach(comedi_device *dev, comedi_devconfig *it)
                disable_dma(devpriv->dma_chan);
                set_dma_mode(devpriv->dma_chan, DMA_MODE_READ);
                release_dma_lock(flags);
-               printk(" ( dma = %d)\n", dma_chan);
+               printk(" ( dma = %u)\n", dma_chan);
        }else if(dma_chan == 0){
                printk(" ( no dma )\n");
        }else
@@ -1634,7 +1635,7 @@ static int das16_attach(comedi_device *dev, comedi_devconfig *it)
        s = dev->subdevices + 4;
        /* 8255 */
        if(thisboard->i8255_offset!=0){
-               subdev_8255_init(dev,s,NULL,(unsigned long)(dev->iobase+
+               subdev_8255_init(dev,s,NULL,(dev->iobase+
                        thisboard->i8255_offset));
        }else{
                s->type = COMEDI_SUBD_UNUSED;
index 3472811a0c0840d72d52bac65a847170ee158e0e..1db001b5ff3d4ec8a03e0ceb26cc168f9d748539 100644 (file)
@@ -633,8 +633,9 @@ static int das16m1_irq_bits(unsigned int irq)
 static int das16m1_attach(comedi_device *dev, comedi_devconfig *it)
 {
        comedi_subdevice *s;
-       int ret, irq;
-       int iobase;
+       int ret;
+       unsigned int irq;
+       unsigned long iobase;
 
        iobase = it->options[0];
 
@@ -645,7 +646,7 @@ static int das16m1_attach(comedi_device *dev, comedi_devconfig *it)
 
        dev->board_name = thisboard->name;
 
-       printk(" io 0x%x-0x%x 0x%x-0x%x",
+       printk(" io 0x%lx-0x%lx 0x%lx-0x%lx",
                   iobase, iobase + DAS16M1_SIZE,
                   iobase + DAS16M1_82C55, iobase + DAS16M1_82C55 + DAS16M1_SIZE2);
        if(!request_region(iobase, DAS16M1_SIZE, driver_das16m1.driver_name)) {
@@ -672,7 +673,7 @@ static int das16m1_attach(comedi_device *dev, comedi_devconfig *it)
                        return ret;
                }
                dev->irq = irq;
-               printk(", irq %d\n", irq);
+               printk(", irq %u\n", irq);
        }else if(irq == 0){
                printk(", no irq\n");
        }else {
@@ -720,7 +721,7 @@ static int das16m1_attach(comedi_device *dev, comedi_devconfig *it)
 
        s = dev->subdevices + 3;
        /* 8255 */
-       subdev_8255_init(dev, s, NULL, (unsigned long)(dev->iobase + DAS16M1_82C55));
+       subdev_8255_init(dev, s, NULL, dev->iobase + DAS16M1_82C55);
 
        // disable upper half of hardware conversion counter so it doesn't mess with us
        outb(TOTAL_CLEAR, dev->iobase + DAS16M1_8254_FIRST_CNTRL);
index b799ab25dd04ddb15b68cfa259b442d08cb6f437..fd7e3d59d1c83b3a00616d8f45e6aa3b140bcf22 100644 (file)
@@ -468,7 +468,7 @@ typedef struct{
        uint16_t *ai_buf1;
        uint16_t *dma_current_buf;      /* pointer to dma buffer currently being used */
        unsigned int dma_transfer_size; /* size of transfer currently used, in bytes */
-       int iobase2;    /* secondary io address used for analog out on 'ao' boards */
+       unsigned long iobase2;  /* secondary io address used for analog out on 'ao' boards */
        short ao_update_bits; /* remembers the last write to the 'update' dac */
 }das1800_private;
 
@@ -586,11 +586,11 @@ static int das1800_init_dma( comedi_device *dev, unsigned int dma0, unsigned int
 static int das1800_attach(comedi_device *dev, comedi_devconfig *it)
 {
        comedi_subdevice *s;
-       int iobase = it->options[0];
-       int irq = it->options[1];
-       int dma0 = it->options[2];
-       int dma1 = it->options[3];
-       int iobase2;
+       unsigned long iobase = it->options[0];
+       unsigned int irq = it->options[1];
+       unsigned int dma0 = it->options[2];
+       unsigned int dma1 = it->options[3];
+       unsigned long iobase2;
        int board;
        int retval;
 
@@ -598,14 +598,14 @@ static int das1800_attach(comedi_device *dev, comedi_devconfig *it)
        if(alloc_private(dev, sizeof(das1800_private)) < 0)
                return -ENOMEM;
 
-       printk("comedi%d: %s: io 0x%x", dev->minor, driver_das1800.driver_name, iobase);
+       printk("comedi%d: %s: io 0x%lx", dev->minor, driver_das1800.driver_name, iobase);
        if(irq)
        {
-               printk(", irq %i", irq);
+               printk(", irq %u", irq);
                if(dma0)
                {
-                       printk(", dma %i", dma0);
-                       if(dma1) printk(" and %i", dma1);
+                       printk(", dma %u", dma0);
+                       if(dma1) printk(" and %u", dma1);
                }
        }
        printk("\n");
@@ -619,7 +619,7 @@ static int das1800_attach(comedi_device *dev, comedi_devconfig *it)
        /* check if io addresses are available */
        if(!request_region(iobase, DAS1800_SIZE, driver_das1800.driver_name))
        {
-               printk(" I/O port conflict: failed to allocate ports 0x%x to 0x%x\n",
+               printk(" I/O port conflict: failed to allocate ports 0x%lx to 0x%lx\n",
                        iobase, iobase + DAS1800_SIZE - 1);
                return -EIO;
        }
@@ -641,7 +641,7 @@ static int das1800_attach(comedi_device *dev, comedi_devconfig *it)
                iobase2 = iobase + IOBASE2;
                if(!request_region(iobase2, DAS1800_SIZE, driver_das1800.driver_name))
                {
-                       printk(" I/O port conflict: failed to allocate ports 0x%x to 0x%x\n",
+                       printk(" I/O port conflict: failed to allocate ports 0x%lx to 0x%lx\n",
                                iobase2, iobase2 + DAS1800_SIZE - 1);
                        return -EIO;
                }
@@ -653,7 +653,7 @@ static int das1800_attach(comedi_device *dev, comedi_devconfig *it)
        {
                if(comedi_request_irq( irq, das1800_interrupt, 0, driver_das1800.driver_name, dev ))
                {
-                       printk(" unable to allocate irq %d\n", irq);
+                       printk(" unable to allocate irq %u\n", irq);
                        return -EINVAL;
                }
        }
index d970615199e4c3f4308805fb5eb47c3fb87f9413..f2dc3da797cb9fe77c43ee79756be8505759df43 100644 (file)
@@ -299,8 +299,8 @@ static int das6402_detach(comedi_device *dev)
 
 static int das6402_attach(comedi_device *dev,comedi_devconfig *it)
 {
-       int irq;
-       int iobase;
+       unsigned int irq;
+       unsigned long iobase;
        int ret;
        comedi_subdevice *s;
 
@@ -320,7 +320,7 @@ static int das6402_attach(comedi_device *dev,comedi_devconfig *it)
        /* should do a probe here */
 
        irq=it->options[0];
-       printk(" ( irq = %d )", irq);
+       printk(" ( irq = %u )", irq);
        ret=comedi_request_irq(irq, intr_handler, 0, "das6402", dev);
        if(ret<0){
                printk("irq conflict\n");
index f1d83c4b4731941b28f082d653ead8af6e18af1c..61f49976418a14eb2258d9291cf36ba6c0a967b5 100644 (file)
@@ -454,15 +454,15 @@ static irqreturn_t das800_interrupt(int irq, void *d, struct pt_regs *regs)
 static int das800_attach(comedi_device *dev, comedi_devconfig *it)
 {
        comedi_subdevice *s;
-       int iobase = it->options[0];
-       int irq = it->options[1];
+       unsigned long iobase = it->options[0];
+       unsigned int irq = it->options[1];
        unsigned long irq_flags;
        int board;
 
-       printk("comedi%d: das800: io 0x%x", dev->minor, iobase);
+       printk("comedi%d: das800: io 0x%lx", dev->minor, iobase);
        if(irq)
        {
-               printk(", irq %i", irq);
+               printk(", irq %u", irq);
        }
        printk("\n");
 
@@ -493,7 +493,7 @@ static int das800_attach(comedi_device *dev, comedi_devconfig *it)
        dev->board_ptr = das800_boards + board;
 
        /* grab our IRQ */
-       if(irq == 1 || irq > 7 || irq < 0)
+       if(irq == 1 || irq > 7)
        {
                printk("irq out of range\n");
                return -EINVAL;
@@ -502,7 +502,7 @@ static int das800_attach(comedi_device *dev, comedi_devconfig *it)
        {
                if(comedi_request_irq( irq, das800_interrupt, 0, "das800", dev ))
                {
-                       printk( "unable to allocate irq %d\n", irq);
+                       printk( "unable to allocate irq %u\n", irq);
                        return -EINVAL;
                }
        }
index eeea7072be0e5fe2baba039151ce3fdc4fd643e9..3f750faed39cfa89811b3f35075ffccc20b14abb 100644 (file)
@@ -486,7 +486,7 @@ static comedi_lrange *ai_range_lkup(int type,int opt)
 static int dt2801_attach(comedi_device *dev,comedi_devconfig *it)
 {
        comedi_subdevice *s;
-       int iobase;
+       unsigned long iobase;
        int board_code,type;
        int ret=0;
        int n_ai_chans;
@@ -514,7 +514,7 @@ static int dt2801_attach(comedi_device *dev,comedi_devconfig *it)
 
 havetype:
        dev->board_ptr = boardtypes+type;
-       printk("dt2801: %s at port 0x%x",boardtype.name,iobase);
+       printk("dt2801: %s at port 0x%lx",boardtype.name,iobase);
 
        n_ai_chans=probe_number_of_ai_chans(dev);
        printk(" (ai channels = %d)",n_ai_chans);
index 494e0d4b77af7a3727958ea0f0fea143060acab4..91db38bd06fb4c2baac7309310131ff6d6f92c3c 100644 (file)
@@ -297,15 +297,16 @@ static void dt2811_interrupt(int irq, void *d, struct pt_regs *regs)
 
 static int dt2811_attach(comedi_device * dev, comedi_devconfig * it)
 {
-       //int i, irq, irqs;
+       //int i, irq;
+       //unsigned long irqs;
        //long flags;
        int ret;
        comedi_subdevice *s;
-       int iobase;
+       unsigned long iobase;
 
        iobase = it->options[0];
 
-       printk("comedi%d: dt2811: base=0x%04x\n", dev->minor, iobase);
+       printk("comedi%d: dt2811: base=0x%04lx\n", dev->minor, iobase);
 
        if (!request_region(iobase, DT2811_SIZE, driver_name)) {
                printk("I/O port conflict\n");
index eea183653f35a38c02de83cfbbc875a919442b50..30f8a671b5427fc006e3a07e710d4615db29262b 100644 (file)
@@ -237,10 +237,10 @@ static int dt2814_attach(comedi_device *dev,comedi_devconfig *it)
        int i,irq;
        int ret;
        comedi_subdevice *s;
-       int iobase;
+       unsigned long iobase;
 
        iobase=it->options[0];
-       printk("comedi%d: dt2814: 0x%04lx ",dev->minor,dev->iobase);
+       printk("comedi%d: dt2814: 0x%04lx ",dev->minor,iobase);
        if(!request_region(iobase,DT2814_SIZE,"dt2814")){
                printk("I/O port conflict\n");
                return -EIO;
@@ -286,7 +286,11 @@ static int dt2814_attach(comedi_device *dev,comedi_devconfig *it)
        }else if(irq==0){
                printk("(no irq)\n");
        }else{
+#if 0
                printk("(probe returned multiple irqs--bad)\n");
+#else
+               printk("(irq probe not implemented)\n");
+#endif
        }
 
        if((ret=alloc_subdevices(dev, 1))<0)
index aafe13de27804bcc2b807dc9b1ba19591ab931c1..a8e6160240fcda01ce72cf417fcdaeba8844444d 100644 (file)
@@ -178,10 +178,10 @@ static int dt2815_attach(comedi_device * dev, comedi_devconfig * it)
   comedi_subdevice *s;
   int i;
   comedi_lrange *current_range_type, *voltage_range_type;
-  int iobase;
+  unsigned long iobase;
 
   iobase = it->options[0];
-  printk("comedi%d: dt2815: 0x%04x ", dev->minor, iobase);
+  printk("comedi%d: dt2815: 0x%04lx ", dev->minor, iobase);
   if (!request_region(iobase, DT2815_SIZE, "dt2815")) {
     printk("I/O port conflict\n");
     return -EIO;
index 9a86a62b665e851e91de61a7340a8fa676af0377..882938c468ea852cb4b614aa8728fa53d9dbf1c8 100644 (file)
@@ -127,10 +127,10 @@ static int dt2817_attach(comedi_device *dev,comedi_devconfig *it)
 {
        int ret;
        comedi_subdevice *s;
-       int iobase;
+       unsigned long iobase;
 
        iobase=it->options[0];
-       printk("comedi%d: dt2817: 0x%04x ",dev->minor,iobase);
+       printk("comedi%d: dt2817: 0x%04lx ",dev->minor,iobase);
        if(!request_region(iobase,DT2817_SIZE,"dt2817")){
                printk("I/O port conflict\n");
                return -EIO;
index 714a8f4645cb2da28a4e1b58fac45f896d9f68e2..07679cbbda0629bd4a341271438a38fe7b6f7c28 100644 (file)
@@ -1210,14 +1210,14 @@ static int dt282x_attach(comedi_device * dev, comedi_devconfig * it)
        int i, irq;
        int ret;
        comedi_subdevice *s;
-       int iobase;
+       unsigned long iobase;
 
        dev->board_name = this_board->name;
 
        iobase = it->options[opt_iobase];
        if(!iobase)iobase = 0x240;
 
-       printk("comedi%d: dt282x: 0x%04x", dev->minor, iobase);
+       printk("comedi%d: dt282x: 0x%04lx", dev->minor, iobase);
        if (!request_region(iobase, DT2821_SIZE, "dt282x")) {
                printk(" I/O port conflict\n");
                return -EBUSY;
@@ -1283,7 +1283,11 @@ static int dt282x_attach(comedi_device * dev, comedi_devconfig * it)
        } else if (irq == 0) {
                printk(" (no irq)");
        } else {
+#if 0
                printk(" (probe returned multiple irqs--bad)");
+#else
+               printk(" (irq probe not implemented)");
+#endif
        }
 
        if((ret=alloc_private(dev,sizeof(dt282x_private)))<0)
index 93cdb1d2e0e9b62000ead2dada5de0d25dca74ca..d45752a2cd841257d0796916e9e89d2adda6bb70 100644 (file)
@@ -253,7 +253,7 @@ MODULE_DEVICE_TABLE(pci, dt3k_pci_table);
 
 typedef struct{
        struct pci_dev *pci_dev;
-       unsigned long phys_addr;
+       resource_size_t phys_addr;
        void *io_addr;
        unsigned int lock;
        lsampl_t ao_readback[2];
@@ -785,7 +785,7 @@ static int dt3000_attach(comedi_device *dev,comedi_devconfig *it)
 
        if(comedi_request_irq(devpriv->pci_dev->irq, dt3k_interrupt,
                        SA_SHIRQ, "dt3000", dev)){
-               printk(" unable to allocate IRQ %d\n", devpriv->pci_dev->irq);
+               printk(" unable to allocate IRQ %u\n", devpriv->pci_dev->irq);
                return -EINVAL;
        }
        dev->irq = devpriv->pci_dev->irq;
@@ -895,7 +895,7 @@ static int dt_pci_probe(comedi_device *dev)
 
 static int setup_pci(comedi_device *dev)
 {
-       u32                     addr;
+       resource_size_t addr;
        int ret;
 
        ret = pci_enable_device(devpriv->pci_dev);
@@ -909,7 +909,7 @@ static int setup_pci(comedi_device *dev)
        devpriv->io_addr = ioremap(devpriv->phys_addr, DT3000_SIZE);
        if(!devpriv->io_addr) return -ENOMEM;
 #if DEBUG
-       printk("0x%08lx mapped to %p, ",devpriv->phys_addr,devpriv->io_addr);
+       printk("0x%08llx mapped to %p, ",(unsigned long long)devpriv->phys_addr,devpriv->io_addr);
 #endif
 
        return 0;
index a9555f4a2d95171e454bbc91350235f894676254..831f375edffddd7cea092c3e022626b4d2ac7f5b 100644 (file)
@@ -75,7 +75,7 @@ static int fl512_ai_insn(comedi_device *dev,
   int n;
   unsigned int lo_byte, hi_byte;
   char chan = CR_CHAN(insn->chanspec);
-  int iobase = dev->iobase;
+  unsigned long iobase = dev->iobase;
 
   for(n=0; n<insn->n; n++) {          /* sample n times on selected channel */
     /* XXX probably can move next step out of for() loop -- will make
@@ -101,7 +101,7 @@ static int fl512_ao_insn(comedi_device *dev,
 {
   int n;
   int chan = CR_CHAN(insn->chanspec);                  /* get chan to write */
-  int iobase = dev->iobase;                             /* get base address  */
+  unsigned long iobase = dev->iobase;                  /* get base address  */
 
   for (n=0; n<insn->n; n++) {                            /* write n data set */
     outb(data[n] & 0x0ff, iobase+4+2*chan);            /* write low byte   */
@@ -137,12 +137,12 @@ static int fl512_ao_insn_readback(comedi_device *dev,
  */
 static int fl512_attach(comedi_device *dev,comedi_devconfig *it)
 {
-  int iobase;
+  unsigned long iobase;
   comedi_subdevice *s;      /* pointer to the subdevice:
           Analog in, Analog out, ( not made ->and Digital IO) */
 
   iobase = it->options[0];
-  printk("comedi:%d fl512: 0x%04x",dev->minor,iobase);
+  printk("comedi:%d fl512: 0x%04lx",dev->minor,iobase);
   if (!request_region(iobase, FL512_SIZE, "fl512")) {
     printk(" I/O port conflict\n");
     return -EIO;
index 0f94881326be0a1d943b3113047b7270376584fd..09ba92c6e5ff6c7a588c0394ef76fc3175da891a 100644 (file)
@@ -306,8 +306,8 @@ typedef struct
 {
        struct pci_dev *hw_dev; // pointer to board's pci_dev struct
        // base addresses (physical)
-       unsigned long plx9080_phys_iobase;
-       unsigned long hpdi_phys_iobase;
+       resource_size_t plx9080_phys_iobase;
+       resource_size_t hpdi_phys_iobase;
        // base addresses (ioremapped)
        void *plx9080_iobase;
        void *hpdi_iobase;
@@ -606,19 +606,19 @@ static int hpdi_attach(comedi_device *dev, comedi_devconfig *it)
                return -ENOMEM;
        }
 
-       DEBUG_PRINT(" plx9080 remapped to 0x%lx\n", priv(dev)->plx9080_iobase);
-       DEBUG_PRINT(" hpdi remapped to 0x%lx\n", priv(dev)->hpdi_iobase);
+       DEBUG_PRINT(" plx9080 remapped to 0x%p\n", priv(dev)->plx9080_iobase);
+       DEBUG_PRINT(" hpdi remapped to 0x%p\n", priv(dev)->hpdi_iobase);
 
        // get irq
        if( comedi_request_irq( pcidev->irq, handle_interrupt, SA_SHIRQ, driver_hpdi.driver_name,
                 dev ) )
        {
-               printk( " unable to allocate irq %d\n", pcidev->irq );
+               printk( " unable to allocate irq %u\n", pcidev->irq );
                return -EINVAL;
        }
        dev->irq = pcidev->irq;
 
-       printk(" irq %i\n", dev->irq);
+       printk(" irq %u\n", dev->irq);
 
        init_plx9080(dev);
 
index 2037642069244d9558cdb30529ee9d4a982d761a..aa91014aef02cc2e64d61512744d4cd84d6d430f 100644 (file)
@@ -194,7 +194,7 @@ typedef struct{
        struct pcilst_struct    *card;                  // pointer to card
        char                    valid;                  // card is usable
        void                    *io_addr;               // Pointer to mapped io address
-       unsigned long           phys_iobase;            // Physical io address
+       resource_size_t         phys_iobase;            // Physical io address
        unsigned int            AdcCmdStatus;           // ADC Command/Status register
        unsigned int            DacCmdStatus;           // DAC Command/Status register
        unsigned int            IntEnable;              // Interrupt Enable register
@@ -862,9 +862,10 @@ static int icp_multi_attach(comedi_device *dev,comedi_devconfig *it)
 {
        comedi_subdevice        *s;
        int ret, subdev, n_subdevices;
-       unsigned short          master,irq;
+       unsigned short          master;
+       unsigned int            irq;
        struct pcilst_struct    *card=NULL;
-        unsigned long          io_addr[5], iobase;
+        resource_size_t                io_addr[5], iobase;
        unsigned char           pci_bus, pci_slot, pci_func;
 
        printk("icp_multi EDBG: BGN: icp_multi_attach(...)\n");
@@ -899,7 +900,8 @@ static int icp_multi_attach(comedi_device *dev,comedi_devconfig *it)
        iobase=io_addr[2];
        devpriv->phys_iobase = iobase;
 
-       printk(", b:s:f=%d:%d:%d, io=0x%8lx \n", pci_bus, pci_slot, pci_func, iobase);
+       printk(", b:s:f=%d:%d:%d, io=0x%8llx \n", pci_bus, pci_slot, pci_func,
+                       (unsigned long long)iobase);
 
        devpriv->io_addr = ioremap(iobase, ICP_MULTI_SIZE);
 
@@ -909,7 +911,7 @@ static int icp_multi_attach(comedi_device *dev,comedi_devconfig *it)
        }
 
 #ifdef ICP_MULTI_EXTDEBUG
-       printk("0x%08lx mapped to %p, ", iobase, devpriv->io_addr);
+       printk("0x%08llx mapped to %p, ", (unsigned long long)iobase, devpriv->io_addr);
 #endif
 
        dev->board_name = this_board->name;
@@ -928,11 +930,11 @@ static int icp_multi_attach(comedi_device *dev,comedi_devconfig *it)
        if (this_board->have_irq) {
                if (irq)  {
                        if (comedi_request_irq(irq, interrupt_service_icp_multi, SA_SHIRQ, "Inova Icp Multi", dev)) {
-                               printk(", unable to allocate IRQ %d, DISABLING IT", irq);
+                               printk(", unable to allocate IRQ %u, DISABLING IT", irq);
                                irq=0; /* Can't use IRQ */
                        }
                        else
-                               printk(", irq=%d", irq);
+                               printk(", irq=%u", irq);
                }
                else
                        printk(", IRQ disabled");
index 6086da96cc1350c8fff0e9940246f3a666955135..0472b15ff62b332f7a893a43af884c6827102841 100644 (file)
@@ -27,7 +27,7 @@ struct pcilst_struct{
        unsigned char   pci_bus;
        unsigned char   pci_slot;
        unsigned char   pci_func;
-       unsigned long   io_addr[5];
+       resource_size_t io_addr[5];
        unsigned int    irq;
 };
 
@@ -46,7 +46,7 @@ static int pci_card_free(struct pcilst_struct *amcc);
 static void pci_card_list_display(void);
 static int pci_card_data(struct pcilst_struct *amcc,
        unsigned char *pci_bus, unsigned char *pci_slot, unsigned char *pci_func,
-       unsigned long *io_addr, unsigned short *irq, unsigned short *master);
+       resource_size_t *io_addr, unsigned int *irq, unsigned short *master);
 
 /****************************************************************************/
 
@@ -197,9 +197,9 @@ static void pci_card_list_display(void)
 
        for (inova=inova_devices; inova; inova=next) {
                next=inova->next;
-               printk("%2d   %2d   %2d  0x%4x 0x%4x   %3s   0x%8lx 0x%8lx  %2d  %2d\n",
+               printk("%2d   %2d   %2d  0x%4x 0x%4x   %3s   0x%8llx 0x%8llx  %2u  %2d\n",
                        inova->pci_bus,inova->pci_slot,inova->pci_func,inova->vendor,inova->device,inova->master?"yes":"no",
-                       inova->io_addr[0],inova->io_addr[2],inova->irq,inova->used);
+                       (unsigned long long)inova->io_addr[0],(unsigned long long)inova->io_addr[2],inova->irq,inova->used);
                
        }
 }
@@ -208,7 +208,7 @@ static void pci_card_list_display(void)
 /* return all card information for driver */
 static int pci_card_data(struct pcilst_struct *inova,
        unsigned char *pci_bus, unsigned char *pci_slot, unsigned char *pci_func,
-       unsigned long *io_addr, unsigned short *irq, unsigned short *master)
+       resource_size_t *io_addr, unsigned int *irq, unsigned short *master)
 {
        int     i;
        
index 47aa95d358f990868cb3de1f967737a5e31cd210..f8c7a8e8d05dd44cfe16cf15fb485a9e3b6007b7 100644 (file)
@@ -145,7 +145,7 @@ static int cnt_attach(comedi_device *dev, comedi_devconfig *it)
   comedi_subdevice *subdevice;
   struct pci_dev   *pci_device;
   cnt_board_struct *board;
-  int              io_base;
+  unsigned long    io_base;
   int              error, i;
 
        /* allocate device private structure */
@@ -206,7 +206,7 @@ found:
 
   /* read register base address [PCI_BASE_ADDRESS #0] */
   io_base = pci_resource_start(pci_device, 0);
-  dev->iobase = io_base & PCI_BASE_ADDRESS_IO_MASK;
+  dev->iobase = io_base;
 
   /* allocate the subdevice structures */
   if((error = alloc_subdevices(dev, 1)) < 0)
index 2b66e0b6f3c8d041650d7ece19eba8fc594af63a..fc6aba45d03eb6d9bd4c071a65f4e981cfb13bca 100644 (file)
@@ -449,7 +449,7 @@ typedef struct me4000_info {
 
     struct pci_dev *pci_dev_p;                 // General PCI information
 
-    char irq;                                  // IRQ assigned from the PCI BIOS
+    unsigned int irq;                          // IRQ assigned from the PCI BIOS
 
     struct me4000_ai_context ai_context;       // Analog input  specific context
     struct me4000_ao_context ao_context[4];    // Vector with analog output specific context
index b841a71e9b93c39da1b6dfe05ab3570a3e79ffae..195971cd2cf2a8f7d49d6186c43d0286e22c64a6 100644 (file)
@@ -270,8 +270,8 @@ typedef struct
   struct pci_dev* pci_device;
   void *plx_regbase;         // PLX configuration base address
   void *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
+  unsigned long plx_regbase_size;   // Size of PLX configuration space
+  unsigned long me_regbase_size;    // Size of Meilhaus space
 
   unsigned short control_1;         // Mirror of CONTROL_1 register
   unsigned short control_2;         // Mirror of CONTROL_2 register
@@ -679,13 +679,13 @@ static int me_attach(comedi_device *dev,comedi_devconfig *it)
   struct pci_dev* pci_device;
   comedi_subdevice *subdevice;
   me_board_struct* board;
-  unsigned int plx_regbase_tmp;
-  unsigned int plx_regbase_size_tmp;
-  unsigned int me_regbase_tmp;
-  unsigned int me_regbase_size_tmp;
-  unsigned int swap_regbase_tmp;
-  unsigned int swap_regbase_size_tmp;
-  unsigned int regbase_tmp;
+  resource_size_t plx_regbase_tmp;
+  unsigned long plx_regbase_size_tmp;
+  resource_size_t me_regbase_tmp;
+  unsigned long me_regbase_size_tmp;
+  resource_size_t swap_regbase_tmp;
+  unsigned long swap_regbase_size_tmp;
+  resource_size_t regbase_tmp;
   int result, error, i;
 
   // Allocate private memory
@@ -757,7 +757,7 @@ found:
   // Read PLX register base address [PCI_BASE_ADDRESS #0].
 
   plx_regbase_tmp = pci_resource_start(pci_device, 0);
-  plx_regbase_size_tmp = pci_resource_end(pci_device, 0) - plx_regbase_tmp + 1;
+  plx_regbase_size_tmp = pci_resource_len(pci_device, 0);
   dev_private->plx_regbase = ioremap(plx_regbase_tmp, plx_regbase_size_tmp);
   dev_private->plx_regbase_size = plx_regbase_size_tmp;
   if(!dev_private->plx_regbase)
@@ -769,7 +769,7 @@ found:
   // Read Swap base address [PCI_BASE_ADDRESS #5].
 
   swap_regbase_tmp = pci_resource_start(pci_device, 5);
-  swap_regbase_size_tmp = pci_resource_end(pci_device, 5) - swap_regbase_tmp + 1;
+  swap_regbase_size_tmp = pci_resource_len(pci_device, 5);
 
   if(!swap_regbase_tmp)
   {
@@ -809,7 +809,7 @@ found:
   // Read Meilhaus register base address [PCI_BASE_ADDRESS #2].
 
   me_regbase_tmp = pci_resource_start(pci_device, 2);
-  me_regbase_size_tmp = pci_resource_end(pci_device, 2) - me_regbase_tmp + 1;
+  me_regbase_size_tmp = pci_resource_len(pci_device, 2);
   dev_private->me_regbase_size = me_regbase_size_tmp;
   dev_private->me_regbase = ioremap(me_regbase_tmp, me_regbase_size_tmp);
   if(!dev_private->me_regbase)
index 500e6484dd3c289eb82f948ad647f541319bfadb..834ff7152160be3ad5ef69a2cc48649dbe5bafc8 100644 (file)
@@ -105,7 +105,7 @@ static void dump_chip_signature(u32 csigr_bits)
 int mite_setup(struct mite_struct *mite)
 {
        unsigned long length;
-       u32 addr;
+       resource_size_t addr;
        int i;
        u32 csigr_bits;
        
@@ -126,7 +126,7 @@ int mite_setup(struct mite_struct *mite)
                printk("failed to remap mite io memory address\n");
                return -ENOMEM;
        }
-       printk("MITE:0x%08lx mapped to %p ",mite->mite_phys_addr,mite->mite_io_addr);
+       printk("MITE:0x%08llx mapped to %p ",(unsigned long long)mite->mite_phys_addr,mite->mite_io_addr);
 
        addr=pci_resource_start(mite->pcidev, 1);
        mite->daq_phys_addr=addr;
@@ -142,7 +142,7 @@ int mite_setup(struct mite_struct *mite)
                printk("failed to remap daq io memory address\n");
                return -ENOMEM;
        }
-       printk("DAQ:0x%08lx mapped to %p\n",mite->daq_phys_addr,mite->daq_io_addr);
+       printk("DAQ:0x%08llx mapped to %p\n",(unsigned long long)mite->daq_phys_addr,mite->daq_io_addr);
 
        // The 6602 board needs different initalisation, see the
        // _updated_ (nov 2002) reg. Level Manual (filename 370505b.pdf) p. 3.55
index 44cfe44c3d917e312b9291714f4520876f877bc7..db7759a07b1a4598f93451d398df465477704956 100644 (file)
@@ -63,9 +63,9 @@ struct mite_struct{
        int used;
 
        struct pci_dev *pcidev;
-       unsigned long mite_phys_addr;
+       resource_size_t mite_phys_addr;
        void *mite_io_addr;
-       unsigned long daq_phys_addr;
+       resource_size_t daq_phys_addr;
        void *daq_io_addr;
 
        struct mite_channel channels[MAX_MITE_DMA_CHANNELS];
index 0f28f6b10b17a8f970a4f1fb349e7cc210453bd0..b21e67d6e9d2fbb1d961a91ebfd4a3b742b68023 100644 (file)
@@ -163,10 +163,10 @@ static int mpc624_ai_rinsn(comedi_device *dev, comedi_subdevice *s, comedi_insn
 static int mpc624_attach(comedi_device *dev, comedi_devconfig *it)
 {
        comedi_subdevice *s;
-    int iobase;
+    unsigned long iobase;
 
     iobase = it->options[0];
-       rt_printk("comedi%d: mpc624 [0x%04x, ", dev->minor, iobase);
+       rt_printk("comedi%d: mpc624 [0x%04lx, ", dev->minor, iobase);
     if(request_region(iobase, MPC624_SIZE, "mpc624") == NULL)
     {
         rt_printk("I/O port(s) in use\n");
index a8beb7b117f99434e03d6906284021e19f1c1777..6f326147ff4522007d35e91a5562b213326a80b9 100644 (file)
@@ -231,12 +231,12 @@ static void encoder_reset(comedi_device *dev) {
 static int multiq3_attach(comedi_device * dev, comedi_devconfig * it)
 {
   int result = 0;
-  int iobase;
-      int irq;
+  unsigned long iobase;
+      unsigned int irq;
       comedi_subdevice *s;
 
     iobase = it->options[0];
-    printk("comedi%d: multiq3: 0x%04x ", dev->minor, iobase);
+    printk("comedi%d: multiq3: 0x%04lx ", dev->minor, iobase);
     if (!request_region(iobase, MULTIQ3_SIZE, "multiq3")) {
       printk("comedi%d: I/O port conflict\n", dev->minor);
       return -EIO;
@@ -245,9 +245,9 @@ static int multiq3_attach(comedi_device * dev, comedi_devconfig * it)
       dev->iobase = iobase;
 
       irq = it->options[1];
-      if (irq > 0) {
-       printk("comedi%d: irq = %d ignored\n", dev->minor, irq);
-      } else if(irq == 0) {
+      if (irq) {
+       printk("comedi%d: irq = %u ignored\n", dev->minor, irq);
+      } else {
        printk("comedi%d: no irq\n", dev->minor);
       }
       dev->board_name = "multiq3";
index 95e12c158a90b812b55c80e85aeba8d2f6045b04..23776be3c4a4a056d65d87caea3a91df05841f4e 100644 (file)
@@ -331,23 +331,23 @@ static int a2150_probe(comedi_device *dev)
 static int a2150_attach(comedi_device *dev, comedi_devconfig *it)
 {
        comedi_subdevice *s;
-       int iobase = it->options[0];
-       int irq = it->options[1];
-       int dma = it->options[2];
+       unsigned long iobase = it->options[0];
+       unsigned int irq = it->options[1];
+       unsigned int dma = it->options[2];
        static const int timeout = 2000;
        int i;
 
-       printk("comedi%d: %s: io 0x%x", dev->minor, driver_a2150.driver_name, iobase);
+       printk("comedi%d: %s: io 0x%lx", dev->minor, driver_a2150.driver_name, iobase);
        if(irq)
        {
-               printk(", irq %i", irq);
+               printk(", irq %u", irq);
        }else
        {
                printk(", no irq");
        }
        if(dma)
        {
-               printk(", dma %i", dma);
+               printk(", dma %u", dma);
        }else
        {
                printk(", no dma");
@@ -378,12 +378,12 @@ static int a2150_attach(comedi_device *dev, comedi_devconfig *it)
                // check that irq is supported
                if(irq < 3 || irq == 8 || irq == 13 || irq > 15)
                {
-                       printk(" invalid irq line\n");
+                       printk(" invalid irq line %u\n", irq);
                        return -EINVAL;
                }
                if(comedi_request_irq( irq, a2150_interrupt, 0, driver_a2150.driver_name, dev ))
                {
-                       printk( "unable to allocate irq %d\n", irq);
+                       printk( "unable to allocate irq %u\n", irq);
                        return -EINVAL;
                }
                devpriv->irq_dma_bits |= IRQ_LVL_BITS(irq);
@@ -393,14 +393,14 @@ static int a2150_attach(comedi_device *dev, comedi_devconfig *it)
        // initialize dma
        if(dma)
        {
-               if(dma < 0 || dma == 4 || dma > 7)
+               if(dma == 4 || dma > 7)
                {
-                       printk(" invalid dma channel %i\n", dma);
+                       printk(" invalid dma channel %u\n", dma);
                        return -EINVAL;
                }
                if(request_dma(dma, driver_a2150.driver_name))
                {
-                       printk(" failed to allocate dma channel %i\n", dma);
+                       printk(" failed to allocate dma channel %u\n", dma);
                        return -EINVAL;
                }
                devpriv->dma = dma;
index fdcb870e550ce41e9b6975f7266af425b2096b32..55f84148804c28dab2a10910bff82935a3bbc999 100644 (file)
@@ -395,9 +395,9 @@ static int ni_atmio_attach(comedi_device *dev,comedi_devconfig *it)
 {
        struct pnp_dev *isapnp_dev;
        int             ret;
-       int             iobase;
+       unsigned long   iobase;
        int             board;
-       int             irq;
+       unsigned int    irq;
 
        /* allocate private area */
        if((ret = ni_alloc_private(dev)) < 0)
@@ -421,7 +421,7 @@ static int ni_atmio_attach(comedi_device *dev,comedi_devconfig *it)
 
        /* reserve our I/O region */
 
-       printk("comedi%d: ni_atmio: 0x%04x",dev->minor,iobase);
+       printk("comedi%d: ni_atmio: 0x%04lx",dev->minor,iobase);
        if(!request_region(iobase,NI_SIZE,"ni_atmio")){
                printk(" I/O port conflict\n");
                return -EIO;
@@ -454,11 +454,11 @@ static int ni_atmio_attach(comedi_device *dev,comedi_devconfig *it)
        /* irq stuff */
 
        if(irq!=0){
-               if(irq<0 || irq>15 || ni_irqpin[irq]==-1){
-                       printk(" invalid irq\n");
+               if(irq>15 || ni_irqpin[irq]==-1){
+                       printk(" invalid irq %u\n",irq);
                        return -EINVAL;
                }
-               printk(" ( irq = %d )",irq);
+               printk(" ( irq = %u )",irq);
                if( (ret=comedi_request_irq(irq,ni_E_interrupt,NI_E_IRQ_FLAGS,"ni_atmio",dev))<0 ){
                        printk(" irq not available\n");
                        return -EINVAL;
index 0dd3fc95cb968607aebf890febd008c043f3197f..cb22c190ea119679faf183427eee827527b41964 100644 (file)
@@ -697,15 +697,15 @@ static int atmio16d_dio_insn_config(comedi_device *dev, comedi_subdevice *s,
 
 static int atmio16d_attach(comedi_device * dev, comedi_devconfig * it)
 {
-       int irq;
-       int iobase;
+       unsigned int irq;
+       unsigned long iobase;
        int ret;
        
        comedi_subdevice *s;
 
        /* make sure the address range is free and allocate it */
        iobase = it->options[0];
-       printk("comedi%d: atmio16d: 0x%04x ", dev->minor, iobase);
+       printk("comedi%d: atmio16d: 0x%04lx ", dev->minor, iobase);
        if (!request_region(iobase, ATMIO16D_SIZE, "ni_atmio16d")) {
                printk("I/O port conflict\n");
                return -EIO;
@@ -727,16 +727,16 @@ static int atmio16d_attach(comedi_device * dev, comedi_devconfig * it)
        
        /* check if our interrupt is available and get it */
        irq=it->options[1];
-       if(irq>0){
+       if(irq){
                if((ret=comedi_request_irq(irq,atmio16d_interrupt,
                        0, "atmio16d", dev))<0)
                {
-                       printk("failed to allocate irq %d\n", irq); 
+                       printk("failed to allocate irq %u\n", irq); 
                        return ret;
                }
                dev->irq=irq;
-               printk("( irq = %d )\n",irq);
-       } else if(irq == 0){
+               printk("( irq = %u )\n",irq);
+       } else {
                printk("( no irq )");
        }
 
@@ -819,7 +819,7 @@ static int atmio16d_attach(comedi_device * dev, comedi_devconfig * it)
        /* 8255 subdevice */
        s++;
        if(boardtype->has_8255){
-               subdev_8255_init(dev,s,NULL,(unsigned long)dev->iobase);
+               subdev_8255_init(dev,s,NULL,dev->iobase);
        }else{
                s->type=COMEDI_SUBD_UNUSED;
        }
index 46dabf0532d2bcc67ed86f9cfe025423f637a765..1e480983d5857267b6a2a58e22180d16a1ca27dc 100644 (file)
@@ -123,9 +123,9 @@ static comedi_driver driver_dio24={
 static int dio24_attach(comedi_device *dev, comedi_devconfig *it)
 {
        comedi_subdevice *s;
-       int iobase = 0;
+       unsigned long iobase = 0;
 #ifdef incomplete
-       int irq = 0;
+       unsigned int irq = 0;
 #endif
        dev_link_t *link;
 
@@ -149,11 +149,11 @@ static int dio24_attach(comedi_device *dev, comedi_devconfig *it)
                        return -EINVAL;
                        break;
        }
-       printk("comedi%d: ni_daq_dio24: %s, io 0x%x", dev->minor, thisboard->name, iobase);
+       printk("comedi%d: ni_daq_dio24: %s, io 0x%lx", dev->minor, thisboard->name, iobase);
 #ifdef incomplete
        if(irq)
        {
-               printk(", irq %i", irq);
+               printk(", irq %u", irq);
        }
 #endif
 
@@ -169,11 +169,6 @@ static int dio24_attach(comedi_device *dev, comedi_devconfig *it)
 
 #ifdef incomplete
        /* grab our IRQ */
-       if(irq < 0)
-       {
-               printk("irq out of range\n");
-               return -EINVAL;
-       }
        dev->irq = irq;
 #endif
 
index 494807bc382268effb61e5c3ef73e1173f16db04..d610724082aea07f7288e3f279d862ce88fc7449 100644 (file)
@@ -466,7 +466,7 @@ static inline int labpc_counter_load(comedi_device *dev, unsigned long base_addr
 }
 
 int labpc_common_attach( comedi_device *dev, unsigned long iobase,
-       int irq, int dma_chan )
+       unsigned int irq, unsigned int dma_chan )
 {
        comedi_subdevice *s;
        int i;
@@ -476,11 +476,11 @@ int labpc_common_attach( comedi_device *dev, unsigned long iobase,
        printk("comedi%d: ni_labpc: %s, io 0x%lx", dev->minor, thisboard->name, iobase);
        if(irq)
        {
-               printk(", irq %i", irq);
+               printk(", irq %u", irq);
        }
        if(dma_chan)
        {
-               printk(", dma %i", dma_chan);
+               printk(", dma %u", dma_chan);
        }
        printk("\n");
 
@@ -523,11 +523,6 @@ int labpc_common_attach( comedi_device *dev, unsigned long iobase,
        }
 
        /* grab our IRQ */
-       if(irq < 0)
-       {
-               printk("irq out of range\n");
-               return -EINVAL;
-       }
        if(irq)
        {
                isr_flags = 0;
@@ -535,16 +530,16 @@ int labpc_common_attach( comedi_device *dev, unsigned long iobase,
                        isr_flags |= SA_SHIRQ;
                if(comedi_request_irq( irq, labpc_interrupt, isr_flags, driver_labpc.driver_name, dev))
                {
-                       printk( "unable to allocate irq %d\n", irq);
+                       printk( "unable to allocate irq %u\n", irq);
                        return -EINVAL;
                }
        }
        dev->irq = irq;
 
        // grab dma channel
-       if(dma_chan < 0 || dma_chan > 3)
+       if(dma_chan > 3)
        {
-               printk(" invalid dma channel\n");
+               printk(" invalid dma channel %u\n", dma_chan);
                return -EINVAL;
        }else if(dma_chan)
        {
@@ -557,7 +552,7 @@ int labpc_common_attach( comedi_device *dev, unsigned long iobase,
                }
                if(request_dma(dma_chan, driver_labpc.driver_name))
                {
-                       printk(" failed to allocate dma channel %i\n", dma_chan);
+                       printk(" failed to allocate dma channel %u\n", dma_chan);
                        return -EINVAL;
                }
                devpriv->dma_chan = dma_chan;
@@ -669,8 +664,8 @@ int labpc_common_attach( comedi_device *dev, unsigned long iobase,
 static int labpc_attach(comedi_device *dev, comedi_devconfig *it)
 {
        unsigned long iobase = 0;
-       int irq = 0;
-       int dma_chan = 0;
+       unsigned int irq = 0;
+       unsigned int dma_chan = 0;
        int ret;
 
        /* allocate and initialize dev->private */
index d977b23bfda35e0f0baa83aeebe9dd0a09add7ae..e2aa49ef8162c4307d27fe9fb2fd6f1a6c0eeb4a 100644 (file)
@@ -77,7 +77,7 @@ typedef struct{
 extern labpc_board labpc_cs_boards[NUM_LABPC_CS_BOARDS];
 
 int labpc_common_attach( comedi_device *dev, unsigned long iobase,
-       int irq, int dma );
+       unsigned int irq, unsigned int dma );
 int labpc_common_detach( comedi_device *dev );
 
 
index 4e77b0cba54a43c2a5cee5da851cd20fc06df99c..69ca7e6c338c5e0d17b8cc4547c397fec2d72c5c 100644 (file)
@@ -111,7 +111,7 @@ static comedi_driver driver_labpc_cs =
 static int labpc_attach(comedi_device *dev, comedi_devconfig *it)
 {
        unsigned long iobase = 0;
-       int irq = 0;
+       unsigned int irq = 0;
        dev_link_t *link;
 
        /* allocate and initialize dev->private */
index 97e01f85080a3c4469891e39624cb629bd278a7f..ab124e162753d98e531ae606e1191ccd447ccd76 100644 (file)
@@ -451,7 +451,7 @@ static void mio_cs_config(dev_link_t *link)
 static int mio_cs_attach(comedi_device *dev,comedi_devconfig *it)
 {
        dev_link_t *link;
-       int irq;
+       unsigned int irq;
        int ret;
        
        DPRINTK("mio_cs_attach(dev=%p,it=%p)\n",dev,it);
@@ -464,7 +464,7 @@ static int mio_cs_attach(comedi_device *dev,comedi_devconfig *it)
 
        irq=link->irq.AssignedIRQ;
 
-       printk("comedi%d: %s: DAQCard: io 0x%04lx, irq %d, ",
+       printk("comedi%d: %s: DAQCard: io 0x%04lx, irq %u, ",
                dev->minor,dev->driver->driver_name,dev->iobase,
                irq);
 
index 8f891e92a09cca60d1ff8b8998db7fc45b6ebf25..cef06a3c4a2deae3d7eaebc4d3c28c3f12efae0c 100644 (file)
@@ -1064,7 +1064,7 @@ static int nidio_attach(comedi_device *dev,comedi_devconfig *it)
        int i;
        int ret;
        int n_subdevices;
-       int irq;
+       unsigned int irq;
 
        printk("comedi%d: nidio:",dev->minor);
 
index 4598b333b76a3307ee7a5324af746bfb15a16743..be1df246d4f050266c33e1f9bfb1bad0ce41cb98 100644 (file)
@@ -1365,7 +1365,7 @@ static int pcimio_attach(comedi_device *dev,comedi_devconfig *it)
        if(dev->irq==0){
                printk(" unknown irq (bad)\n");
        }else{
-               printk(" ( irq = %d )",dev->irq);
+               printk(" ( irq = %u )",dev->irq);
                if( (ret=comedi_request_irq(dev->irq,ni_E_interrupt,NI_E_IRQ_FLAGS,"ni_pcimio",dev))<0 ){
                        printk(" irq not available\n");
                        dev->irq=0;
index 6c05d029ca1d981db3f4a9a16e1fb7a114fd97aa..5e69e45dc2ecdd89d3d2367b080e4f3718de23e7 100644 (file)
@@ -491,14 +491,14 @@ static int pcl711_detach(comedi_device * dev)
 static int pcl711_attach(comedi_device * dev, comedi_devconfig * it)
 {
        int ret;
-       int iobase;
-       int irq;
+       unsigned long iobase;
+       unsigned int irq;
        comedi_subdevice *s;
 
        /* claim our I/O space */
 
        iobase = it->options[0];
-       printk("comedi%d: pcl711: 0x%04x ", dev->minor, iobase);
+       printk("comedi%d: pcl711: 0x%04lx ", dev->minor, iobase);
        if (!request_region(iobase, PCL711_SIZE, "pcl711")) {
                printk("I/O port conflict\n");
                return -EIO;
@@ -512,16 +512,16 @@ static int pcl711_attach(comedi_device * dev, comedi_devconfig * it)
 
        /* grab our IRQ */
        irq = it->options[1];
-       if (irq < 0 || irq > this_board->maxirq) {
+       if (irq > this_board->maxirq) {
                printk("irq out of range\n");
                return -EINVAL;
        }
        if (irq) {
                if (comedi_request_irq(irq, pcl711_interrupt, 0, "pcl711", dev)) {
-                       printk("unable to allocate irq %d\n", irq);
+                       printk("unable to allocate irq %u\n", irq);
                        return -EINVAL;
                } else {
-                       printk("( irq = %d )\n", irq);
+                       printk("( irq = %u )\n", irq);
                }
        }
        dev->irq = irq;
index 28bf8d610ba6e52c133f77ee2ca23c0134850c8b..5de96dc1da5eb5d8a658f6f154c6295562f019b4 100644 (file)
@@ -64,7 +64,7 @@ typedef struct {
        int             dio;            // num of DIO
        int             numofports;     // num of 8255 subdevices
        unsigned int    IRQbits;        // allowed interrupts
-       int             io_range;       // len of IO space
+       unsigned int    io_range;       // len of IO space
        char            can_have96;     
        char            is_pet48;
 } boardtype;
@@ -96,7 +96,7 @@ COMEDI_INITCLEANUP(driver_pcl724);
 
 static int subdev_8255_cb(int dir,int port,int data,unsigned long arg)
 {
-       int iobase=arg;
+       unsigned long iobase=arg;
 
        if(dir){
                outb(data,iobase+port);
@@ -124,14 +124,18 @@ static int subdev_8255mapped_cb(int dir,int port,int data,unsigned long iobase)
 
 static int pcl724_attach(comedi_device *dev,comedi_devconfig *it)
 {
-        int iobase,iorange;
+        unsigned long iobase;
+       unsigned int iorange;
        int ret,i,n_subdevices;
+#ifdef PCL724_IRQ
+       unsigned int irq;
+#endif
 
         iobase=it->options[0];
         iorange=this_board->io_range;
        if ((this_board->can_have96)&&((it->options[1]==1)||(it->options[1]==96)))
                iorange=PCL722_96_SIZE; // PCL-724 in 96 DIO configuration
-       printk("comedi%d: pcl724: board=%s, 0x%03x ",dev->minor,
+       printk("comedi%d: pcl724: board=%s, 0x%03lx ",dev->minor,
                this_board->name,iobase);
        if(!request_region(iobase, iorange, "pcl724")){
                printk("I/O port conflict\n");
@@ -146,16 +150,16 @@ static int pcl724_attach(comedi_device *dev,comedi_devconfig *it)
         irq=0;
         if (this_board->IRQbits!=0) { /* board support IRQ */
                irq=it->options[1];
-               if (irq>0)  {/* we want to use IRQ */
+               if (irq)  {/* we want to use IRQ */
                        if (((1<<irq)&this_board->IRQbits)==0) {
-                               rt_printk(", IRQ %d is out of allowed range, DISABLING IT",irq);
+                               rt_printk(", IRQ %u is out of allowed range, DISABLING IT",irq);
                                irq=0; /* Bad IRQ */
                        } else {
                                if (comedi_request_irq(irq, interrupt_pcl724, 0, "pcl724", dev)) {
-                                       rt_printk(", unable to allocate IRQ %d, DISABLING IT", irq);
+                                       rt_printk(", unable to allocate IRQ %u, DISABLING IT", irq);
                                        irq=0; /* Can't use IRQ */
                                } else {
-                                       rt_printk(", irq=%d", irq);
+                                       rt_printk(", irq=%u", irq);
                                }
                        }
                }
index a9d29b3ee696676134151a6e525036cb47dff3f9..578299ad30039fe309df5bb22bc5578b759b0210 100644 (file)
@@ -60,10 +60,10 @@ static int pcl725_di_insn(comedi_device *dev,comedi_subdevice *s,
 static int pcl725_attach(comedi_device *dev,comedi_devconfig *it)
 {
        comedi_subdevice *s;
-       int iobase;
+       unsigned long iobase;
 
        iobase=it->options[0];
-       printk("comedi%d: pcl725: 0x%04x ",dev->minor,iobase);
+       printk("comedi%d: pcl725: 0x%04lx ",dev->minor,iobase);
        if(!request_region(iobase,PCL725_SIZE,"pcl725")){
                printk("I/O port conflict\n");
                return -EIO;
index 2f15431eff52bc8ea47e16a6aa9f7a3d2f2606b3..b7cd7040514a7bb2b1df256cb8c64de5d6c23a78 100644 (file)
@@ -121,7 +121,7 @@ typedef struct {
        int             n_aochan;       // num of D/A chans
        int             num_of_ranges;  // num of ranges
        unsigned int    IRQbits;        // allowed interrupts
-       int             io_range;       // len of IO space
+       unsigned int    io_range;       // len of IO space
        char            have_dio;       // 1=card have DI/DO ports
        int             di_hi;          // ports for DI/DO operations
        int             di_lo;
@@ -239,12 +239,16 @@ static int pcl726_do_insn_bits(comedi_device *dev,comedi_subdevice *s,
 static int pcl726_attach(comedi_device *dev,comedi_devconfig *it)
 {
        comedi_subdevice *s;
-        int iobase,iorange;
+        unsigned long iobase;
+       unsigned int iorange;
        int ret,i;
+#ifdef ACL6126_IRQ
+       unsigned int irq;
+#endif
        
         iobase=it->options[0];
         iorange=this_board->io_range;
-       printk("comedi%d: pcl726: board=%s, 0x%03x ",dev->minor,this_board->name,iobase);
+       printk("comedi%d: pcl726: board=%s, 0x%03lx ",dev->minor,this_board->name,iobase);
        if(!request_region(iobase, iorange, "pcl726")){
                printk("I/O port conflict\n");
                return -EIO;
@@ -267,7 +271,7 @@ static int pcl726_attach(comedi_device *dev,comedi_devconfig *it)
         if (boardtypes[board].IRQbits!=0) { /* board support IRQ */
                irq=it->options[1];
                devpriv->first_chan=2;
-               if (irq>0)  {/* we want to use IRQ */
+               if (irq)  {/* we want to use IRQ */
                        if (((1<<irq)&boardtypes[board].IRQbits)==0) {
                                rt_printk(", IRQ %d is out of allowed range, DISABLING IT",irq);
                                irq=0; /* Bad IRQ */
index cbafcfc4414679ee2c3ece900500e347236cd82a..678cd812c88d21f1a395b797ae0bedb3415c09c9 100644 (file)
@@ -30,7 +30,7 @@ static int pcl730_detach(comedi_device *dev);
 
 typedef struct {
        char    *name;          // driver name
-       int             io_range;       // len of I/O space
+       unsigned int    io_range;       // len of I/O space
 } boardtype;
 
 static boardtype boardtypes[] =
@@ -89,11 +89,12 @@ static int pcl730_di_insn(comedi_device *dev,comedi_subdevice *s,
 static int pcl730_attach(comedi_device *dev,comedi_devconfig *it)
 {
        comedi_subdevice *s;
-       int iobase, iorange;
+       unsigned long iobase;
+       unsigned int iorange;
 
        iobase=it->options[0];
        iorange=this_board->io_range;
-       printk("comedi%d: pcl730: board=%s 0x%04x ", dev->minor,
+       printk("comedi%d: pcl730: board=%s 0x%04lx ", dev->minor,
                        this_board->name, iobase);
        if( !request_region(iobase, iorange, "pcl730") ) {
                printk("I/O port conflict\n");
index a463f1f0490440cb290b1cde132f1e249e1ee244..384d45314ba9076c4c272969c5bcfaa916efd0a8 100644 (file)
@@ -1172,15 +1172,15 @@ static void pcl812_reset(comedi_device * dev)
 static int pcl812_attach(comedi_device * dev, comedi_devconfig * it)
 {
        int ret,subdev;
-       int iobase;
-       int irq;
-       int dma;
+       unsigned long iobase;
+       unsigned int irq;
+       unsigned int dma;
        unsigned long pages;
        comedi_subdevice *s;
        int n_subdevices;
 
        iobase = it->options[0];
-       printk("comedi%d: pcl812:  board=%s, ioport=0x%03x", dev->minor,
+       printk("comedi%d: pcl812:  board=%s, ioport=0x%03lx", dev->minor,
                this_board->name, iobase);
 
        if (!request_region(iobase, this_board->io_range, "pcl812")) {
@@ -1201,14 +1201,14 @@ static int pcl812_attach(comedi_device * dev, comedi_devconfig * it)
                irq = it->options[1];
                if (irq) {      /* we want to use IRQ */
                        if (((1 << irq) & this_board->IRQbits) == 0) {
-                               printk(", IRQ %d is out of allowed range, DISABLING IT", irq);
+                               printk(", IRQ %u is out of allowed range, DISABLING IT", irq);
                                irq = 0;        /* Bad IRQ */
                        } else {
                                if (comedi_request_irq(irq, interrupt_pcl812, 0, "pcl812", dev)) {
-                                       printk(", unable to allocate IRQ %d, DISABLING IT", irq);
+                                       printk(", unable to allocate IRQ %u, DISABLING IT", irq);
                                        irq = 0;        /* Can't use IRQ */
                                } else {
-                                       printk(", irq=%d", irq);
+                                       printk(", irq=%u", irq);
                                }
                        }
                }
@@ -1228,11 +1228,11 @@ static int pcl812_attach(comedi_device * dev, comedi_devconfig * it)
                }
                ret = request_dma(dma, "pcl812");
                if (ret) {
-                       printk(", unable to allocate DMA %d, FAIL!\n", dma);
+                       printk(", unable to allocate DMA %u, FAIL!\n", dma);
                        return -EBUSY;  /* DMA isn't free */
                }
                devpriv->dma = dma;
-               printk(", dma=%d", dma);
+               printk(", dma=%u", dma);
                pages = 1;      /* we want 8KB */
                devpriv->dmabuf[0] = __get_dma_pages(GFP_KERNEL, pages);
                if (!devpriv->dmabuf[0]) {
index 7665821b07b574f3abef7088cd5726a1a5b684af..1410f4a5869d7956b2130b47f603e70a4c2a20f9 100644 (file)
@@ -114,7 +114,7 @@ typedef struct {
   int n_dochan;                        // num of DO chans
   comedi_lrange *ai_range_type;        // default A/D rangelist
   comedi_lrange *ao_range_type;        // dafault D/A rangelist
-  int io_range;                        // len of IO space
+  unsigned int io_range;       // len of IO space
   unsigned int IRQbits;                // allowed interrupts
   unsigned int DMAbits;                // allowed DMA chans
   int ai_maxdata;              // maxdata for A/D
@@ -172,10 +172,10 @@ COMEDI_INITCLEANUP(driver_pcl816);
 
 typedef struct
 {
-  int dma;                     // used DMA, 0=don't use DMA
+  unsigned int dma;            // used DMA, 0=don't use DMA
   int dma_rtc;                 // 1=RTC used with DMA, 0=no RTC alloc
 #ifdef unused
-  unsigned int rtc_iobase;     // RTC port region
+  unsigned long rtc_iobase;    // RTC port region
   unsigned int rtc_iosize;
   unsigned int rtc_irq;
 #endif
@@ -793,7 +793,7 @@ pcl816_ai_cancel (comedi_device * dev, comedi_subdevice * s)
 ==============================================================================
  chech for PCL816
 */
-static int pcl816_check (int iobase)
+static int pcl816_check (unsigned long iobase)
 {
   outb (0x00, iobase + PCL816_MUX);
   comedi_udelay (1);
@@ -1013,15 +1013,15 @@ static int
 pcl816_attach (comedi_device * dev, comedi_devconfig * it)
 {
   int ret;
-  int iobase;
-  int irq, dma;
+  unsigned long iobase;
+  unsigned int irq, dma;
   unsigned long pages;
   //int i;
   comedi_subdevice *s;
 
   /* claim our I/O space */
   iobase = it->options[0];
-  printk("comedi%d: pcl816:  board=%s, ioport=0x%03x", dev->minor,
+  printk("comedi%d: pcl816:  board=%s, ioport=0x%03lx", dev->minor,
                this_board->name, iobase);
                 
   if (!request_region (iobase, this_board->io_range, "pcl816")) {
@@ -1046,21 +1046,21 @@ pcl816_attach (comedi_device * dev, comedi_devconfig * it)
   irq = 0;
   if (this_board->IRQbits != 0) {      /* board support IRQ */
                irq = it->options[1];
-      if (irq > 0)
+      if (irq)
        {                       /* we want to use IRQ */
          if (((1 << irq) & this_board->IRQbits) == 0)
            {
-             rt_printk (", IRQ %d is out of allowed range, DISABLING IT", irq);
+             rt_printk (", IRQ %u is out of allowed range, DISABLING IT", irq);
              irq = 0;          /* Bad IRQ */
            }
          else
            {
              if (comedi_request_irq(irq, interrupt_pcl816, 0, "pcl816", dev)) {
-                        rt_printk (", unable to allocate IRQ %d, DISABLING IT",irq);
+                        rt_printk (", unable to allocate IRQ %u, DISABLING IT",irq);
                         irq = 0;       /* Can't use IRQ */
                        }
              else      {
-                 rt_printk (", irq=%d", irq);
+                 rt_printk (", irq=%u", irq);
                }
            }
        }
@@ -1094,7 +1094,7 @@ pcl816_attach (comedi_device * dev, comedi_devconfig * it)
           0, "pcl816 DMA (RTC)", dev)) {
                  devpriv->dma_rtc = 1;
                  devpriv->rtc_irq = RTC_IRQ;
-                 rt_printk (", dma_irq=%d", devpriv->rtc_irq);
+                 rt_printk (", dma_irq=%u", devpriv->rtc_irq);
          } else {
                  RTC_lock--;
                  if (RTC_lock == 0)
@@ -1130,12 +1130,12 @@ no_rtc:
          }
       ret = request_dma (dma, "pcl816");
       if (ret) {
-               rt_printk (", unable to allocate DMA %d, FAIL!\n", dma);
+               rt_printk (", unable to allocate DMA %u, FAIL!\n", dma);
                return -EBUSY;  /* DMA isn't free */
          }
       
          devpriv->dma = dma;
-      rt_printk (", dma=%d", dma);
+      rt_printk (", dma=%u", dma);
       pages = 2;               /* we need 16KB */
       devpriv->dmabuf[0] = __get_dma_pages (GFP_KERNEL, pages);
       
index 6c211801497af4dec59ef383b8cd98466bb4c389..7b73999b3f880193baefc97b8bd1b9bf17164a31 100644 (file)
@@ -259,7 +259,7 @@ typedef struct {
        int             n_dochan;       // num of DO chans
        comedi_lrange   *ai_range_type; // default A/D rangelist
        comedi_lrange   *ao_range_type; // default D/A rangelist
-       int             io_range;       // len of IO space
+       unsigned int    io_range;       // len of IO space
        unsigned int    IRQbits;        // allowed interrupts
        unsigned int    DMAbits;        // allowed DMA chans
        int             ai_maxdata;     // maxdata for A/D
@@ -302,11 +302,11 @@ COMEDI_INITCLEANUP(driver_pcl818);
 
 
 typedef struct {
-       int             dma;            // used DMA, 0=don't use DMA
+       unsigned int    dma;            // used DMA, 0=don't use DMA
        int             dma_rtc;        // 1=RTC used with DMA, 0=no RTC alloc
-       int             io_range;
+       unsigned int    io_range;
 #ifdef unused
-       unsigned int    rtc_iobase;     // RTC port region
+       unsigned long   rtc_iobase;     // RTC port region
        unsigned int    rtc_iosize;
        unsigned int    rtc_irq;
        struct timer_list rtc_irq_timer;// timer for RTC sanity check
@@ -1412,7 +1412,7 @@ static int pcl818_ai_cancel(comedi_device * dev, comedi_subdevice * s)
 ==============================================================================
  chech for PCL818
 */
-static int pcl818_check(int iobase) 
+static int pcl818_check(unsigned long iobase) 
 {
         outb(0x00, iobase + PCL818_MUX);
         comedi_udelay(1); 
@@ -1579,8 +1579,8 @@ static void free_resources(comedi_device * dev)
 static int pcl818_attach(comedi_device * dev, comedi_devconfig * it)
 {
        int ret;
-       int iobase;
-       int irq,dma;
+       unsigned long iobase;
+       unsigned int irq,dma;
        unsigned long pages;
        comedi_subdevice *s;
 
@@ -1590,7 +1590,7 @@ static int pcl818_attach(comedi_device * dev, comedi_devconfig * it)
 
        /* claim our I/O space */
        iobase = it->options[0];
-       printk("comedi%d: pcl818:  board=%s, ioport=0x%03x",
+       printk("comedi%d: pcl818:  board=%s, ioport=0x%03lx",
                dev->minor, this_board->name, iobase);
        devpriv->io_range=this_board->io_range;
        if ((this_board->fifo)&&(it->options[2]==-1)) { // we've board with FIFO and we want to use FIFO
@@ -1615,16 +1615,16 @@ static int pcl818_attach(comedi_device * dev, comedi_devconfig * it)
         irq=0;
         if (this_board->IRQbits!=0) { /* board support IRQ */
                irq=it->options[1];
-               if (irq>0)  {/* we want to use IRQ */
+               if (irq)  {/* we want to use IRQ */
                        if (((1<<irq)&this_board->IRQbits)==0) {
-                               rt_printk(", IRQ %d is out of allowed range, DISABLING IT",irq);
+                               rt_printk(", IRQ %u is out of allowed range, DISABLING IT",irq);
                                irq=0; /* Bad IRQ */
                        } else { 
                                if (comedi_request_irq(irq, interrupt_pcl818, 0, "pcl818", dev)) {
-                                       rt_printk(", unable to allocate IRQ %d, DISABLING IT", irq);
+                                       rt_printk(", unable to allocate IRQ %u, DISABLING IT", irq);
                                        irq=0; /* Can't use IRQ */
                                } else {
-                                       rt_printk(", irq=%d", irq);
+                                       rt_printk(", irq=%u", irq);
                                }    
                        }  
                }
@@ -1650,7 +1650,7 @@ static int pcl818_attach(comedi_device * dev, comedi_devconfig * it)
                if (!comedi_request_irq(RTC_IRQ, interrupt_pcl818_ai_mode13_dma_rtc, 0, "pcl818 DMA (RTC)", dev)) {
                        devpriv->dma_rtc=1;
                        devpriv->rtc_irq=RTC_IRQ;
-                       rt_printk(", dma_irq=%d", devpriv->rtc_irq);
+                       rt_printk(", dma_irq=%u", devpriv->rtc_irq);
                } else {
                        RTC_lock--;
                        if (RTC_lock==0) {
@@ -1676,11 +1676,11 @@ no_rtc:
                } 
                ret=request_dma(dma, "pcl818");
                if (ret) {
-                       rt_printk(", unable to allocate DMA %d, FAIL!\n",dma);
+                       rt_printk(", unable to allocate DMA %u, FAIL!\n",dma);
                        return -EBUSY; /* DMA isn't free */
                } 
                devpriv->dma=dma;
-               rt_printk(", dma=%d", dma);
+               rt_printk(", dma=%u", dma);
                pages=2; /* we need 16KB */
                devpriv->dmabuf[0]=__get_dma_pages(GFP_KERNEL, pages);
                if (!devpriv->dmabuf[0]) {
index f4f6644924d663177e6d10897d9285b872ee2e69..df738aba07ed30eb9176777295607d7826886c29 100644 (file)
@@ -70,7 +70,7 @@ typedef struct {
        int             dio;            // num of DIO
        int             numofports;     // num of 8255 subdevices
        unsigned int    IRQbits;        // allowed interrupts
-       int             io_range;       // len of IO space
+       unsigned int    io_range;       // len of IO space
 } boardtype;
 
 //used to track configured dios 
@@ -101,16 +101,16 @@ COMEDI_INITCLEANUP(driver_pcm3724);
 
 static int subdev_8255_cb(int dir,int port,int data,unsigned long arg)
 {
-       int iobase=arg;
+       unsigned long iobase=arg;
        unsigned char inbres;
-       //printk("8255cb %d %d %d %x\n", dir,port,data,arg);
+       //printk("8255cb %d %d %d %lx\n", dir,port,data,arg);
        if(dir){
-               //printk("8255 cb   outb(%x, %x)\n", data, iobase+port);
+               //printk("8255 cb   outb(%x, %lx)\n", data, iobase+port);
                outb(data,iobase+port);
                return 0;
        }else{
                inbres = inb(iobase+port);
-               //printk("8255 cb   inb(%x) = %x\n", iobase+port, inbres);
+               //printk("8255 cb   inb(%lx) = %x\n", iobase+port, inbres);
                return inbres;
        }
 }
@@ -150,7 +150,7 @@ static void do_3724_config(comedi_device *dev,comedi_subdevice *s,
 {
        int config;
        int buffer_config;
-       int port_8255_cfg;
+       unsigned long port_8255_cfg;
 
        config=CR_CW;
        buffer_config = 0;
@@ -176,7 +176,7 @@ static void do_3724_config(comedi_device *dev,comedi_subdevice *s,
                port_8255_cfg = dev->iobase + SIZE_8255 + _8255_CR;
        }
        outb(buffer_config, dev->iobase + 8); /* update buffer register */
-       //printk("pcm3724 buffer_config (%x) %d, %x\n", dev->iobase + _8255_CR, chanspec, buffer_config);
+       //printk("pcm3724 buffer_config (%lx) %d, %x\n", dev->iobase + _8255_CR, chanspec, buffer_config);
        outb(config, port_8255_cfg);
 }
 
@@ -259,7 +259,8 @@ static int subdev_3724_insn_config(comedi_device *dev, comedi_subdevice *s,
 
 static int pcm3724_attach(comedi_device *dev,comedi_devconfig *it)
 {
-        int iobase,iorange;
+        unsigned long iobase;
+       unsigned int iorange;
        int ret,i,n_subdevices;
 
         iobase=it->options[0];
@@ -270,7 +271,7 @@ static int pcm3724_attach(comedi_device *dev,comedi_devconfig *it)
        ((priv_pcm3724*)(dev->private))->dio_1 = 0;
        ((priv_pcm3724*)(dev->private))->dio_2 = 0;
 
-       printk("comedi%d: pcm3724: board=%s, 0x%03x ",dev->minor,
+       printk("comedi%d: pcm3724: board=%s, 0x%03lx ",dev->minor,
                this_board->name,iobase);
        if(!iobase || !request_region(iobase, iorange, "pcm3724")){
                printk("I/O port conflict\n");
index bbe75eb38b3e84c88655e2417bbdcc419a610057..31a66b87b61fff008ddef9ef79a460cb861e49a4 100644 (file)
@@ -65,10 +65,10 @@ static int pcm3730_di_insn_bits(comedi_device *dev,comedi_subdevice *s,
 static int pcm3730_attach(comedi_device *dev,comedi_devconfig *it)
 {
        comedi_subdevice *s;
-       int iobase;
+       unsigned long iobase;
 
        iobase=it->options[0];
-       printk("comedi%d: pcm3730: 0x%04x ",dev->minor,iobase);
+       printk("comedi%d: pcm3730: 0x%04lx ",dev->minor,iobase);
        if(!request_region(iobase,PCM3730_SIZE,"pcm3730")){
                printk("I/O port conflict\n");
                return -EIO;
index 509f4f158f4f8163dc4ca8adf1eed50fd6ddd7b8..9dcf0e8e35f3648ac62a9ee56637dfc7f3536835 100644 (file)
@@ -131,10 +131,10 @@ static int pcmad_attach(comedi_device *dev,comedi_devconfig *it)
 {
        int ret;
        comedi_subdevice *s;
-       int iobase;
+       unsigned long iobase;
 
        iobase=it->options[0];
-       printk("comedi%d: pcmad: 0x%04x ",dev->minor,iobase);
+       printk("comedi%d: pcmad: 0x%04lx ",dev->minor,iobase);
        if(!request_region(iobase,PCMAD_SIZE,"pcmad")){
                printk("I/O port conflict\n");
                return -EIO;
index 382ef09202523a72223ec852ed6a8c41d49fc241..5c2fb4a1d0e84c5dfd447b1ad75e23cbca71ee11 100644 (file)
@@ -158,10 +158,10 @@ static int ao_rinsn(comedi_device *dev,comedi_subdevice *s,
 static int pcmda12_attach(comedi_device *dev, comedi_devconfig *it)
 {
        comedi_subdevice *s;
-    int iobase;
+    unsigned long iobase;
 
     iobase = it->options[0];
-       printk("comedi%d: %s: io: %x %s ", dev->minor, driver.driver_name, iobase, it->options[1] ? "simultaneous xfer mode enabled" : "");
+       printk("comedi%d: %s: io: %lx %s ", dev->minor, driver.driver_name, iobase, it->options[1] ? "simultaneous xfer mode enabled" : "");
 
     if ( !request_region(iobase, 
                          IOSIZE, 
index a944db630e0a988a98b5c080f906cc6c4c0f20d5..3b287089ecfc67baa5a39a825c26a2eae103f244 100644 (file)
@@ -210,7 +210,7 @@ typedef struct
     unsigned char enab[NUM_PAGED_REGS]; /* shadow of ENABx registers */
     int num;
     unsigned long iobase;
-    int irq;
+    unsigned int irq;
     spinlock_t spinlock;
   } asics[MAX_ASICS];  
   pcmuio_subdev_private *sprivs;
@@ -286,13 +286,15 @@ static void unlock_port(comedi_device *dev, int asic, int port);
 static int pcmuio_attach(comedi_device *dev, comedi_devconfig *it)
 {
        comedi_subdevice *s;
-        int sdev_no, chans_left, n_subdevs, iobase, irq[MAX_ASICS], port, asic, thisasic_chanct = 0;
+        int sdev_no, chans_left, n_subdevs, port, asic, thisasic_chanct = 0;
+       unsigned long iobase;
+       unsigned int irq[MAX_ASICS];
 
     iobase = it->options[0];
     irq[0] = it->options[1];
     irq[1] = it->options[2];
 
-    printk("comedi%d: %s: io: %x ", dev->minor, driver.driver_name, iobase);
+    printk("comedi%d: %s: io: %lx ", dev->minor, driver.driver_name, iobase);
        
     dev->iobase = iobase;
     
@@ -427,9 +429,9 @@ static int pcmuio_attach(comedi_device *dev, comedi_devconfig *it)
                           irqs.. */
 
     if (irq[0]) {
-      printk("irq: %d ", irq[0]);
+      printk("irq: %u ", irq[0]);
       if (irq[1] && thisboard->num_asics == 2) 
-        printk("second ASIC irq: %d ", irq[1]);
+        printk("second ASIC irq: %u ", irq[1]);
     } else {
       printk("(IRQ mode disabled) ");
     }
@@ -499,7 +501,7 @@ static int pcmuio_dio_insn_bits(comedi_device *dev, comedi_subdevice *s,
 
     for (byte_no = 0; byte_no < s->n_chan/CHANS_PER_PORT; ++byte_no) {
            /* address of 8-bit port */
-        int ioaddr = subpriv->iobases[byte_no], 
+        unsigned long ioaddr = subpriv->iobases[byte_no], 
            /* bit offset of port in 32-bit doubleword */
             offset = byte_no * 8; 
                       /* this 8-bit port's data */
@@ -550,7 +552,8 @@ static int pcmuio_dio_insn_bits(comedi_device *dev, comedi_subdevice *s,
 static int pcmuio_dio_insn_config(comedi_device *dev, comedi_subdevice *s,
                                   comedi_insn *insn, lsampl_t *data)
 {
-    int chan = CR_CHAN(insn->chanspec), byte_no = chan/8, bit_no = chan % 8, ioaddr;
+    int chan = CR_CHAN(insn->chanspec), byte_no = chan/8, bit_no = chan % 8;
+    unsigned long ioaddr;
     unsigned char byte;
 
     /* Compute ioaddr for this channel */
@@ -612,7 +615,7 @@ static void init_asics(comedi_device *dev) /* sets up an
   for (asic = 0; asic < thisboard->num_asics; ++asic)
   {
     int port, page;
-    int baseaddr = dev->iobase + asic*ASIC_IOSIZE;
+    unsigned long baseaddr = dev->iobase + asic*ASIC_IOSIZE;
 
     switch_page(dev, asic,  0); /* switch back to page 0 */
 
@@ -687,7 +690,7 @@ static irqreturn_t interrupt_pcmuio(int irq, void *d, struct pt_regs *regs)
     if (irq == devpriv->asics[asic].irq) {
       unsigned long flags;    
       unsigned triggered = 0;
-      int iobase = devpriv->asics[asic].iobase;
+      unsigned long iobase = devpriv->asics[asic].iobase;
       /* it is an interrupt for ASIC #asic */
       unsigned char int_pend;
 
index df51a5a49296c4f5ae301e65d769c86c371a04a9..259115c4206b10130d10366fa80613d885acf159 100644 (file)
@@ -53,7 +53,7 @@ static int pcl734_insn_bits(comedi_device *dev,comedi_subdevice *s,
 
 struct boarddef_struct{
        char *name;
-       int iosize;
+       unsigned int iosize;
        int (*setup)(comedi_device *);
        int type;
        int n_chan;
@@ -111,10 +111,11 @@ static comedi_driver driver_poc=
 static int poc_attach(comedi_device *dev, comedi_devconfig *it)
 {
        comedi_subdevice *s;
-       int iosize, iobase;
+       unsigned long iobase;
+       unsigned int iosize;
 
        iobase = it->options[0];
-       printk("comedi%d: poc: using %s iobase 0x%x\n", dev->minor,
+       printk("comedi%d: poc: using %s iobase 0x%lx\n", dev->minor,
                this_board->name, iobase);
 
        dev->board_name = this_board->name;
@@ -129,7 +130,7 @@ static int poc_attach(comedi_device *dev, comedi_devconfig *it)
        /* check if io addresses are available */
        if(!request_region(iobase, iosize, "dac02"))
        {
-               printk("I/O port conflict: failed to allocate ports 0x%x to 0x%x\n",
+               printk("I/O port conflict: failed to allocate ports 0x%lx to 0x%lx\n",
                        iobase, iobase + iosize - 1);
                return -EIO;
        }
index f331e0cb3e3fee94adee009f93396d42a3c4ba24..59aafed37e5a71029c70ae04f0a4ec346deab489 100644 (file)
@@ -1343,7 +1343,7 @@ next_entry:
     if (link->conf.Vpp1)
        printk(", Vpp %d.%d", link->conf.Vpp1/10, link->conf.Vpp1%10);
     if (link->conf.Attributes & CONF_ENABLE_IRQ)
-       printk(", irq %d", link->irq.AssignedIRQ);
+       printk(", irq %u", link->irq.AssignedIRQ);
     if (link->io.NumPorts1)
        printk(", io 0x%04x-0x%04x", link->io.BasePort1,
               link->io.BasePort1+link->io.NumPorts1-1);
index d10faf29116b111f929fc705d0f81d24b3725f85..2b589fb428f36d732068e6af469508c9073bf165 100644 (file)
@@ -750,9 +750,9 @@ static int rtd_attach (
     comedi_subdevice *s;
     struct pci_dev* pcidev;
     int        ret;
-    unsigned long physLas0;            /* configuation */
-    unsigned long physLas1;            /* data area */
-    unsigned long physLcfg;            /* PLX9080 */
+    resource_size_t physLas0;          /* configuation */
+    resource_size_t physLas1;          /* data area */
+    resource_size_t physLcfg;          /* PLX9080 */
 #ifdef USE_DMA
     int index;
 #endif
@@ -829,8 +829,9 @@ static int rtd_attach (
        return -ENOMEM;
     }
 
-    DPRINTK ("%s: LAS0=%lx, LAS1=%lx, CFG=%lx.\n", dev->board_name,
-            physLas0, physLas1, physLcfg);
+    DPRINTK ("%s: LAS0=%llx, LAS1=%llx, CFG=%llx.\n", dev->board_name,
+            (unsigned long long)physLas0, (unsigned long long)physLas1,
+            (unsigned long long)physLcfg);
     {                                  /* The RTD driver does this */
        unsigned char pci_latency;
        u16 revision;
@@ -924,11 +925,11 @@ static int rtd_attach (
        /* check if our interrupt is available and get it */
        if((ret=comedi_request_irq (devpriv->pci_dev->irq, rtd_interrupt,
                SA_SHIRQ, "rtd520", dev)) < 0) {
-               printk("Could not get interrupt! (%d)\n", devpriv->pci_dev->irq);
+               printk("Could not get interrupt! (%u)\n", devpriv->pci_dev->irq);
                return ret;
        }
        dev->irq = devpriv->pci_dev->irq;
-       printk("( irq=%d )", dev->irq);
+       printk("( irq=%u )", dev->irq);
 
 #ifdef USE_DMA
     if (dev->irq > 0) {
index f15fa47ba735aec691150ce6e25358a1f5cdc7e7..bd6da78d0a921e149047a145ff3d59f17bd547cc 100644 (file)
@@ -295,13 +295,13 @@ static int rti800_do_insn_bits(comedi_device *dev,comedi_subdevice *s,
 
 static int rti800_attach(comedi_device * dev, comedi_devconfig * it)
 {
-       int irq;
-       int iobase;
+       unsigned int irq;
+       unsigned long iobase;
        int ret;
        comedi_subdevice *s;
 
        iobase = it->options[0];
-       printk("comedi%d: rti800: 0x%04x ", dev->minor, iobase);
+       printk("comedi%d: rti800: 0x%04lx ", dev->minor, iobase);
        if (!request_region(iobase, RTI800_SIZE, "rti800")) {
                printk("I/O port conflict\n");
                return -EIO;
@@ -322,12 +322,14 @@ static int rti800_attach(comedi_device * dev, comedi_devconfig * it)
        outb(0,dev->iobase+RTI800_CLRFLAGS);
 
        irq=it->options[1];
-       if(irq>0){
-               printk("( irq = %d )\n",irq);
-               if((ret=comedi_request_irq(irq,rti800_interrupt, 0, "rti800", dev))<0)
+       if(irq){
+               printk("( irq = %u )",irq);
+               if((ret=comedi_request_irq(irq,rti800_interrupt, 0, "rti800", dev))<0){
+                       printk(" Failed to allocate IRQ\n");
                        return ret;
+               }
                dev->irq=irq;
-       }else if(irq == 0){
+       }else{
                printk("( no irq )");
        }
 
index 3b9612b057bac10117319d5d767c2e98cb84cccb..782c5e7014d3b791310f401728aca8179ac57a97 100644 (file)
@@ -101,10 +101,10 @@ static int rti802_attach(comedi_device * dev, comedi_devconfig * it)
 {
        comedi_subdevice *s;
        int i;
-       int iobase;
+       unsigned long iobase;
 
        iobase = it->options[0];
-       printk("comedi%d: rti802: 0x%04x ", dev->minor, iobase);
+       printk("comedi%d: rti802: 0x%04lx ", dev->minor, iobase);
        if (!request_region(iobase, RTI802_SIZE, "rti802")) {
                printk("I/O port conflict\n");
                return -EIO;
index ca003db3aa206b6d30cf28988e3c5b1a81464097..b0d3d041e61b1e9a18dd42c75dbcf2760bedbce7 100644 (file)
@@ -479,7 +479,7 @@ static int s626_attach(comedi_device *dev,comedi_devconfig *it)
   int result;
   int i;
   int ret;
-  uint64_t resourceStart;
+  resource_size_t resourceStart;
   dma_addr_t appdma;
   comedi_subdevice *s;
   struct pci_dev *pdev;
@@ -506,7 +506,7 @@ static int s626_attach(comedi_device *dev,comedi_devconfig *it)
   }
   devpriv->got_regions = 1;
 
-  resourceStart=(uint64_t)pci_resource_start(devpriv->pdev,0);
+  resourceStart=pci_resource_start(devpriv->pdev,0);
   
   devpriv->base_addr=ioremap(resourceStart, SIZEOF_ADDRESS_SPACE);
   if (devpriv->base_addr==NULL)        {
@@ -559,7 +559,7 @@ static int s626_attach(comedi_device *dev,comedi_devconfig *it)
   if(alloc_subdevices(dev, 6)<0)
     return -ENOMEM;
 
-  dev->iobase = (int)devpriv->base_addr;
+  dev->iobase = (unsigned long)devpriv->base_addr;
   dev->irq = devpriv->pdev->irq;
 
   //set up interrupt handler
index b5028f350e6218d5af8a4a8aaaaa26aa917a8662..848a352619db3a34499a46767504e603a9a025f1 100644 (file)
@@ -214,7 +214,7 @@ struct comedi_device_struct{
 
        /* dumb */
        unsigned long iobase;
-       int irq;
+       unsigned int irq;
 
        comedi_subdevice *read_subdev;
        wait_queue_head_t read_wait;