From wfp5p@virginia.edu Mon Mar 16 17:20:06 2009 From: Bill Pemberton Date: Mon, 16 Mar 2009 22:05:20 -0400 Subject: Staging: comedi: Remove comedi_async typedef To: greg@kroah.com Message-ID: <20090317020519.14467.23961.stgit@viridian.itc.Virginia.EDU> Signed-off-by: Bill Pemberton Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/comedi_fops.c | 18 +++---- drivers/staging/comedi/comedidev.h | 33 ++++++-------- drivers/staging/comedi/drivers.c | 32 ++++++------- drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c | 9 ++- drivers/staging/comedi/drivers/adl_pci9111.c | 2 drivers/staging/comedi/drivers/amplc_pci224.c | 2 drivers/staging/comedi/drivers/amplc_pci230.c | 12 ++--- drivers/staging/comedi/drivers/cb_pcidas.c | 29 ++++++------ drivers/staging/comedi/drivers/cb_pcidas64.c | 12 ++--- drivers/staging/comedi/drivers/comedi_fc.c | 6 +- drivers/staging/comedi/drivers/comedi_rt_timer.c | 4 - drivers/staging/comedi/drivers/comedi_test.c | 2 drivers/staging/comedi/drivers/das16.c | 4 - drivers/staging/comedi/drivers/das16m1.c | 4 - drivers/staging/comedi/drivers/das1800.c | 4 - drivers/staging/comedi/drivers/das800.c | 4 - drivers/staging/comedi/drivers/gsc_hpdi.c | 6 +- drivers/staging/comedi/drivers/mite.c | 6 +- drivers/staging/comedi/drivers/mite.h | 8 +-- drivers/staging/comedi/drivers/ni_at_a2150.c | 4 - drivers/staging/comedi/drivers/ni_labpc.c | 8 +-- drivers/staging/comedi/drivers/ni_mio_common.c | 8 +-- drivers/staging/comedi/drivers/ni_pcidio.c | 2 drivers/staging/comedi/drivers/ni_tio.h | 2 drivers/staging/comedi/drivers/ni_tiocmd.c | 8 +-- drivers/staging/comedi/kcomedilib/get.c | 14 ++--- drivers/staging/comedi/kcomedilib/kcomedilib_main.c | 8 +-- 27 files changed, 127 insertions(+), 124 deletions(-) --- a/drivers/staging/comedi/comedidev.h +++ b/drivers/staging/comedi/comedidev.h @@ -121,7 +121,6 @@ #define COMEDI_NUM_BOARD_MINORS 0x30 #define COMEDI_FIRST_SUBDEVICE_MINOR COMEDI_NUM_BOARD_MINORS -typedef struct comedi_async_struct comedi_async; typedef struct comedi_driver_struct comedi_driver; typedef struct comedi_lrange_struct comedi_lrange; @@ -139,7 +138,7 @@ struct comedi_subdevice { void *private; - comedi_async *async; + struct comedi_async *async; void *lock; void *busy; @@ -196,7 +195,7 @@ struct comedi_buf_page { dma_addr_t dma_addr; }; -struct comedi_async_struct { +struct comedi_async { struct comedi_subdevice *subdevice; void *prealloc_buf; /* pre-allocated buffer */ @@ -469,31 +468,31 @@ static inline void comedi_set_hw_dev(str } } -int comedi_buf_put(comedi_async *async, short x); -int comedi_buf_get(comedi_async *async, short *x); +int comedi_buf_put(struct comedi_async *async, short x); +int comedi_buf_get(struct comedi_async *async, short *x); -unsigned int comedi_buf_write_n_available(comedi_async *async); -unsigned int comedi_buf_write_alloc(comedi_async *async, unsigned int nbytes); -unsigned int comedi_buf_write_alloc_strict(comedi_async *async, +unsigned int comedi_buf_write_n_available(struct comedi_async *async); +unsigned int comedi_buf_write_alloc(struct comedi_async *async, unsigned int nbytes); +unsigned int comedi_buf_write_alloc_strict(struct comedi_async *async, unsigned int nbytes); -unsigned comedi_buf_write_free(comedi_async *async, unsigned int nbytes); -unsigned comedi_buf_read_alloc(comedi_async *async, unsigned nbytes); -unsigned comedi_buf_read_free(comedi_async *async, unsigned int nbytes); -unsigned int comedi_buf_read_n_available(comedi_async *async); -void comedi_buf_memcpy_to(comedi_async *async, unsigned int offset, +unsigned comedi_buf_write_free(struct comedi_async *async, unsigned int nbytes); +unsigned comedi_buf_read_alloc(struct comedi_async *async, unsigned nbytes); +unsigned comedi_buf_read_free(struct comedi_async *async, unsigned int nbytes); +unsigned int comedi_buf_read_n_available(struct comedi_async *async); +void comedi_buf_memcpy_to(struct comedi_async *async, unsigned int offset, const void *source, unsigned int num_bytes); -void comedi_buf_memcpy_from(comedi_async *async, unsigned int offset, +void comedi_buf_memcpy_from(struct comedi_async *async, unsigned int offset, void *destination, unsigned int num_bytes); -static inline unsigned comedi_buf_write_n_allocated(comedi_async *async) +static inline unsigned comedi_buf_write_n_allocated(struct comedi_async *async) { return async->buf_write_alloc_count - async->buf_write_count; } -static inline unsigned comedi_buf_read_n_allocated(comedi_async *async) +static inline unsigned comedi_buf_read_n_allocated(struct comedi_async *async) { return async->buf_read_alloc_count - async->buf_read_count; } -void comedi_reset_async_buf(comedi_async *async); +void comedi_reset_async_buf(struct comedi_async *async); static inline void *comedi_aux_data(int options[], int n) { --- a/drivers/staging/comedi/comedi_fops.c +++ b/drivers/staging/comedi/comedi_fops.c @@ -275,7 +275,7 @@ static int do_devconfig_ioctl(struct com static int do_bufconfig_ioctl(struct comedi_device *dev, void *arg) { comedi_bufconfig bc; - comedi_async *async; + struct comedi_async *async; struct comedi_subdevice *s; int ret = 0; @@ -558,7 +558,7 @@ static int do_bufinfo_ioctl(struct comed { comedi_bufinfo bi; struct comedi_subdevice *s; - comedi_async *async; + struct comedi_async *async; if (copy_from_user(&bi, arg, sizeof(comedi_bufinfo))) return -EFAULT; @@ -979,7 +979,7 @@ static int do_cmd_ioctl(struct comedi_de { comedi_cmd user_cmd; struct comedi_subdevice *s; - comedi_async *async; + struct comedi_async *async; int ret = 0; unsigned int *chanlist_saver = NULL; @@ -1384,7 +1384,7 @@ static int do_cancel(struct comedi_devic void comedi_unmap(struct vm_area_struct *area) { - comedi_async *async; + struct comedi_async *async; struct comedi_device *dev; async = area->vm_private_data; @@ -1405,7 +1405,7 @@ static int comedi_mmap(struct file *file struct comedi_device_file_info *dev_file_info = comedi_get_device_file_info(minor); struct comedi_device *dev = dev_file_info->device; - comedi_async *async = NULL; + struct comedi_async *async = NULL; unsigned long start = vma->vm_start; unsigned long size; int n_pages; @@ -1524,7 +1524,7 @@ static ssize_t comedi_write(struct file loff_t *offset) { struct comedi_subdevice *s; - comedi_async *async; + struct comedi_async *async; int n, m, count = 0, retval = 0; DECLARE_WAITQUEUE(wait, current); const unsigned minor = iminor(file->f_dentry->d_inode); @@ -1626,7 +1626,7 @@ static ssize_t comedi_read(struct file * loff_t *offset) { struct comedi_subdevice *s; - comedi_async *async; + struct comedi_async *async; int n, m, count = 0, retval = 0; DECLARE_WAITQUEUE(wait, current); const unsigned minor = iminor(file->f_dentry->d_inode); @@ -1735,7 +1735,7 @@ done: */ void do_become_nonbusy(struct comedi_device *dev, struct comedi_subdevice *s) { - comedi_async *async = s->async; + struct comedi_async *async = s->async; comedi_set_subdevice_runflags(s, SRF_RUNNING, 0); #ifdef CONFIG_COMEDI_RT @@ -2008,7 +2008,7 @@ void comedi_error(const struct comedi_de void comedi_event(struct comedi_device *dev, struct comedi_subdevice *s) { - comedi_async *async = s->async; + struct comedi_async *async = s->async; unsigned runflags = 0; unsigned runflags_mask = 0; --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c @@ -1630,14 +1630,15 @@ void v_APCI3120_Interrupt(int irq, void +----------------------------------------------------------------------------+ */ -/*int i_APCI3120_InterruptHandleEos(struct comedi_device *dev) +/* + * int i_APCI3120_InterruptHandleEos(struct comedi_device *dev) { int n_chan,i; short *data; struct comedi_subdevice *s=dev->subdevices+0; - comedi_async *async = s->async; - data=async->data+async->buf_int_ptr;//new samples added from here onwards - n_chan=devpriv->ui_AiNbrofChannels; + struct comedi_async *async = s->async; + data=async->data+async->buf_int_ptr; + n_chan=devpriv->ui_AiNbrofChannels; for(i=0;iread_subdev; - comedi_async *async; + struct comedi_async *async; unsigned long irq_flags; unsigned char intcsr; --- a/drivers/staging/comedi/drivers/amplc_pci224.c +++ b/drivers/staging/comedi/drivers/amplc_pci224.c @@ -1185,7 +1185,7 @@ static void pci224_ao_munge(struct comedi_device * dev, struct comedi_subdevice * s, void *data, unsigned int num_bytes, unsigned int chan_index) { - comedi_async *async = s->async; + struct comedi_async *async = s->async; short *array = data; unsigned int length = num_bytes / sizeof(*array); unsigned int offset; --- a/drivers/staging/comedi/drivers/amplc_pci230.c +++ b/drivers/staging/comedi/drivers/amplc_pci230.c @@ -1450,7 +1450,7 @@ static int pci230_ao_inttrig_scan_begin( static void pci230_ao_start(struct comedi_device * dev, struct comedi_subdevice * s) { - comedi_async *async = s->async; + struct comedi_async *async = s->async; comedi_cmd *cmd = &async->cmd; unsigned long irqflags; @@ -2147,7 +2147,7 @@ static void pci230_ai_start(struct comed { unsigned long irqflags; unsigned short conv; - comedi_async *async = s->async; + struct comedi_async *async = s->async; comedi_cmd *cmd = &async->cmd; set_bit(AI_CMD_STARTED, &devpriv->state); @@ -2300,7 +2300,7 @@ static int pci230_ai_cmd(struct comedi_d unsigned char zgat; /* Get the command. */ - comedi_async *async = s->async; + struct comedi_async *async = s->async; comedi_cmd *cmd = &async->cmd; /* @@ -2626,7 +2626,7 @@ static void pci230_handle_ao_nofifo(stru { short data; int i, ret; - comedi_async *async = s->async; + struct comedi_async *async = s->async; comedi_cmd *cmd = &async->cmd; if (!devpriv->ao_continuous && (devpriv->ao_scan_count == 0)) { @@ -2661,7 +2661,7 @@ static void pci230_handle_ao_nofifo(stru /* Returns 0 if AO finished due to completion or error, 1 if still going. */ static int pci230_handle_ao_fifo(struct comedi_device * dev, struct comedi_subdevice * s) { - comedi_async *async = s->async; + struct comedi_async *async = s->async; comedi_cmd *cmd = &async->cmd; unsigned int num_scans; unsigned int room; @@ -2769,7 +2769,7 @@ static void pci230_handle_ai(struct come unsigned int i; unsigned int todo; unsigned int fifoamount; - comedi_async *async = s->async; + struct comedi_async *async = s->async; unsigned int scanlen = async->cmd.scan_end_arg; /* Determine number of samples to read. */ --- a/drivers/staging/comedi/drivers.c +++ b/drivers/staging/comedi/drivers.c @@ -228,7 +228,7 @@ static int postconfig(struct comedi_devi { int i; struct comedi_subdevice *s; - comedi_async *async = NULL; + struct comedi_async *async = NULL; int ret; for (i = 0; i < dev->n_subdevices; i++) { @@ -245,7 +245,7 @@ static int postconfig(struct comedi_devi SDF_CMD_WRITE)) == 0); BUG_ON(!s->do_cmdtest); - async = kzalloc(sizeof(comedi_async), GFP_KERNEL); + async = kzalloc(sizeof(struct comedi_async), GFP_KERNEL); if (async == NULL) { printk("failed to allocate async struct\n"); return -ENOMEM; @@ -415,7 +415,7 @@ static inline unsigned long kvirt_to_kva int comedi_buf_alloc(struct comedi_device *dev, struct comedi_subdevice *s, unsigned long new_size) { - comedi_async *async = s->async; + struct comedi_async *async = s->async; /* Round up new_size to multiple of PAGE_SIZE */ new_size = (new_size + PAGE_SIZE - 1) & PAGE_MASK; @@ -536,7 +536,7 @@ int comedi_buf_alloc(struct comedi_devic /* munging is applied to data by core as it passes between user * and kernel space */ -unsigned int comedi_buf_munge(comedi_async *async, unsigned int num_bytes) +unsigned int comedi_buf_munge(struct comedi_async *async, unsigned int num_bytes) { struct comedi_subdevice *s = async->subdevice; unsigned int count = 0; @@ -580,7 +580,7 @@ unsigned int comedi_buf_munge(comedi_asy return count; } -unsigned int comedi_buf_write_n_available(comedi_async *async) +unsigned int comedi_buf_write_n_available(struct comedi_async *async) { unsigned int free_end; unsigned int nbytes; @@ -600,7 +600,7 @@ unsigned int comedi_buf_write_n_availabl } /* allocates chunk for the writer from free buffer space */ -unsigned int comedi_buf_write_alloc(comedi_async *async, unsigned int nbytes) +unsigned int comedi_buf_write_alloc(struct comedi_async *async, unsigned int nbytes) { unsigned int free_end = async->buf_read_count + async->prealloc_bufsz; @@ -615,7 +615,7 @@ unsigned int comedi_buf_write_alloc(come } /* allocates nothing unless it can completely fulfill the request */ -unsigned int comedi_buf_write_alloc_strict(comedi_async *async, +unsigned int comedi_buf_write_alloc_strict(struct comedi_async *async, unsigned int nbytes) { unsigned int free_end = async->buf_read_count + async->prealloc_bufsz; @@ -631,7 +631,7 @@ unsigned int comedi_buf_write_alloc_stri } /* transfers a chunk from writer to filled buffer space */ -unsigned comedi_buf_write_free(comedi_async *async, unsigned int nbytes) +unsigned comedi_buf_write_free(struct comedi_async *async, unsigned int nbytes) { if ((int)(async->buf_write_count + nbytes - async->buf_write_alloc_count) > 0) { @@ -649,7 +649,7 @@ unsigned comedi_buf_write_free(comedi_as } /* allocates a chunk for the reader from filled (and munged) buffer space */ -unsigned comedi_buf_read_alloc(comedi_async *async, unsigned nbytes) +unsigned comedi_buf_read_alloc(struct comedi_async *async, unsigned nbytes) { if ((int)(async->buf_read_alloc_count + nbytes - async->munge_count) > 0) { @@ -663,7 +663,7 @@ unsigned comedi_buf_read_alloc(comedi_as } /* transfers control of a chunk from reader to free buffer space */ -unsigned comedi_buf_read_free(comedi_async *async, unsigned int nbytes) +unsigned comedi_buf_read_free(struct comedi_async *async, unsigned int nbytes) { /* barrier insures data has been read out of buffer before read count is incremented */ smp_mb(); @@ -679,7 +679,7 @@ unsigned comedi_buf_read_free(comedi_asy return nbytes; } -void comedi_buf_memcpy_to(comedi_async *async, unsigned int offset, +void comedi_buf_memcpy_to(struct comedi_async *async, unsigned int offset, const void *data, unsigned int num_bytes) { unsigned int write_ptr = async->buf_write_ptr + offset; @@ -704,7 +704,7 @@ void comedi_buf_memcpy_to(comedi_async * } } -void comedi_buf_memcpy_from(comedi_async *async, unsigned int offset, +void comedi_buf_memcpy_from(struct comedi_async *async, unsigned int offset, void *dest, unsigned int nbytes) { void *src; @@ -730,7 +730,7 @@ void comedi_buf_memcpy_from(comedi_async } } -unsigned int comedi_buf_read_n_available(comedi_async *async) +unsigned int comedi_buf_read_n_available(struct comedi_async *async) { unsigned num_bytes; @@ -745,7 +745,7 @@ unsigned int comedi_buf_read_n_available return num_bytes; } -int comedi_buf_get(comedi_async *async, short *x) +int comedi_buf_get(struct comedi_async *async, short *x) { unsigned int n = comedi_buf_read_n_available(async); @@ -757,7 +757,7 @@ int comedi_buf_get(comedi_async *async, return 1; } -int comedi_buf_put(comedi_async *async, short x) +int comedi_buf_put(struct comedi_async *async, short x) { unsigned int n = comedi_buf_write_alloc_strict(async, sizeof(short)); @@ -770,7 +770,7 @@ int comedi_buf_put(comedi_async *async, return 1; } -void comedi_reset_async_buf(comedi_async *async) +void comedi_reset_async_buf(struct comedi_async *async) { async->buf_write_alloc_count = 0; async->buf_write_count = 0; --- a/drivers/staging/comedi/drivers/cb_pcidas64.c +++ b/drivers/staging/comedi/drivers/cb_pcidas64.c @@ -2681,7 +2681,7 @@ static inline void load_first_dma_descri static int ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s) { - comedi_async *async = s->async; + struct comedi_async *async = s->async; comedi_cmd *cmd = &async->cmd; uint32_t bits; unsigned int i; @@ -2800,7 +2800,7 @@ static int ai_cmd(struct comedi_device * static void pio_drain_ai_fifo_16(struct comedi_device * dev) { struct comedi_subdevice *s = dev->read_subdev; - comedi_async *async = s->async; + struct comedi_async *async = s->async; comedi_cmd *cmd = &async->cmd; unsigned int i; uint16_t prepost_bits; @@ -2867,7 +2867,7 @@ static void pio_drain_ai_fifo_16(struct static void pio_drain_ai_fifo_32(struct comedi_device * dev) { struct comedi_subdevice *s = dev->read_subdev; - comedi_async *async = s->async; + struct comedi_async *async = s->async; comedi_cmd *cmd = &async->cmd; unsigned int i; unsigned int max_transfer = 100000; @@ -2908,7 +2908,7 @@ static void pio_drain_ai_fifo(struct com static void drain_dma_buffers(struct comedi_device * dev, unsigned int channel) { - comedi_async *async = dev->read_subdev->async; + struct comedi_async *async = dev->read_subdev->async; uint32_t next_transfer_addr; int j; int num_samples = 0; @@ -2956,7 +2956,7 @@ void handle_ai_interrupt(struct comedi_d unsigned int plx_status) { struct comedi_subdevice *s = dev->read_subdev; - comedi_async *async = s->async; + struct comedi_async *async = s->async; comedi_cmd *cmd = &async->cmd; uint8_t dma1_status; unsigned long flags; @@ -3078,7 +3078,7 @@ static void handle_ao_interrupt(struct c unsigned int plx_status) { struct comedi_subdevice *s = dev->write_subdev; - comedi_async *async; + struct comedi_async *async; comedi_cmd *cmd; uint8_t dma0_status; unsigned long flags; --- a/drivers/staging/comedi/drivers/cb_pcidas.c +++ b/drivers/staging/comedi/drivers/cb_pcidas.c @@ -449,7 +449,7 @@ static comedi_driver driver_cb_pcidas = detach:cb_pcidas_detach, }; -static int cb_pcidas_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s, +static int cb_pcidas_ai_rinsn(struct comedi_device *dev, struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data); static int ai_config_insn(struct comedi_device * dev, struct comedi_subdevice * s, comedi_insn * insn, unsigned int * data); @@ -463,8 +463,9 @@ static int cb_pcidas_ai_cmd(struct comed static int cb_pcidas_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, comedi_cmd * cmd); static int cb_pcidas_ao_cmd(struct comedi_device * dev, struct comedi_subdevice * s); -static int cb_pcidas_ao_inttrig(struct comedi_device * dev, struct comedi_subdevice * subdev, - unsigned int trig_num); +static int cb_pcidas_ao_inttrig(struct comedi_device *dev, + struct comedi_subdevice *subdev, + unsigned int trig_num); static int cb_pcidas_ao_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, comedi_cmd * cmd); static irqreturn_t cb_pcidas_interrupt(int irq, void *d PT_REGS_ARG); @@ -1164,7 +1165,7 @@ static int cb_pcidas_ai_cmdtest(struct c static int cb_pcidas_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s) { - comedi_async *async = s->async; + struct comedi_async *async = s->async; comedi_cmd *cmd = &async->cmd; unsigned int bits; unsigned long flags; @@ -1364,7 +1365,7 @@ static int cb_pcidas_ao_cmdtest(struct c static int cb_pcidas_ao_cmd(struct comedi_device * dev, struct comedi_subdevice * s) { - comedi_async *async = s->async; + struct comedi_async *async = s->async; comedi_cmd *cmd = &async->cmd; unsigned int i; unsigned long flags; @@ -1425,11 +1426,12 @@ static int cb_pcidas_ao_cmd(struct comed return 0; } -static int cb_pcidas_ao_inttrig(struct comedi_device * dev, struct comedi_subdevice * s, - unsigned int trig_num) +static int cb_pcidas_ao_inttrig(struct comedi_device *dev, + struct comedi_subdevice *s, + unsigned int trig_num) { unsigned int num_bytes, num_points = thisboard->fifo_size; - comedi_async *async = s->async; + struct comedi_async *async = s->async; comedi_cmd *cmd = &s->async->cmd; unsigned long flags; @@ -1478,7 +1480,7 @@ static irqreturn_t cb_pcidas_interrupt(i { struct comedi_device *dev = (struct comedi_device *) d; struct comedi_subdevice *s = dev->read_subdev; - comedi_async *async; + struct comedi_async *async; int status, s5933_status; int half_fifo = thisboard->fifo_size / 2; unsigned int num_samples, i; @@ -1589,7 +1591,7 @@ static irqreturn_t cb_pcidas_interrupt(i static void handle_ao_interrupt(struct comedi_device * dev, unsigned int status) { struct comedi_subdevice *s = dev->write_subdev; - comedi_async *async = s->async; + struct comedi_async *async = s->async; comedi_cmd *cmd = &async->cmd; unsigned int half_fifo = thisboard->fifo_size / 2; unsigned int num_points; @@ -1642,7 +1644,7 @@ static void handle_ao_interrupt(struct c comedi_event(dev, s); } -// cancel analog input command +/* cancel analog input command */ static int cb_pcidas_cancel(struct comedi_device * dev, struct comedi_subdevice * s) { unsigned long flags; @@ -1661,8 +1663,9 @@ static int cb_pcidas_cancel(struct comed return 0; } -// cancel analog output command -static int cb_pcidas_ao_cancel(struct comedi_device * dev, struct comedi_subdevice * s) +/* cancel analog output command */ +static int cb_pcidas_ao_cancel(struct comedi_device *dev, + struct comedi_subdevice *s) { unsigned long flags; --- a/drivers/staging/comedi/drivers/comedi_fc.c +++ b/drivers/staging/comedi/drivers/comedi_fc.c @@ -31,7 +31,7 @@ static void increment_scan_progress(struct comedi_subdevice *subd, unsigned int num_bytes) { - comedi_async *async = subd->async; + struct comedi_async *async = subd->async; unsigned int scan_length = cfc_bytes_per_scan(subd); async->scan_progress += num_bytes; @@ -45,7 +45,7 @@ static void increment_scan_progress(stru unsigned int cfc_write_array_to_buffer(struct comedi_subdevice *subd, void *data, unsigned int num_bytes) { - comedi_async *async = subd->async; + struct comedi_async *async = subd->async; unsigned int retval; if (num_bytes == 0) @@ -70,7 +70,7 @@ EXPORT_SYMBOL(cfc_write_array_to_buffer) unsigned int cfc_read_array_from_buffer(struct comedi_subdevice *subd, void *data, unsigned int num_bytes) { - comedi_async *async = subd->async; + struct comedi_async *async = subd->async; if (num_bytes == 0) return 0; --- a/drivers/staging/comedi/drivers/comedi_rt_timer.c +++ b/drivers/staging/comedi/drivers/comedi_rt_timer.c @@ -292,7 +292,7 @@ static void scan_task_func(comedi_rt_tas { struct comedi_device *dev = (struct comedi_device *) d; struct comedi_subdevice *s = dev->subdevices + 0; - comedi_async *async = s->async; + struct comedi_async *async = s->async; comedi_cmd *cmd = &async->cmd; int i, ret; unsigned long long n; @@ -580,7 +580,7 @@ static int timer_inttrig(struct comedi_d static int timer_start_cmd(struct comedi_device * dev, struct comedi_subdevice * s) { - comedi_async *async = s->async; + struct comedi_async *async = s->async; comedi_cmd *cmd = &async->cmd; RTIME now, delay, period; int ret; --- a/drivers/staging/comedi/drivers/comedi_test.c +++ b/drivers/staging/comedi/drivers/comedi_test.c @@ -144,7 +144,7 @@ static const comedi_lrange waveform_ai_r static void waveform_ai_interrupt(unsigned long arg) { struct comedi_device *dev = (struct comedi_device *) arg; - comedi_async *async = dev->read_subdev->async; + struct comedi_async *async = dev->read_subdev->async; comedi_cmd *cmd = &async->cmd; unsigned int i, j; /* all times in microsec */ --- a/drivers/staging/comedi/drivers/das16.c +++ b/drivers/staging/comedi/drivers/das16.c @@ -895,7 +895,7 @@ static int das16_cmd_test(struct comedi_ static int das16_cmd_exec(struct comedi_device * dev, struct comedi_subdevice * s) { - comedi_async *async = s->async; + struct comedi_async *async = s->async; comedi_cmd *cmd = &async->cmd; unsigned int byte; unsigned long flags; @@ -1201,7 +1201,7 @@ static void das16_interrupt(struct comed { unsigned long dma_flags, spin_flags; struct comedi_subdevice *s = dev->read_subdev; - comedi_async *async; + struct comedi_async *async; comedi_cmd *cmd; int num_bytes, residue; int buffer_index; --- a/drivers/staging/comedi/drivers/das16m1.c +++ b/drivers/staging/comedi/drivers/das16m1.c @@ -324,7 +324,7 @@ static int das16m1_cmd_test(struct comed static int das16m1_cmd_exec(struct comedi_device * dev, struct comedi_subdevice * s) { - comedi_async *async = s->async; + struct comedi_async *async = s->async; comedi_cmd *cmd = &async->cmd; unsigned int byte, i; @@ -517,7 +517,7 @@ static void munge_sample_array(short * a static void das16m1_handler(struct comedi_device * dev, unsigned int status) { struct comedi_subdevice *s; - comedi_async *async; + struct comedi_async *async; comedi_cmd *cmd; u16 num_samples; u16 hw_counter; --- a/drivers/staging/comedi/drivers/das1800.c +++ b/drivers/staging/comedi/drivers/das1800.c @@ -912,7 +912,7 @@ static irqreturn_t das1800_interrupt(int static void das1800_ai_handler(struct comedi_device * dev) { struct comedi_subdevice *s = dev->subdevices + 0; /* analog input subdevice */ - comedi_async *async = s->async; + struct comedi_async *async = s->async; comedi_cmd *cmd = &async->cmd; unsigned int status = inb(dev->iobase + DAS1800_STATUS); @@ -1493,7 +1493,7 @@ static int das1800_ai_do_cmd(struct come { int ret; int control_a, control_c; - comedi_async *async = s->async; + struct comedi_async *async = s->async; comedi_cmd cmd = async->cmd; if (!dev->irq) { --- a/drivers/staging/comedi/drivers/das800.c +++ b/drivers/staging/comedi/drivers/das800.c @@ -349,7 +349,7 @@ static irqreturn_t das800_interrupt(int short dataPoint = 0; struct comedi_device *dev = d; struct comedi_subdevice *s = dev->read_subdev; /* analog input subdevice */ - comedi_async *async; + struct comedi_async *async; int status; unsigned long irq_flags; static const int max_loops = 128; // half-fifo size for cio-das802/16 @@ -714,7 +714,7 @@ static int das800_ai_do_cmd(struct comed int startChan, endChan, scan, gain; int conv_bits; unsigned long irq_flags; - comedi_async *async = s->async; + struct comedi_async *async = s->async; if (!dev->irq) { comedi_error(dev, --- a/drivers/staging/comedi/drivers/gsc_hpdi.c +++ b/drivers/staging/comedi/drivers/gsc_hpdi.c @@ -838,7 +838,7 @@ static int di_cmd(struct comedi_device * { uint32_t bits; unsigned long flags; - comedi_async *async = s->async; + struct comedi_async *async = s->async; comedi_cmd *cmd = &async->cmd; hpdi_writel(dev, RX_FIFO_RESET_BIT, BOARD_CONTROL_REG); @@ -897,7 +897,7 @@ static int hpdi_cmd(struct comedi_device static void drain_dma_buffers(struct comedi_device * dev, unsigned int channel) { - comedi_async *async = dev->read_subdev->async; + struct comedi_async *async = dev->read_subdev->async; uint32_t next_transfer_addr; int j; int num_samples = 0; @@ -945,7 +945,7 @@ static irqreturn_t handle_interrupt(int { struct comedi_device *dev = d; struct comedi_subdevice *s = dev->read_subdev; - comedi_async *async = s->async; + struct comedi_async *async = s->async; uint32_t hpdi_intr_status, hpdi_board_status; uint32_t plx_status; uint32_t plx_bits; --- a/drivers/staging/comedi/drivers/mite.c +++ b/drivers/staging/comedi/drivers/mite.c @@ -317,7 +317,7 @@ void mite_dma_arm(struct mite_channel *m /**************************************/ -int mite_buf_change(struct mite_dma_descriptor_ring *ring, comedi_async * async) +int mite_buf_change(struct mite_dma_descriptor_ring *ring, struct comedi_async * async) { unsigned int n_links; int i; @@ -526,7 +526,7 @@ void mite_dma_disarm(struct mite_channel writel(chor, mite->mite_io_addr + MITE_CHOR(mite_chan->channel)); } -int mite_sync_input_dma(struct mite_channel *mite_chan, comedi_async * async) +int mite_sync_input_dma(struct mite_channel *mite_chan, struct comedi_async * async) { int count; unsigned int nbytes, old_alloc_count; @@ -561,7 +561,7 @@ int mite_sync_input_dma(struct mite_chan return 0; } -int mite_sync_output_dma(struct mite_channel *mite_chan, comedi_async * async) +int mite_sync_output_dma(struct mite_channel *mite_chan, struct comedi_async * async) { int count; u32 nbytes_ub, nbytes_lb; --- a/drivers/staging/comedi/drivers/mite.h +++ b/drivers/staging/comedi/drivers/mite.h @@ -142,8 +142,8 @@ void mite_release_channel(struct mite_ch unsigned mite_dma_tcr(struct mite_channel *mite_chan); void mite_dma_arm(struct mite_channel *mite_chan); void mite_dma_disarm(struct mite_channel *mite_chan); -int mite_sync_input_dma(struct mite_channel *mite_chan, comedi_async * async); -int mite_sync_output_dma(struct mite_channel *mite_chan, comedi_async * async); +int mite_sync_input_dma(struct mite_channel *mite_chan, struct comedi_async * async); +int mite_sync_output_dma(struct mite_channel *mite_chan, struct comedi_async * async); u32 mite_bytes_written_to_memory_lb(struct mite_channel *mite_chan); u32 mite_bytes_written_to_memory_ub(struct mite_channel *mite_chan); u32 mite_bytes_read_from_memory_lb(struct mite_channel *mite_chan); @@ -153,7 +153,7 @@ unsigned mite_get_status(struct mite_cha int mite_done(struct mite_channel *mite_chan); #if 0 -unsigned long mite_ll_from_kvmem(struct mite_struct *mite, comedi_async * async, +unsigned long mite_ll_from_kvmem(struct mite_struct *mite, struct comedi_async * async, int len); void mite_setregs(struct mite_struct *mite, unsigned long ll_start, int chan, int dir); @@ -162,7 +162,7 @@ void mite_setregs(struct mite_struct *mi void mite_prep_dma(struct mite_channel *mite_chan, unsigned int num_device_bits, unsigned int num_memory_bits); int mite_buf_change(struct mite_dma_descriptor_ring *ring, - comedi_async *async); + struct comedi_async *async); #ifdef DEBUG_MITE void mite_print_chsr(unsigned int chsr); --- a/drivers/staging/comedi/drivers/ni_at_a2150.c +++ b/drivers/staging/comedi/drivers/ni_at_a2150.c @@ -214,7 +214,7 @@ static irqreturn_t a2150_interrupt(int i unsigned long flags; struct comedi_device *dev = d; struct comedi_subdevice *s = dev->read_subdev; - comedi_async *async; + struct comedi_async *async; comedi_cmd *cmd; unsigned int max_points, num_points, residue, leftover; short dpnt; @@ -617,7 +617,7 @@ static int a2150_ai_cmdtest(struct comed static int a2150_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s) { - comedi_async *async = s->async; + struct comedi_async *async = s->async; comedi_cmd *cmd = &async->cmd; unsigned long lock_flags; unsigned int old_config_bits = devpriv->config_bits; --- a/drivers/staging/comedi/drivers/ni_labpc.c +++ b/drivers/staging/comedi/drivers/ni_labpc.c @@ -1068,7 +1068,7 @@ static int labpc_ai_cmd(struct comedi_de int channel, range, aref; unsigned long irq_flags; int ret; - comedi_async *async = s->async; + struct comedi_async *async = s->async; comedi_cmd *cmd = &async->cmd; enum transfer_type xfer; unsigned long flags; @@ -1313,7 +1313,7 @@ static irqreturn_t labpc_interrupt(int i { struct comedi_device *dev = d; struct comedi_subdevice *s = dev->read_subdev; - comedi_async *async; + struct comedi_async *async; comedi_cmd *cmd; if (dev->attached == 0) { @@ -1397,7 +1397,7 @@ static int labpc_drain_fifo(struct comed { unsigned int lsb, msb; short data; - comedi_async *async = dev->read_subdev->async; + struct comedi_async *async = dev->read_subdev->async; const int timeout = 10000; unsigned int i; @@ -1430,7 +1430,7 @@ static int labpc_drain_fifo(struct comed static void labpc_drain_dma(struct comedi_device * dev) { struct comedi_subdevice *s = dev->read_subdev; - comedi_async *async = s->async; + struct comedi_async *async = s->async; int status; unsigned long flags; unsigned int max_points, num_points, residue, leftover; --- a/drivers/staging/comedi/drivers/ni_mio_common.c +++ b/drivers/staging/comedi/drivers/ni_mio_common.c @@ -1206,7 +1206,7 @@ static void ni_mio_print_status_b(int st static void ni_ao_fifo_load(struct comedi_device * dev, struct comedi_subdevice * s, int n) { - comedi_async *async = s->async; + struct comedi_async *async = s->async; comedi_cmd *cmd = &async->cmd; int chan; int i; @@ -1309,7 +1309,7 @@ static int ni_ao_prep_fifo(struct comedi static void ni_ai_fifo_read(struct comedi_device * dev, struct comedi_subdevice * s, int n) { - comedi_async *async = s->async; + struct comedi_async *async = s->async; int i; if (boardtype.reg_type == ni_reg_611x) { @@ -1516,7 +1516,7 @@ static void get_last_sample_6143(struct static void ni_ai_munge(struct comedi_device * dev, struct comedi_subdevice * s, void *data, unsigned int num_bytes, unsigned int chan_index) { - comedi_async *async = s->async; + struct comedi_async *async = s->async; unsigned int i; unsigned int length = num_bytes / bytes_per_sample(s); short *array = data; @@ -2780,7 +2780,7 @@ static int ni_ai_config_analog_trig(stru static void ni_ao_munge(struct comedi_device * dev, struct comedi_subdevice * s, void *data, unsigned int num_bytes, unsigned int chan_index) { - comedi_async *async = s->async; + struct comedi_async *async = s->async; unsigned int range; unsigned int i; unsigned int offset; --- a/drivers/staging/comedi/drivers/ni_pcidio.c +++ b/drivers/staging/comedi/drivers/ni_pcidio.c @@ -481,7 +481,7 @@ static irqreturn_t nidio_interrupt(int i { struct comedi_device *dev = d; struct comedi_subdevice *s = dev->subdevices; - comedi_async *async = s->async; + struct comedi_async *async = s->async; struct mite_struct *mite = devpriv->mite; //int i, j; --- a/drivers/staging/comedi/drivers/ni_tiocmd.c +++ b/drivers/staging/comedi/drivers/ni_tiocmd.c @@ -121,7 +121,7 @@ static int ni_tio_input_inttrig(struct c return retval; } -static int ni_tio_input_cmd(struct ni_gpct *counter, comedi_async * async) +static int ni_tio_input_cmd(struct ni_gpct *counter, struct comedi_async *async) { struct ni_gpct_device *counter_dev = counter->counter_dev; comedi_cmd *cmd = &async->cmd; @@ -169,7 +169,7 @@ static int ni_tio_input_cmd(struct ni_gp return retval; } -static int ni_tio_output_cmd(struct ni_gpct *counter, comedi_async * async) +static int ni_tio_output_cmd(struct ni_gpct *counter, struct comedi_async *async) { rt_printk("ni_tio: output commands not yet implemented.\n"); return -ENOTSUPP; @@ -181,7 +181,7 @@ static int ni_tio_output_cmd(struct ni_g return ni_tio_arm(counter, 1, NI_GPCT_ARM_IMMEDIATE); } -static int ni_tio_cmd_setup(struct ni_gpct *counter, comedi_async * async) +static int ni_tio_cmd_setup(struct ni_gpct *counter, struct comedi_async *async) { comedi_cmd *cmd = &async->cmd; int set_gate_source = 0; @@ -207,7 +207,7 @@ static int ni_tio_cmd_setup(struct ni_gp return retval; } -int ni_tio_cmd(struct ni_gpct *counter, comedi_async * async) +int ni_tio_cmd(struct ni_gpct *counter, struct comedi_async *async) { comedi_cmd *cmd = &async->cmd; int retval = 0; --- a/drivers/staging/comedi/drivers/ni_tio.h +++ b/drivers/staging/comedi/drivers/ni_tio.h @@ -145,7 +145,7 @@ extern int ni_tio_insn_config(struct ni_ comedi_insn * insn, unsigned int * data); extern int ni_tio_winsn(struct ni_gpct *counter, comedi_insn * insn, unsigned int * data); -extern int ni_tio_cmd(struct ni_gpct *counter, comedi_async * async); +extern int ni_tio_cmd(struct ni_gpct *counter, struct comedi_async *async); extern int ni_tio_cmdtest(struct ni_gpct *counter, comedi_cmd * cmd); extern int ni_tio_cancel(struct ni_gpct *counter); extern void ni_tio_handle_interrupt(struct ni_gpct *counter, --- a/drivers/staging/comedi/kcomedilib/get.c +++ b/drivers/staging/comedi/kcomedilib/get.c @@ -175,7 +175,7 @@ unsigned int comedi_get_buf_head_pos(voi { struct comedi_device *dev = (struct comedi_device *) d; struct comedi_subdevice *s = dev->subdevices + subdevice; - comedi_async *async; + struct comedi_async *async; async = s->async; if (async == NULL) @@ -188,7 +188,7 @@ int comedi_get_buffer_contents(void *d, { struct comedi_device *dev = (struct comedi_device *) d; struct comedi_subdevice *s = dev->subdevices + subdevice; - comedi_async *async; + struct comedi_async *async; unsigned int num_bytes; if (subdevice >= dev->n_subdevices) @@ -208,7 +208,7 @@ int comedi_set_user_int_count(void *d, u { struct comedi_device *dev = (struct comedi_device *) d; struct comedi_subdevice *s = dev->subdevices + subdevice; - comedi_async *async; + struct comedi_async *async; int num_bytes; async = s->async; @@ -229,7 +229,7 @@ int comedi_mark_buffer_read(void *d, uns { struct comedi_device *dev = (struct comedi_device *) d; struct comedi_subdevice *s = dev->subdevices + subdevice; - comedi_async *async; + struct comedi_async *async; if (subdevice >= dev->n_subdevices) return -1; @@ -248,7 +248,7 @@ int comedi_mark_buffer_written(void *d, { struct comedi_device *dev = (struct comedi_device *) d; struct comedi_subdevice *s = dev->subdevices + subdevice; - comedi_async *async; + struct comedi_async *async; int bytes_written; if (subdevice >= dev->n_subdevices) @@ -267,7 +267,7 @@ int comedi_get_buffer_size(void *d, unsi { struct comedi_device *dev = (struct comedi_device *) d; struct comedi_subdevice *s = dev->subdevices + subdev; - comedi_async *async; + struct comedi_async *async; if (subdev >= dev->n_subdevices) return -1; @@ -282,7 +282,7 @@ int comedi_get_buffer_offset(void *d, un { struct comedi_device *dev = (struct comedi_device *) d; struct comedi_subdevice *s = dev->subdevices + subdevice; - comedi_async *async; + struct comedi_async *async; if (subdevice >= dev->n_subdevices) return -1; --- a/drivers/staging/comedi/kcomedilib/kcomedilib_main.c +++ b/drivers/staging/comedi/kcomedilib/kcomedilib_main.c @@ -125,7 +125,7 @@ int comedi_command(void *d, comedi_cmd * { struct comedi_device *dev = (struct comedi_device *) d; struct comedi_subdevice *s; - comedi_async *async; + struct comedi_async *async; unsigned runflags; if (cmd->subdev >= dev->n_subdevices) @@ -372,7 +372,7 @@ int comedi_unlock(void *d, unsigned int struct comedi_device *dev = (struct comedi_device *) d; struct comedi_subdevice *s; unsigned long flags; - comedi_async *async; + struct comedi_async *async; int ret; if (subdevice >= dev->n_subdevices) @@ -469,7 +469,7 @@ int comedi_register_callback(void *d, un { struct comedi_device *dev = (struct comedi_device *) d; struct comedi_subdevice *s; - comedi_async *async; + struct comedi_async *async; if (subdevice >= dev->n_subdevices) return -EINVAL; @@ -505,7 +505,7 @@ int comedi_poll(void *d, unsigned int su { struct comedi_device *dev = (struct comedi_device *) d; struct comedi_subdevice *s = dev->subdevices; - comedi_async *async; + struct comedi_async *async; if (subdevice >= dev->n_subdevices) return -EINVAL;