From: David Schleef Date: Fri, 7 Oct 2005 05:08:13 +0000 (+0000) Subject: Convert to UTF-8. Fix some warnings. X-Git-Tag: r0_7_71~137 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=fb0ef328478e7702957183f0d7937bab8de9fa67;p=comedi.git Convert to UTF-8. Fix some warnings. --- diff --git a/comedi/drivers/acl7225b.c b/comedi/drivers/acl7225b.c index d7c0479e..f26f8a18 100644 --- a/comedi/drivers/acl7225b.c +++ b/comedi/drivers/acl7225b.c @@ -1,11 +1,11 @@ /* * Driver for Adlink NuDAQ ACL-7225b and clones - * José Luis Sánchez + * José Luis Sánchez */ /* Driver: acl7225b.o Description: Adlink NuDAQ ACL-7225b & compatibles -Author: José Luis Sánchez (jsanchezv@teleline.es) +Author: José Luis Sánchez (jsanchezv@teleline.es) Status: testing Devices: [Adlink] ACL-7225b (acl7225b), [ICP] P16R16DIO (p16r16dio) */ diff --git a/comedi/drivers/amplc_pci230.c b/comedi/drivers/amplc_pci230.c index 08caa601..b9ac90f8 100644 --- a/comedi/drivers/amplc_pci230.c +++ b/comedi/drivers/amplc_pci230.c @@ -74,9 +74,9 @@ extra triggered scan functionality, interrupt bug-fix added by Steve Sharples #define PCI230_ADCG 0x0E /* Convertor related constants. */ -#define PCI230_DAC_SETTLE 5 /* Analogue output settling time in µs (DAC itself is 1µs nominally). */ -#define PCI230_ADC_SETTLE 1 /* Analogue input settling time in µs (ADC itself is 1.6µs nominally but we poll anyway). */ -#define PCI230_MUX_SETTLE 10 /* ADC MUX settling time in µS - 10µs for se, 20µs de. */ +#define PCI230_DAC_SETTLE 5 /* Analogue output settling time in µs (DAC itself is 1µs nominally). */ +#define PCI230_ADC_SETTLE 1 /* Analogue input settling time in µs (ADC itself is 1.6µs nominally but we poll anyway). */ +#define PCI230_MUX_SETTLE 10 /* ADC MUX settling time in µS - 10µs for se, 20µs de. */ /* DACCON values. */ #define PCI230_DAC_BUSY_BIT 1 @@ -265,14 +265,20 @@ static int pci230_ao_winsn(comedi_device *dev,comedi_subdevice *s,comedi_insn *i static int pci230_ao_rinsn(comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,lsampl_t *data); static int pci230_ct_insn_config(comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,lsampl_t *data); static int pci230_ct_rinsn(comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,lsampl_t *data); +#if 0 static void pci230_ns_to_timer(unsigned int *ns,int round); +#endif static void pci230_ns_to_single_timer(unsigned int *ns,int round); static void i8253_single_ns_to_timer(unsigned int i8253_osc_base, unsigned int *d, unsigned int *nanosec, int round_mode); static void pci230_setup_monostable_ct0(comedi_device *dev, unsigned int ns, unsigned int n_chan); +#if 0 static void pci230_z2_ct0(comedi_device *dev, unsigned int *ns,int round); +#endif static void pci230_z2_ct1(comedi_device *dev, unsigned int *ns,int round); static void pci230_z2_ct2(comedi_device *dev, unsigned int *ns,int round); +#if 0 static void pci230_cancel_ct0(comedi_device *dev); +#endif static void pci230_cancel_ct1(comedi_device *dev); static void pci230_cancel_ct2(comedi_device *dev); static irqreturn_t pci230_interrupt(int irq, void *d, struct pt_regs *regs); @@ -1145,6 +1151,7 @@ static int pci230_ai_cmd(comedi_device *dev,comedi_subdevice *s) } +#if 0 /* This function doesn't require a particular form, this is just * what happens to be used in some of the drivers. It should * convert ns nanoseconds to a counter value suitable for programming @@ -1156,6 +1163,7 @@ static void pci230_ns_to_timer(unsigned int *ns,int round) i8253_cascade_ns_to_timer_2div(PCI230_TIMEBASE_10MHZ, &divisor0, &divisor1, ns, TRIG_ROUND_MASK); return; } +#endif /* This function is used for analogue input. Only one counter/timer can be used, @@ -1191,7 +1199,6 @@ static void pci230_ns_to_single_timer(unsigned int *ns,int round) static void i8253_single_ns_to_timer(unsigned int i8253_osc_base, unsigned int *d, unsigned int *nanosec, int round_mode) { - int divider; unsigned int div; /* exit early if everything is already correct (this can save time @@ -1262,6 +1269,7 @@ static void pci230_setup_monostable_ct0(comedi_device *dev, unsigned int ns, uns } +#if 0 /* * Set ZCLK_CT0 to square wave mode with period of ns. */ @@ -1294,12 +1302,15 @@ static void pci230_z2_ct0(comedi_device *dev, unsigned int *ns,int round) } return; } +#endif +#if 0 static void pci230_cancel_ct0(comedi_device *dev) { devpriv->divisor0 = 0; i8254_load(devpriv->pci_iobase + PCI230_Z2_CT0, 0, devpriv->divisor0, 0); /* Counter 0, divisor0, 8254 mode 0. */ } +#endif /* * Set ZCLK_CT1 to square wave mode with period of ns. diff --git a/comedi/drivers/dmm32at.c b/comedi/drivers/dmm32at.c index 677ffccc..93c44f94 100644 --- a/comedi/drivers/dmm32at.c +++ b/comedi/drivers/dmm32at.c @@ -332,7 +332,7 @@ static int dmm32at_attach(comedi_device *dev,comedi_devconfig *it) dev->irq = it->options[1]; printk("comedi%d: dmm32at: attaching\n",dev->minor); - printk("dmm32at: probing at address 0x%04x, irq %d\n", + printk("dmm32at: probing at address 0x%04lx, irq %d\n", dev->iobase, dev->irq); diff --git a/comedi/drivers/dt282x.c b/comedi/drivers/dt282x.c index 4ce4fbdf..714a8f46 100644 --- a/comedi/drivers/dt282x.c +++ b/comedi/drivers/dt282x.c @@ -1201,9 +1201,9 @@ enum{ opt_iobase=0, opt_irq, opt_dma1, opt_dma2, /* i/o base, irq, dma channels 5 ai 0=straight binary, 1=2's comp 6 ao0 0=straight binary, 1=2's comp 7 ao1 0=straight binary, 1=2's comp - 8 ai 0=±10 V, 1=0-10 V, 2=±5 V, 3=0-5 V - 9 ao0 0=±10 V, 1=0-10 V, 2=±5 V, 3=0-5 V, 4=±2.5 V - 10 ao1 0=±10 V, 1=0-10 V, 2=±5 V, 3=0-5 V, 4=±2.5 V + 8 ai 0=±10 V, 1=0-10 V, 2=±5 V, 3=0-5 V + 9 ao0 0=±10 V, 1=0-10 V, 2=±5 V, 3=0-5 V, 4=±2.5 V + 10 ao1 0=±10 V, 1=0-10 V, 2=±5 V, 3=0-5 V, 4=±2.5 V */ static int dt282x_attach(comedi_device * dev, comedi_devconfig * it) { diff --git a/comedi/drivers/ni_atmio.c b/comedi/drivers/ni_atmio.c index b642dedf..9fcb33df 100644 --- a/comedi/drivers/ni_atmio.c +++ b/comedi/drivers/ni_atmio.c @@ -309,6 +309,7 @@ static inline unsigned short __win_in(comedi_device *dev, int addr) return ret; } +#undef __ISAPNP__ #ifdef __ISAPNP__ static struct isapnp_device_id device_ids[] = { { ISAPNP_DEVICE_SINGLE('N','I','C',0x1900,'N','I','C',0x1900), }, diff --git a/comedi/drivers/pcl730.c b/comedi/drivers/pcl730.c index 797213ea..cbafcfc4 100644 --- a/comedi/drivers/pcl730.c +++ b/comedi/drivers/pcl730.c @@ -1,11 +1,11 @@ /* * Driver for Advantech PCL-730 and clones - * José Luis Sánchez + * José Luis Sánchez */ /* Driver: pcl730.o Description: Advantech PCL-730 (& compatibles) -Author: José Luis Sánchez (jsanchezv@teleline.es) +Author: José Luis Sánchez (jsanchezv@teleline.es) Status: untested Devices: [Advantech] PCL-730 (pcl730), [ICP] ISO-730 (iso730), [Adlink] ACL-7130 (acl7130) diff --git a/comedi/drivers/s626.c b/comedi/drivers/s626.c index a8210334..90bbe091 100644 --- a/comedi/drivers/s626.c +++ b/comedi/drivers/s626.c @@ -480,6 +480,7 @@ static int s626_attach(comedi_device *dev,comedi_devconfig *it) int ret; uint64_t resourceStart; dma_addr_t appdma; + comedi_subdevice *s; if(alloc_private(dev,sizeof(s626_private))<0) return -ENOMEM; @@ -545,8 +546,6 @@ static int s626_attach(comedi_device *dev,comedi_devconfig *it) } - comedi_subdevice *s; - dev->board_ptr = s626_boards; dev->board_name = thisboard->name; @@ -648,6 +647,8 @@ static int s626_attach(comedi_device *dev,comedi_devconfig *it) devpriv->ai_cmd_running=0; if (devpriv->base_addr && (devpriv->allocatedBuf==2)){ + uint32_t *pPhysBuf; + uint16_t chan; // enab DEBI and audio pins, enable I2C interface. MC_ENABLE( P_MC1, MC1_DEBI | MC1_AUDIO | MC1_I2C ); @@ -782,7 +783,6 @@ static int s626_attach(comedi_device *dev,comedi_devconfig *it) // end initADC // init the DAC interface - uint32_t *pPhysBuf; // Init Audio2's output DMAC attributes: burst length = 1 DWORD, // threshold = 1 DWORD. @@ -852,7 +852,6 @@ static int s626_attach(comedi_device *dev,comedi_devconfig *it) // Init all DAC outputs to 0V and init all DAC setpoint and // polarity images. - uint16_t chan; for ( chan = 0; chan < S626_DAC_CHANNELS; chan++) SetDAC(dev,chan, 0 );