summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorBill Pemberton <wfp5p@virginia.edu>2009-03-16 22:05:08 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-04-03 14:53:56 -0700
commit71b5f4f11971dea972832ad63a994c7e5b45db6b (patch)
treea96c8f252e3109b42f9074a9a477c23ce9745ebb /drivers
parent790c55415aa31f4c732729f94d2c3a54f7d3bfc2 (diff)
Staging: comedi: Remove comedi_device typedef
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/comedi/comedi_fops.c108
-rw-r--r--drivers/staging/comedi/comedi_rt.h8
-rw-r--r--drivers/staging/comedi/comedidev.h67
-rw-r--r--drivers/staging/comedi/drivers.c28
-rw-r--r--drivers/staging/comedi/drivers/8255.c30
-rw-r--r--drivers/staging/comedi/drivers/8255.h12
-rw-r--r--drivers/staging/comedi/drivers/acl7225b.c12
-rw-r--r--drivers/staging/comedi/drivers/addi-data/APCI1710_82x54.c24
-rw-r--r--drivers/staging/comedi/drivers/addi-data/APCI1710_82x54.h16
-rw-r--r--drivers/staging/comedi/drivers/addi-data/APCI1710_Chrono.c20
-rw-r--r--drivers/staging/comedi/drivers/addi-data/APCI1710_Chrono.h14
-rw-r--r--drivers/staging/comedi/drivers/addi-data/APCI1710_Dig_io.c14
-rw-r--r--drivers/staging/comedi/drivers/addi-data/APCI1710_Dig_io.h8
-rw-r--r--drivers/staging/comedi/drivers/addi-data/APCI1710_INCCPT.c88
-rw-r--r--drivers/staging/comedi/drivers/addi-data/APCI1710_INCCPT.h80
-rw-r--r--drivers/staging/comedi/drivers/addi-data/APCI1710_Inp_cpt.c8
-rw-r--r--drivers/staging/comedi/drivers/addi-data/APCI1710_Inp_cpt.h8
-rw-r--r--drivers/staging/comedi/drivers/addi-data/APCI1710_Pwm.c22
-rw-r--r--drivers/staging/comedi/drivers/addi-data/APCI1710_Pwm.h18
-rw-r--r--drivers/staging/comedi/drivers/addi-data/APCI1710_Ssi.c8
-rw-r--r--drivers/staging/comedi/drivers/addi-data/APCI1710_Ssi.h6
-rw-r--r--drivers/staging/comedi/drivers/addi-data/APCI1710_Tor.c8
-rw-r--r--drivers/staging/comedi/drivers/addi-data/APCI1710_Tor.h8
-rw-r--r--drivers/staging/comedi/drivers/addi-data/APCI1710_Ttl.c10
-rw-r--r--drivers/staging/comedi/drivers/addi-data/APCI1710_Ttl.h8
-rw-r--r--drivers/staging/comedi/drivers/addi-data/addi_common.c26
-rw-r--r--drivers/staging/comedi/drivers/addi-data/addi_common.h62
-rw-r--r--drivers/staging/comedi/drivers/addi-data/addi_eeprom.c8
-rw-r--r--drivers/staging/comedi/drivers/addi-data/hwdrv_APCI1710.c8
-rw-r--r--drivers/staging/comedi/drivers/addi-data/hwdrv_apci035.c36
-rw-r--r--drivers/staging/comedi/drivers/addi-data/hwdrv_apci035.h12
-rw-r--r--drivers/staging/comedi/drivers/addi-data/hwdrv_apci1032.c26
-rw-r--r--drivers/staging/comedi/drivers/addi-data/hwdrv_apci1032.h8
-rw-r--r--drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.c72
-rw-r--r--drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.h24
-rw-r--r--drivers/staging/comedi/drivers/addi-data/hwdrv_apci1516.c54
-rw-r--r--drivers/staging/comedi/drivers/addi-data/hwdrv_apci1516.h18
-rw-r--r--drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c66
-rw-r--r--drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.h22
-rw-r--r--drivers/staging/comedi/drivers/addi-data/hwdrv_apci16xx.c22
-rw-r--r--drivers/staging/comedi/drivers/addi-data/hwdrv_apci16xx.h10
-rw-r--r--drivers/staging/comedi/drivers/addi-data/hwdrv_apci2016.c42
-rw-r--r--drivers/staging/comedi/drivers/addi-data/hwdrv_apci2016.h14
-rw-r--r--drivers/staging/comedi/drivers/addi-data/hwdrv_apci2032.c44
-rw-r--r--drivers/staging/comedi/drivers/addi-data/hwdrv_apci2032.h16
-rw-r--r--drivers/staging/comedi/drivers/addi-data/hwdrv_apci2200.c54
-rw-r--r--drivers/staging/comedi/drivers/addi-data/hwdrv_apci2200.h18
-rw-r--r--drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c130
-rw-r--r--drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.h52
-rw-r--r--drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c116
-rw-r--r--drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.h34
-rw-r--r--drivers/staging/comedi/drivers/addi-data/hwdrv_apci3501.c60
-rw-r--r--drivers/staging/comedi/drivers/addi-data/hwdrv_apci3501.h22
-rw-r--r--drivers/staging/comedi/drivers/addi-data/hwdrv_apci3xxx.c64
-rw-r--r--drivers/staging/comedi/drivers/adl_pci6208.c28
-rw-r--r--drivers/staging/comedi/drivers/adl_pci7296.c8
-rw-r--r--drivers/staging/comedi/drivers/adl_pci7432.c16
-rw-r--r--drivers/staging/comedi/drivers/adl_pci8164.c40
-rw-r--r--drivers/staging/comedi/drivers/adl_pci9111.c42
-rw-r--r--drivers/staging/comedi/drivers/adl_pci9118.c80
-rw-r--r--drivers/staging/comedi/drivers/adq12b.c20
-rw-r--r--drivers/staging/comedi/drivers/adv_pci1710.c64
-rw-r--r--drivers/staging/comedi/drivers/adv_pci1723.c18
-rw-r--r--drivers/staging/comedi/drivers/adv_pci_dio.c42
-rw-r--r--drivers/staging/comedi/drivers/aio_aio12_8.c10
-rw-r--r--drivers/staging/comedi/drivers/aio_iiro_16.c16
-rw-r--r--drivers/staging/comedi/drivers/amplc_dio200.c44
-rw-r--r--drivers/staging/comedi/drivers/amplc_pc236.c42
-rw-r--r--drivers/staging/comedi/drivers/amplc_pc263.c20
-rw-r--r--drivers/staging/comedi/drivers/amplc_pci224.c36
-rw-r--r--drivers/staging/comedi/drivers/amplc_pci230.c110
-rw-r--r--drivers/staging/comedi/drivers/c6xdigio.c22
-rw-r--r--drivers/staging/comedi/drivers/cb_das16_cs.c50
-rw-r--r--drivers/staging/comedi/drivers/cb_pcidas.c126
-rw-r--r--drivers/staging/comedi/drivers/cb_pcidas64.c254
-rw-r--r--drivers/staging/comedi/drivers/cb_pcidda.c42
-rw-r--r--drivers/staging/comedi/drivers/cb_pcidio.c10
-rw-r--r--drivers/staging/comedi/drivers/cb_pcimdas.c22
-rw-r--r--drivers/staging/comedi/drivers/cb_pcimdda.c22
-rw-r--r--drivers/staging/comedi/drivers/comedi_bond.c26
-rw-r--r--drivers/staging/comedi/drivers/comedi_fc.c2
-rw-r--r--drivers/staging/comedi/drivers/comedi_fc.h2
-rw-r--r--drivers/staging/comedi/drivers/comedi_parport.c26
-rw-r--r--drivers/staging/comedi/drivers/comedi_rt_timer.c42
-rw-r--r--drivers/staging/comedi/drivers/comedi_test.c46
-rw-r--r--drivers/staging/comedi/drivers/contec_pci_dio.c20
-rw-r--r--drivers/staging/comedi/drivers/daqboard2000.c46
-rw-r--r--drivers/staging/comedi/drivers/das08.c42
-rw-r--r--drivers/staging/comedi/drivers/das08.h4
-rw-r--r--drivers/staging/comedi/drivers/das08_cs.c4
-rw-r--r--drivers/staging/comedi/drivers/das16.c72
-rw-r--r--drivers/staging/comedi/drivers/das16m1.c46
-rw-r--r--drivers/staging/comedi/drivers/das1800.c86
-rw-r--r--drivers/staging/comedi/drivers/das6402.c24
-rw-r--r--drivers/staging/comedi/drivers/das800.c50
-rw-r--r--drivers/staging/comedi/drivers/dmm32at.c48
-rw-r--r--drivers/staging/comedi/drivers/dt2801.c46
-rw-r--r--drivers/staging/comedi/drivers/dt2811.c32
-rw-r--r--drivers/staging/comedi/drivers/dt2814.c16
-rw-r--r--drivers/staging/comedi/drivers/dt2815.c18
-rw-r--r--drivers/staging/comedi/drivers/dt2817.c12
-rw-r--r--drivers/staging/comedi/drivers/dt282x.c66
-rw-r--r--drivers/staging/comedi/drivers/dt3000.c50
-rw-r--r--drivers/staging/comedi/drivers/dt9812.c16
-rw-r--r--drivers/staging/comedi/drivers/fl512.c20
-rw-r--r--drivers/staging/comedi/drivers/gsc_hpdi.c54
-rw-r--r--drivers/staging/comedi/drivers/icp_multi.c60
-rw-r--r--drivers/staging/comedi/drivers/ii_pci20kc.c48
-rw-r--r--drivers/staging/comedi/drivers/jr3_pci.c20
-rw-r--r--drivers/staging/comedi/drivers/ke_counter.c12
-rw-r--r--drivers/staging/comedi/drivers/me4000.c126
-rw-r--r--drivers/staging/comedi/drivers/me_daq.c28
-rw-r--r--drivers/staging/comedi/drivers/mpc624.c12
-rw-r--r--drivers/staging/comedi/drivers/mpc8260cpm.c16
-rw-r--r--drivers/staging/comedi/drivers/multiq3.c22
-rw-r--r--drivers/staging/comedi/drivers/ni_6527.c30
-rw-r--r--drivers/staging/comedi/drivers/ni_65xx.c34
-rw-r--r--drivers/staging/comedi/drivers/ni_660x.c90
-rw-r--r--drivers/staging/comedi/drivers/ni_670x.c28
-rw-r--r--drivers/staging/comedi/drivers/ni_at_a2150.c40
-rw-r--r--drivers/staging/comedi/drivers/ni_at_ao.c36
-rw-r--r--drivers/staging/comedi/drivers/ni_atmio.c16
-rw-r--r--drivers/staging/comedi/drivers/ni_atmio16d.c40
-rw-r--r--drivers/staging/comedi/drivers/ni_daq_700.c30
-rw-r--r--drivers/staging/comedi/drivers/ni_daq_dio24.c8
-rw-r--r--drivers/staging/comedi/drivers/ni_labpc.c104
-rw-r--r--drivers/staging/comedi/drivers/ni_labpc.h4
-rw-r--r--drivers/staging/comedi/drivers/ni_labpc_cs.c4
-rw-r--r--drivers/staging/comedi/drivers/ni_mio_common.c386
-rw-r--r--drivers/staging/comedi/drivers/ni_mio_cs.c18
-rw-r--r--drivers/staging/comedi/drivers/ni_pcidio.c58
-rw-r--r--drivers/staging/comedi/drivers/ni_pcimio.c48
-rw-r--r--drivers/staging/comedi/drivers/ni_stc.h8
-rw-r--r--drivers/staging/comedi/drivers/ni_tio.c2
-rw-r--r--drivers/staging/comedi/drivers/ni_tio.h4
-rw-r--r--drivers/staging/comedi/drivers/ni_tiocmd.c2
-rw-r--r--drivers/staging/comedi/drivers/pcl711.c26
-rw-r--r--drivers/staging/comedi/drivers/pcl724.c8
-rw-r--r--drivers/staging/comedi/drivers/pcl725.c12
-rw-r--r--drivers/staging/comedi/drivers/pcl726.c16
-rw-r--r--drivers/staging/comedi/drivers/pcl730.c12
-rw-r--r--drivers/staging/comedi/drivers/pcl812.c50
-rw-r--r--drivers/staging/comedi/drivers/pcl816.c44
-rw-r--r--drivers/staging/comedi/drivers/pcl818.c66
-rw-r--r--drivers/staging/comedi/drivers/pcm3724.c14
-rw-r--r--drivers/staging/comedi/drivers/pcm3730.c12
-rw-r--r--drivers/staging/comedi/drivers/pcmad.c10
-rw-r--r--drivers/staging/comedi/drivers/pcmda12.c20
-rw-r--r--drivers/staging/comedi/drivers/pcmmio.c70
-rw-r--r--drivers/staging/comedi/drivers/pcmuio.c56
-rw-r--r--drivers/staging/comedi/drivers/poc.c32
-rw-r--r--drivers/staging/comedi/drivers/quatech_daqp_cs.c30
-rw-r--r--drivers/staging/comedi/drivers/rtd520.c62
-rw-r--r--drivers/staging/comedi/drivers/rti800.c18
-rw-r--r--drivers/staging/comedi/drivers/rti802.c12
-rw-r--r--drivers/staging/comedi/drivers/s526.c46
-rw-r--r--drivers/staging/comedi/drivers/s626.c294
-rw-r--r--drivers/staging/comedi/drivers/serial2002.c34
-rw-r--r--drivers/staging/comedi/drivers/skel.c34
-rw-r--r--drivers/staging/comedi/drivers/ssv_dnp.c16
-rw-r--r--drivers/staging/comedi/drivers/unioxx5.c20
-rw-r--r--drivers/staging/comedi/drivers/usbdux.c58
-rw-r--r--drivers/staging/comedi/drivers/usbduxfast.c18
-rw-r--r--drivers/staging/comedi/kcomedilib/get.c38
-rw-r--r--drivers/staging/comedi/kcomedilib/kcomedilib_main.c28
-rw-r--r--drivers/staging/comedi/proc.c2
-rw-r--r--drivers/staging/comedi/range.c2
-rw-r--r--drivers/staging/comedi/rt.c10
168 files changed, 3188 insertions, 3189 deletions
diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c
index 82bb66994e17..c8169e03693f 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -69,29 +69,29 @@ static DEFINE_SPINLOCK(comedi_file_info_table_lock);
static struct comedi_device_file_info
*comedi_file_info_table[COMEDI_NUM_MINORS];
-static int do_devconfig_ioctl(comedi_device *dev, comedi_devconfig *arg);
-static int do_bufconfig_ioctl(comedi_device *dev, void *arg);
-static int do_devinfo_ioctl(comedi_device *dev, comedi_devinfo *arg,
+static int do_devconfig_ioctl(struct comedi_device *dev, comedi_devconfig *arg);
+static int do_bufconfig_ioctl(struct comedi_device *dev, void *arg);
+static int do_devinfo_ioctl(struct comedi_device *dev, comedi_devinfo *arg,
struct file *file);
-static int do_subdinfo_ioctl(comedi_device *dev, comedi_subdinfo *arg,
+static int do_subdinfo_ioctl(struct comedi_device *dev, comedi_subdinfo *arg,
void *file);
-static int do_chaninfo_ioctl(comedi_device *dev, comedi_chaninfo *arg);
-static int do_bufinfo_ioctl(comedi_device *dev, void *arg);
-static int do_cmd_ioctl(comedi_device *dev, void *arg, void *file);
-static int do_lock_ioctl(comedi_device *dev, unsigned int arg, void *file);
-static int do_unlock_ioctl(comedi_device *dev, unsigned int arg, void *file);
-static int do_cancel_ioctl(comedi_device *dev, unsigned int arg, void *file);
-static int do_cmdtest_ioctl(comedi_device *dev, void *arg, void *file);
-static int do_insnlist_ioctl(comedi_device *dev, void *arg, void *file);
-static int do_insn_ioctl(comedi_device *dev, void *arg, void *file);
-static int do_poll_ioctl(comedi_device *dev, unsigned int subd, void *file);
-
-extern void do_become_nonbusy(comedi_device *dev, comedi_subdevice *s);
-static int do_cancel(comedi_device *dev, comedi_subdevice *s);
+static int do_chaninfo_ioctl(struct comedi_device *dev, comedi_chaninfo *arg);
+static int do_bufinfo_ioctl(struct comedi_device *dev, void *arg);
+static int do_cmd_ioctl(struct comedi_device *dev, void *arg, void *file);
+static int do_lock_ioctl(struct comedi_device *dev, unsigned int arg, void *file);
+static int do_unlock_ioctl(struct comedi_device *dev, unsigned int arg, void *file);
+static int do_cancel_ioctl(struct comedi_device *dev, unsigned int arg, void *file);
+static int do_cmdtest_ioctl(struct comedi_device *dev, void *arg, void *file);
+static int do_insnlist_ioctl(struct comedi_device *dev, void *arg, void *file);
+static int do_insn_ioctl(struct comedi_device *dev, void *arg, void *file);
+static int do_poll_ioctl(struct comedi_device *dev, unsigned int subd, void *file);
+
+extern void do_become_nonbusy(struct comedi_device *dev, comedi_subdevice *s);
+static int do_cancel(struct comedi_device *dev, comedi_subdevice *s);
static int comedi_fasync(int fd, struct file *file, int on);
-static int is_device_busy(comedi_device *dev);
+static int is_device_busy(struct comedi_device *dev);
#ifdef HAVE_UNLOCKED_IOCTL
static long comedi_unlocked_ioctl(struct file *file, unsigned int cmd,
@@ -104,7 +104,7 @@ static int comedi_ioctl(struct inode *inode, struct file *file,
const unsigned minor = iminor(file->f_dentry->d_inode);
struct comedi_device_file_info *dev_file_info =
comedi_get_device_file_info(minor);
- comedi_device *dev;
+ struct comedi_device *dev;
int rc;
if (dev_file_info == NULL || dev_file_info->device == NULL)
@@ -192,7 +192,7 @@ done:
writes:
none
*/
-static int do_devconfig_ioctl(comedi_device *dev, comedi_devconfig *arg)
+static int do_devconfig_ioctl(struct comedi_device *dev, comedi_devconfig *arg)
{
comedi_devconfig it;
int ret;
@@ -272,7 +272,7 @@ static int do_devconfig_ioctl(comedi_device *dev, comedi_devconfig *arg)
modified bufconfig at arg
*/
-static int do_bufconfig_ioctl(comedi_device *dev, void *arg)
+static int do_bufconfig_ioctl(struct comedi_device *dev, void *arg)
{
comedi_bufconfig bc;
comedi_async *async;
@@ -360,7 +360,7 @@ copyback:
devinfo structure
*/
-static int do_devinfo_ioctl(comedi_device *dev, comedi_devinfo *arg,
+static int do_devinfo_ioctl(struct comedi_device *dev, comedi_devinfo *arg,
struct file *file)
{
comedi_devinfo devinfo;
@@ -410,7 +410,7 @@ static int do_devinfo_ioctl(comedi_device *dev, comedi_devinfo *arg,
array of subdevice info structures at arg
*/
-static int do_subdinfo_ioctl(comedi_device *dev, comedi_subdinfo *arg,
+static int do_subdinfo_ioctl(struct comedi_device *dev, comedi_subdinfo *arg,
void *file)
{
int ret, i;
@@ -490,7 +490,7 @@ static int do_subdinfo_ioctl(comedi_device *dev, comedi_subdinfo *arg,
arrays at elements of chaninfo structure
*/
-static int do_chaninfo_ioctl(comedi_device *dev, comedi_chaninfo *arg)
+static int do_chaninfo_ioctl(struct comedi_device *dev, comedi_chaninfo *arg)
{
comedi_subdevice *s;
comedi_chaninfo it;
@@ -554,7 +554,7 @@ static int do_chaninfo_ioctl(comedi_device *dev, comedi_chaninfo *arg)
modified bufinfo at arg
*/
-static int do_bufinfo_ioctl(comedi_device *dev, void *arg)
+static int do_bufinfo_ioctl(struct comedi_device *dev, void *arg)
{
comedi_bufinfo bi;
comedi_subdevice *s;
@@ -607,7 +607,7 @@ copyback:
return 0;
}
-static int parse_insn(comedi_device *dev, comedi_insn *insn, unsigned int *data,
+static int parse_insn(struct comedi_device *dev, comedi_insn *insn, unsigned int *data,
void *file);
/*
* COMEDI_INSNLIST
@@ -626,7 +626,7 @@ static int parse_insn(comedi_device *dev, comedi_insn *insn, unsigned int *data,
*/
/* arbitrary limits */
#define MAX_SAMPLES 256
-static int do_insnlist_ioctl(comedi_device *dev, void *arg, void *file)
+static int do_insnlist_ioctl(struct comedi_device *dev, void *arg, void *file)
{
comedi_insnlist insnlist;
comedi_insn *insns = NULL;
@@ -757,7 +757,7 @@ static int check_insn_config_length(comedi_insn *insn, unsigned int *data)
return -EINVAL;
}
-static int parse_insn(comedi_device *dev, comedi_insn *insn, unsigned int *data,
+static int parse_insn(struct comedi_device *dev, comedi_insn *insn, unsigned int *data,
void *file)
{
comedi_subdevice *s;
@@ -917,7 +917,7 @@ out:
* writes:
* data (for reads)
*/
-static int do_insn_ioctl(comedi_device *dev, void *arg, void *file)
+static int do_insn_ioctl(struct comedi_device *dev, void *arg, void *file)
{
comedi_insn insn;
unsigned int *data = NULL;
@@ -975,7 +975,7 @@ error:
modified cmd structure at arg
*/
-static int do_cmd_ioctl(comedi_device *dev, void *arg, void *file)
+static int do_cmd_ioctl(struct comedi_device *dev, void *arg, void *file)
{
comedi_cmd user_cmd;
comedi_subdevice *s;
@@ -1129,7 +1129,7 @@ cleanup:
modified cmd structure at arg
*/
-static int do_cmdtest_ioctl(comedi_device *dev, void *arg, void *file)
+static int do_cmdtest_ioctl(struct comedi_device *dev, void *arg, void *file)
{
comedi_cmd user_cmd;
comedi_subdevice *s;
@@ -1227,7 +1227,7 @@ cleanup:
*/
-static int do_lock_ioctl(comedi_device *dev, unsigned int arg, void *file)
+static int do_lock_ioctl(struct comedi_device *dev, unsigned int arg, void *file)
{
int ret = 0;
unsigned long flags;
@@ -1271,7 +1271,7 @@ static int do_lock_ioctl(comedi_device *dev, unsigned int arg, void *file)
This function isn't protected by the semaphore, since
we already own the lock.
*/
-static int do_unlock_ioctl(comedi_device *dev, unsigned int arg, void *file)
+static int do_unlock_ioctl(struct comedi_device *dev, unsigned int arg, void *file)
{
comedi_subdevice *s;
@@ -1311,7 +1311,7 @@ static int do_unlock_ioctl(comedi_device *dev, unsigned int arg, void *file)
nothing
*/
-static int do_cancel_ioctl(comedi_device *dev, unsigned int arg, void *file)
+static int do_cancel_ioctl(struct comedi_device *dev, unsigned int arg, void *file)
{
comedi_subdevice *s;
@@ -1347,7 +1347,7 @@ static int do_cancel_ioctl(comedi_device *dev, unsigned int arg, void *file)
nothing
*/
-static int do_poll_ioctl(comedi_device *dev, unsigned int arg, void *file)
+static int do_poll_ioctl(struct comedi_device *dev, unsigned int arg, void *file)
{
comedi_subdevice *s;
@@ -1370,7 +1370,7 @@ static int do_poll_ioctl(comedi_device *dev, unsigned int arg, void *file)
return -EINVAL;
}
-static int do_cancel(comedi_device *dev, comedi_subdevice *s)
+static int do_cancel(struct comedi_device *dev, comedi_subdevice *s)
{
int ret = 0;
@@ -1385,7 +1385,7 @@ static int do_cancel(comedi_device *dev, comedi_subdevice *s)
void comedi_unmap(struct vm_area_struct *area)
{
comedi_async *async;
- comedi_device *dev;
+ struct comedi_device *dev;
async = area->vm_private_data;
dev = async->subdevice->device;
@@ -1404,7 +1404,7 @@ static int comedi_mmap(struct file *file, struct vm_area_struct *vma)
const unsigned minor = iminor(file->f_dentry->d_inode);
struct comedi_device_file_info *dev_file_info =
comedi_get_device_file_info(minor);
- comedi_device *dev = dev_file_info->device;
+ struct comedi_device *dev = dev_file_info->device;
comedi_async *async = NULL;
unsigned long start = vma->vm_start;
unsigned long size;
@@ -1480,7 +1480,7 @@ static unsigned int comedi_poll(struct file *file, poll_table *wait)
const unsigned minor = iminor(file->f_dentry->d_inode);
struct comedi_device_file_info *dev_file_info =
comedi_get_device_file_info(minor);
- comedi_device *dev = dev_file_info->device;
+ struct comedi_device *dev = dev_file_info->device;
comedi_subdevice *read_subdev;
comedi_subdevice *write_subdev;
@@ -1530,7 +1530,7 @@ static ssize_t comedi_write(struct file *file, const char *buf, size_t nbytes,
const unsigned minor = iminor(file->f_dentry->d_inode);
struct comedi_device_file_info *dev_file_info =
comedi_get_device_file_info(minor);
- comedi_device *dev = dev_file_info->device;
+ struct comedi_device *dev = dev_file_info->device;
if (!dev->attached) {
DPRINTK("no driver configured on comedi%i\n", dev->minor);
@@ -1632,7 +1632,7 @@ static ssize_t comedi_read(struct file *file, char *buf, size_t nbytes,
const unsigned minor = iminor(file->f_dentry->d_inode);
struct comedi_device_file_info *dev_file_info =
comedi_get_device_file_info(minor);
- comedi_device *dev = dev_file_info->device;
+ struct comedi_device *dev = dev_file_info->device;
if (!dev->attached) {
DPRINTK("no driver configured on comedi%i\n", dev->minor);
@@ -1733,7 +1733,7 @@ done:
/*
This function restores a subdevice to an idle state.
*/
-void do_become_nonbusy(comedi_device *dev, comedi_subdevice *s)
+void do_become_nonbusy(struct comedi_device *dev, comedi_subdevice *s)
{
comedi_async *async = s->async;
@@ -1760,7 +1760,7 @@ static int comedi_open(struct inode *inode, struct file *file)
const unsigned minor = iminor(inode);
struct comedi_device_file_info *dev_file_info =
comedi_get_device_file_info(minor);
- comedi_device *dev = dev_file_info ? dev_file_info->device : NULL;
+ struct comedi_device *dev = dev_file_info ? dev_file_info->device : NULL;
if (dev == NULL) {
DPRINTK("invalid minor number\n");
@@ -1832,7 +1832,7 @@ static int comedi_close(struct inode *inode, struct file *file)
const unsigned minor = iminor(inode);
struct comedi_device_file_info *dev_file_info =
comedi_get_device_file_info(minor);
- comedi_device *dev = dev_file_info->device;
+ struct comedi_device *dev = dev_file_info->device;
comedi_subdevice *s = NULL;
int i;
@@ -1871,7 +1871,7 @@ static int comedi_fasync(int fd, struct file *file, int on)
struct comedi_device_file_info *dev_file_info =
comedi_get_device_file_info(minor);
- comedi_device *dev = dev_file_info->device;
+ struct comedi_device *dev = dev_file_info->device;
return fasync_helper(fd, file, on, &dev->async_queue);
}
@@ -2000,13 +2000,13 @@ static void __exit comedi_cleanup(void)
module_init(comedi_init);
module_exit(comedi_cleanup);
-void comedi_error(const comedi_device *dev, const char *s)
+void comedi_error(const struct comedi_device *dev, const char *s)
{
rt_printk("comedi%d: %s: %s\n", dev->minor, dev->driver->driver_name,
s);
}
-void comedi_event(comedi_device *dev, comedi_subdevice *s)
+void comedi_event(struct comedi_device *dev, comedi_subdevice *s)
{
comedi_async *async = s->async;
unsigned runflags = 0;
@@ -2089,7 +2089,7 @@ unsigned comedi_get_subdevice_runflags(comedi_subdevice *s)
return runflags;
}
-static int is_device_busy(comedi_device *dev)
+static int is_device_busy(struct comedi_device *dev)
{
comedi_subdevice *s;
int i;
@@ -2108,15 +2108,15 @@ static int is_device_busy(comedi_device *dev)
return 0;
}
-void comedi_device_init(comedi_device *dev)
+void comedi_device_init(struct comedi_device *dev)
{
- memset(dev, 0, sizeof(comedi_device));
+ memset(dev, 0, sizeof(struct comedi_device));
spin_lock_init(&dev->spinlock);
mutex_init(&dev->mutex);
dev->minor = -1;
}
-void comedi_device_cleanup(comedi_device *dev)
+void comedi_device_cleanup(struct comedi_device *dev)
{
if (dev == NULL)
return;
@@ -2136,7 +2136,7 @@ int comedi_alloc_board_minor(struct device *hardware_device)
info = kzalloc(sizeof(struct comedi_device_file_info), GFP_KERNEL);
if (info == NULL)
return -ENOMEM;
- info->device = kzalloc(sizeof(comedi_device), GFP_KERNEL);
+ info->device = kzalloc(sizeof(struct comedi_device), GFP_KERNEL);
if (info->device == NULL) {
kfree(info);
return -ENOMEM;
@@ -2180,7 +2180,7 @@ void comedi_free_board_minor(unsigned minor)
comedi_spin_unlock_irqrestore(&comedi_file_info_table_lock, flags);
if (info) {
- comedi_device *dev = info->device;
+ struct comedi_device *dev = info->device;
if (dev) {
if (dev->class_dev) {
device_destroy(comedi_class,
@@ -2193,7 +2193,7 @@ void comedi_free_board_minor(unsigned minor)
}
}
-int comedi_alloc_subdevice_minor(comedi_device *dev, comedi_subdevice *s)
+int comedi_alloc_subdevice_minor(struct comedi_device *dev, comedi_subdevice *s)
{
unsigned long flags;
struct comedi_device_file_info *info;
diff --git a/drivers/staging/comedi/comedi_rt.h b/drivers/staging/comedi/comedi_rt.h
index baeaa495b0a7..169ca963312a 100644
--- a/drivers/staging/comedi/comedi_rt.h
+++ b/drivers/staging/comedi/comedi_rt.h
@@ -58,12 +58,12 @@
int comedi_request_irq(unsigned int irq, irqreturn_t(*handler) (int,
void *PT_REGS_ARG), unsigned long flags, const char *device,
- comedi_device *dev_id);
-void comedi_free_irq(unsigned int irq, comedi_device *dev_id);
+ struct comedi_device *dev_id);
+void comedi_free_irq(unsigned int irq, struct comedi_device *dev_id);
void comedi_rt_init(void);
void comedi_rt_cleanup(void);
-int comedi_switch_to_rt(comedi_device *dev);
-void comedi_switch_to_non_rt(comedi_device *dev);
+int comedi_switch_to_rt(struct comedi_device *dev);
+void comedi_switch_to_non_rt(struct comedi_device *dev);
void comedi_rt_pend_wakeup(wait_queue_head_t *q);
extern int rt_pend_call(void (*func) (int arg1, void *arg2), int arg1,
void *arg2);
diff --git a/drivers/staging/comedi/comedidev.h b/drivers/staging/comedi/comedidev.h
index 372a1ba808d6..e0035f3e9287 100644
--- 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_device_struct comedi_device;
typedef struct comedi_subdevice_struct comedi_subdevice;
typedef struct comedi_async_struct comedi_async;
typedef struct comedi_driver_struct comedi_driver;
@@ -133,7 +132,7 @@ typedef struct device device_create_result_type;
device_create(cs, ((parent) ? (parent) : (device)), devt, drvdata, fmt)
struct comedi_subdevice_struct {
- comedi_device *device;
+ struct comedi_device *device;
int type;
int n_chan;
volatile int subdev_flags;
@@ -163,27 +162,27 @@ struct comedi_subdevice_struct {
unsigned int *chanlist; /* driver-owned chanlist (not used) */
- int (*insn_read) (comedi_device *, comedi_subdevice *, comedi_insn *,
+ int (*insn_read) (struct comedi_device *, comedi_subdevice *, comedi_insn *,
unsigned int *);
- int (*insn_write) (comedi_device *, comedi_subdevice *, comedi_insn *,
+ int (*insn_write) (struct comedi_device *, comedi_subdevice *, comedi_insn *,
unsigned int *);
- int (*insn_bits) (comedi_device *, comedi_subdevice *, comedi_insn *,
+ int (*insn_bits) (struct comedi_device *, comedi_subdevice *, comedi_insn *,
unsigned int *);
- int (*insn_config) (comedi_device *, comedi_subdevice *, comedi_insn *,
+ int (*insn_config) (struct comedi_device *, comedi_subdevice *, comedi_insn *,
unsigned int *);
- int (*do_cmd) (comedi_device *, comedi_subdevice *);
- int (*do_cmdtest) (comedi_device *, comedi_subdevice *, comedi_cmd *);
- int (*poll) (comedi_device *, comedi_subdevice *);
- int (*cancel) (comedi_device *, comedi_subdevice *);
- /* int (*do_lock)(comedi_device *,comedi_subdevice *); */
- /* int (*do_unlock)(comedi_device *,comedi_subdevice *); */
+ int (*do_cmd) (struct comedi_device *, comedi_subdevice *);
+ int (*do_cmdtest) (struct comedi_device *, comedi_subdevice *, comedi_cmd *);
+ int (*poll) (struct comedi_device *, comedi_subdevice *);
+ int (*cancel) (struct comedi_device *, comedi_subdevice *);
+ /* int (*do_lock)(struct comedi_device *,comedi_subdevice *); */
+ /* int (*do_unlock)(struct comedi_device *,comedi_subdevice *); */
/* called when the buffer changes */
- int (*buf_change) (comedi_device *dev, comedi_subdevice *s,
+ int (*buf_change) (struct comedi_device *dev, comedi_subdevice *s,
unsigned long new_size);
- void (*munge) (comedi_device *dev, comedi_subdevice *s, void *data,
+ void (*munge) (struct comedi_device *dev, comedi_subdevice *s, void *data,
unsigned int num_bytes, unsigned int start_chan_index);
enum dma_data_direction async_dma_dir;
@@ -238,7 +237,7 @@ struct comedi_async_struct {
int (*cb_func) (unsigned int flags, void *);
void *cb_arg;
- int (*inttrig) (comedi_device *dev, comedi_subdevice *s,
+ int (*inttrig) (struct comedi_device *dev, comedi_subdevice *s,
unsigned int x);
};
@@ -247,8 +246,8 @@ struct comedi_driver_struct {
const char *driver_name;
struct module *module;
- int (*attach) (comedi_device *, comedi_devconfig *);
- int (*detach) (comedi_device *);
+ int (*attach) (struct comedi_device *, comedi_devconfig *);
+ int (*detach) (struct comedi_device *);
/* number of elements in board_name and board_id arrays */
unsigned int num_names;
@@ -257,7 +256,7 @@ struct comedi_driver_struct {
int offset;
};
-struct comedi_device_struct {
+struct comedi_device {
int use_count;
comedi_driver *driver;
void *private;
@@ -289,12 +288,12 @@ struct comedi_device_struct {
struct fasync_struct *async_queue;
- void (*open) (comedi_device *dev);
- void (*close) (comedi_device *dev);
+ void (*open) (struct comedi_device *dev);
+ void (*close) (struct comedi_device *dev);
};
struct comedi_device_file_info {
- comedi_device *device;
+ struct comedi_device *device;
comedi_subdevice *read_subdevice;
comedi_subdevice *write_subdevice;
};
@@ -309,8 +308,8 @@ static const int comedi_debug;
* function prototypes
*/
-void comedi_event(comedi_device *dev, comedi_subdevice *s);
-void comedi_error(const comedi_device *dev, const char *s);
+void comedi_event(struct comedi_device *dev, comedi_subdevice *s);
+void comedi_error(const struct comedi_device *dev, const char *s);
/* we can expand the number of bits used to encode devices/subdevices into
the minor number soon, after more distros support > 8 bit minor numbers
@@ -344,17 +343,17 @@ static inline comedi_subdevice *comedi_get_write_subdevice(
return info->device->write_subdev;
}
-void comedi_device_detach(comedi_device *dev);
-int comedi_device_attach(comedi_device *dev, comedi_devconfig *it);
+void comedi_device_detach(struct comedi_device *dev);
+int comedi_device_attach(struct comedi_device *dev, comedi_devconfig *it);
int comedi_driver_register(comedi_driver *);
int comedi_driver_unregister(comedi_driver *);
void init_polling(void);
void cleanup_polling(void);
-void start_polling(comedi_device *);
-void stop_polling(comedi_device *);
+void start_polling(struct comedi_device *);
+void stop_polling(struct comedi_device *);
-int comedi_buf_alloc(comedi_device *dev, comedi_subdevice *s, unsigned long
+int comedi_buf_alloc(struct comedi_device *dev, comedi_subdevice *s, unsigned long
new_size);
#ifdef CONFIG_PROC_FS
@@ -383,12 +382,12 @@ enum subdevice_runflags {
various internal comedi functions
*/
-int do_rangeinfo_ioctl(comedi_device *dev, comedi_rangeinfo *arg);
+int do_rangeinfo_ioctl(struct comedi_device *dev, comedi_rangeinfo *arg);
int check_chanlist(comedi_subdevice *s, int n, unsigned int *chanlist);
void comedi_set_subdevice_runflags(comedi_subdevice *s, unsigned mask,
unsigned bits);
unsigned comedi_get_subdevice_runflags(comedi_subdevice *s);
-int insn_inval(comedi_device *dev, comedi_subdevice *s,
+int insn_inval(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
/* range stuff */
@@ -422,7 +421,7 @@ struct comedi_lrange_struct {
/* some silly little inline functions */
-static inline int alloc_subdevices(comedi_device *dev,
+static inline int alloc_subdevices(struct comedi_device *dev,
unsigned int num_subdevices)
{
unsigned i;
@@ -441,7 +440,7 @@ static inline int alloc_subdevices(comedi_device *dev,
return 0;
}
-static inline int alloc_private(comedi_device *dev, int size)
+static inline int alloc_private(struct comedi_device *dev, int size)
{
dev->private = kzalloc(size, GFP_KERNEL);
if (!dev->private)
@@ -459,7 +458,7 @@ static inline unsigned int bytes_per_sample(const comedi_subdevice *subd)
/* must be used in attach to set dev->hw_dev if you wish to dma directly
into comedi's buffer */
-static inline void comedi_set_hw_dev(comedi_device *dev, struct device *hw_dev)
+static inline void comedi_set_hw_dev(struct comedi_device *dev, struct device *hw_dev)
{
if (dev->hw_dev)
put_device(dev->hw_dev);
@@ -524,7 +523,7 @@ static inline void *comedi_aux_data(int options[], int n)
int comedi_alloc_board_minor(struct device *hardware_device);
void comedi_free_board_minor(unsigned minor);
-int comedi_alloc_subdevice_minor(comedi_device *dev, comedi_subdevice *s);
+int comedi_alloc_subdevice_minor(struct comedi_device *dev, comedi_subdevice *s);
void comedi_free_subdevice_minor(comedi_subdevice *s);
int comedi_pci_auto_config(struct pci_dev *pcidev, const char *board_name);
void comedi_pci_auto_unconfig(struct pci_dev *pcidev);
diff --git a/drivers/staging/comedi/drivers.c b/drivers/staging/comedi/drivers.c
index 49834ebfcb19..f0eb7341d9ab 100644
--- a/drivers/staging/comedi/drivers.c
+++ b/drivers/staging/comedi/drivers.c
@@ -47,13 +47,13 @@
#include <asm/io.h>
#include <asm/system.h>
-static int postconfig(comedi_device *dev);
-static int insn_rw_emulate_bits(comedi_device *dev, comedi_subdevice *s,
+static int postconfig(struct comedi_device *dev);
+static int insn_rw_emulate_bits(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
static void *comedi_recognize(comedi_driver * driv, const char *name);
static void comedi_report_boards(comedi_driver *driv);
-static int poll_invalid(comedi_device *dev, comedi_subdevice *s);
-int comedi_buf_alloc(comedi_device *dev, comedi_subdevice *s,
+static int poll_invalid(struct comedi_device *dev, comedi_subdevice *s);
+int comedi_buf_alloc(struct comedi_device *dev, comedi_subdevice *s,
unsigned long new_size);
comedi_driver *comedi_drivers;
@@ -63,7 +63,7 @@ int comedi_modprobe(int minor)
return -EINVAL;
}
-static void cleanup_device(comedi_device *dev)
+static void cleanup_device(struct comedi_device *dev)
{
int i;
comedi_subdevice *s;
@@ -95,7 +95,7 @@ static void cleanup_device(comedi_device *dev)
comedi_set_hw_dev(dev, NULL);
}
-static void __comedi_device_detach(comedi_device *dev)
+static void __comedi_device_detach(struct comedi_device *dev)
{
dev->attached = 0;
if (dev->driver) {
@@ -106,14 +106,14 @@ static void __comedi_device_detach(comedi_device *dev)
cleanup_device(dev);
}
-void comedi_device_detach(comedi_device *dev)
+void comedi_device_detach(struct comedi_device *dev)
{
if (!dev->attached)
return;
__comedi_device_detach(dev);
}
-int comedi_device_attach(comedi_device *dev, comedi_devconfig *it)
+int comedi_device_attach(struct comedi_device *dev, comedi_devconfig *it)
{
comedi_driver *driv;
int ret;
@@ -196,7 +196,7 @@ int comedi_driver_unregister(comedi_driver *driver)
/* check for devices using this driver */
for (i = 0; i < COMEDI_NUM_BOARD_MINORS; i++) {
struct comedi_device_file_info *dev_file_info = comedi_get_device_file_info(i);
- comedi_device *dev;
+ struct comedi_device *dev;
if(dev_file_info == NULL) continue;
dev = dev_file_info->device;
@@ -224,7 +224,7 @@ int comedi_driver_unregister(comedi_driver *driver)
return -EINVAL;
}
-static int postconfig(comedi_device *dev)
+static int postconfig(struct comedi_device *dev)
{
int i;
comedi_subdevice *s;
@@ -331,18 +331,18 @@ void comedi_report_boards(comedi_driver *driv)
printk(" %s\n", driv->driver_name);
}
-static int poll_invalid(comedi_device *dev, comedi_subdevice *s)
+static int poll_invalid(struct comedi_device *dev, comedi_subdevice *s)
{
return -EINVAL;
}
-int insn_inval(comedi_device *dev, comedi_subdevice *s,
+int insn_inval(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
return -EINVAL;
}
-static int insn_rw_emulate_bits(comedi_device *dev, comedi_subdevice *s,
+static int insn_rw_emulate_bits(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
comedi_insn new_insn;
@@ -412,7 +412,7 @@ static inline unsigned long kvirt_to_kva(unsigned long adr)
return kva;
}
-int comedi_buf_alloc(comedi_device *dev, comedi_subdevice *s,
+int comedi_buf_alloc(struct comedi_device *dev, comedi_subdevice *s,
unsigned long new_size)
{
comedi_async *async = s->async;
diff --git a/drivers/staging/comedi/drivers/8255.c b/drivers/staging/comedi/drivers/8255.c
index b90bd1275f99..3355468266a2 100644
--- a/drivers/staging/comedi/drivers/8255.c
+++ b/drivers/staging/comedi/drivers/8255.c
@@ -105,8 +105,8 @@ struct subdev_8255_struct {
#define CALLBACK_FUNC (((struct subdev_8255_struct *)s->private)->cb_func)
#define subdevpriv ((struct subdev_8255_struct *)s->private)
-static int dev_8255_attach(comedi_device * dev, comedi_devconfig * it);
-static int dev_8255_detach(comedi_device * dev);
+static int dev_8255_attach(struct comedi_device *dev, comedi_devconfig * it);
+static int dev_8255_detach(struct comedi_device *dev);
static comedi_driver driver_8255 = {
driver_name:"8255",
module:THIS_MODULE,
@@ -116,9 +116,9 @@ static comedi_driver driver_8255 = {
COMEDI_INITCLEANUP(driver_8255);
-static void do_config(comedi_device * dev, comedi_subdevice * s);
+static void do_config(struct comedi_device *dev, comedi_subdevice * s);
-void subdev_8255_interrupt(comedi_device * dev, comedi_subdevice * s)
+void subdev_8255_interrupt(struct comedi_device *dev, comedi_subdevice * s)
{
short d;
@@ -143,7 +143,7 @@ static int subdev_8255_cb(int dir, int port, int data, unsigned long arg)
}
}
-static int subdev_8255_insn(comedi_device * dev, comedi_subdevice * s,
+static int subdev_8255_insn(struct comedi_device *dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (data[0]) {
@@ -168,7 +168,7 @@ static int subdev_8255_insn(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int subdev_8255_insn_config(comedi_device * dev, comedi_subdevice * s,
+static int subdev_8255_insn_config(struct comedi_device *dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int mask;
@@ -205,7 +205,7 @@ static int subdev_8255_insn_config(comedi_device * dev, comedi_subdevice * s,
return 1;
}
-static void do_config(comedi_device * dev, comedi_subdevice * s)
+static void do_config(struct comedi_device *dev, comedi_subdevice * s)
{
int config;
@@ -222,7 +222,7 @@ static void do_config(comedi_device * dev, comedi_subdevice * s)
CALLBACK_FUNC(1, _8255_CR, config, CALLBACK_ARG);
}
-static int subdev_8255_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int subdev_8255_cmdtest(struct comedi_device *dev, comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
@@ -297,21 +297,21 @@ static int subdev_8255_cmdtest(comedi_device * dev, comedi_subdevice * s,
return 0;
}
-static int subdev_8255_cmd(comedi_device * dev, comedi_subdevice * s)
+static int subdev_8255_cmd(struct comedi_device *dev, comedi_subdevice * s)
{
/* FIXME */
return 0;
}
-static int subdev_8255_cancel(comedi_device * dev, comedi_subdevice * s)
+static int subdev_8255_cancel(struct comedi_device *dev, comedi_subdevice * s)
{
/* FIXME */
return 0;
}
-int subdev_8255_init(comedi_device * dev, comedi_subdevice * s, int (*cb) (int,
+int subdev_8255_init(struct comedi_device *dev, comedi_subdevice * s, int (*cb) (int,
int, int, unsigned long), unsigned long arg)
{
s->type = COMEDI_SUBD_DIO;
@@ -340,7 +340,7 @@ int subdev_8255_init(comedi_device * dev, comedi_subdevice * s, int (*cb) (int,
return 0;
}
-int subdev_8255_init_irq(comedi_device * dev, comedi_subdevice * s,
+int subdev_8255_init_irq(struct comedi_device *dev, comedi_subdevice * s,
int (*cb) (int, int, int, unsigned long), unsigned long arg)
{
int ret;
@@ -358,7 +358,7 @@ int subdev_8255_init_irq(comedi_device * dev, comedi_subdevice * s,
return 0;
}
-void subdev_8255_cleanup(comedi_device * dev, comedi_subdevice * s)
+void subdev_8255_cleanup(struct comedi_device *dev, comedi_subdevice * s)
{
if (s->private) {
if (subdevpriv->have_irq) {
@@ -374,7 +374,7 @@ void subdev_8255_cleanup(comedi_device * dev, comedi_subdevice * s)
*/
-static int dev_8255_attach(comedi_device * dev, comedi_devconfig * it)
+static int dev_8255_attach(struct comedi_device *dev, comedi_devconfig * it)
{
int ret;
unsigned long iobase;
@@ -416,7 +416,7 @@ static int dev_8255_attach(comedi_device * dev, comedi_devconfig * it)
return 0;
}
-static int dev_8255_detach(comedi_device * dev)
+static int dev_8255_detach(struct comedi_device *dev)
{
int i;
unsigned long iobase;
diff --git a/drivers/staging/comedi/drivers/8255.h b/drivers/staging/comedi/drivers/8255.h
index 69a2a72595c6..6837cf83c10b 100644
--- a/drivers/staging/comedi/drivers/8255.h
+++ b/drivers/staging/comedi/drivers/8255.h
@@ -28,16 +28,16 @@
#if defined(CONFIG_COMEDI_8255) || defined(CONFIG_COMEDI_8255_MODULE)
-int subdev_8255_init(comedi_device * dev, comedi_subdevice * s,
+int subdev_8255_init(struct comedi_device * dev, comedi_subdevice * s,
int (*cb) (int, int, int, unsigned long), unsigned long arg);
-int subdev_8255_init_irq(comedi_device * dev, comedi_subdevice * s,
+int subdev_8255_init_irq(struct comedi_device * dev, comedi_subdevice * s,
int (*cb) (int, int, int, unsigned long), unsigned long arg);
-void subdev_8255_cleanup(comedi_device * dev, comedi_subdevice * s);
-void subdev_8255_interrupt(comedi_device * dev, comedi_subdevice * s);
+void subdev_8255_cleanup(struct comedi_device * dev, comedi_subdevice * s);
+void subdev_8255_interrupt(struct comedi_device * dev, comedi_subdevice * s);
#else
-static inline int subdev_8255_init(comedi_device * dev, comedi_subdevice * s,
+static inline int subdev_8255_init(struct comedi_device * dev, comedi_subdevice * s,
void *x, unsigned long y)
{
printk("8255 support not configured -- disabling subdevice\n");
@@ -47,7 +47,7 @@ static inline int subdev_8255_init(comedi_device * dev, comedi_subdevice * s,
return 0;
}
-static inline void subdev_8255_cleanup(comedi_device * dev,
+static inline void subdev_8255_cleanup(struct comedi_device * dev,
comedi_subdevice * s)
{
}
diff --git a/drivers/staging/comedi/drivers/acl7225b.c b/drivers/staging/comedi/drivers/acl7225b.c
index aeaf30dea300..4c6ad8ab5b61 100644
--- a/drivers/staging/comedi/drivers/acl7225b.c
+++ b/drivers/staging/comedi/drivers/acl7225b.c
@@ -22,8 +22,8 @@ Devices: [Adlink] ACL-7225b (acl7225b), [ICP] P16R16DIO (p16r16dio)
#define ACL7225_DI_LO 2 /* Digital input low byte (DI0-DI7) */
#define ACL7225_DI_HI 3 /* Digital input high byte (DI8-DI15) */
-static int acl7225b_attach(comedi_device * dev, comedi_devconfig * it);
-static int acl7225b_detach(comedi_device * dev);
+static int acl7225b_attach(struct comedi_device *dev, comedi_devconfig * it);
+static int acl7225b_detach(struct comedi_device *dev);
typedef struct {
const char *name; // driver name
@@ -50,7 +50,7 @@ static comedi_driver driver_acl7225b = {
COMEDI_INITCLEANUP(driver_acl7225b);
-static int acl7225b_do_insn(comedi_device * dev, comedi_subdevice * s,
+static int acl7225b_do_insn(struct comedi_device *dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
@@ -71,7 +71,7 @@ static int acl7225b_do_insn(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int acl7225b_di_insn(comedi_device * dev, comedi_subdevice * s,
+static int acl7225b_di_insn(struct comedi_device *dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
@@ -83,7 +83,7 @@ static int acl7225b_di_insn(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int acl7225b_attach(comedi_device * dev, comedi_devconfig * it)
+static int acl7225b_attach(struct comedi_device *dev, comedi_devconfig * it)
{
comedi_subdevice *s;
int iobase, iorange;
@@ -138,7 +138,7 @@ static int acl7225b_attach(comedi_device * dev, comedi_devconfig * it)
return 0;
}
-static int acl7225b_detach(comedi_device * dev)
+static int acl7225b_detach(struct comedi_device *dev)
{
printk("comedi%d: acl7225b: remove\n", dev->minor);
diff --git a/drivers/staging/comedi/drivers/addi-data/APCI1710_82x54.c b/drivers/staging/comedi/drivers/addi-data/APCI1710_82x54.c
index 20450ba03504..73357d1196ce 100644
--- a/drivers/staging/comedi/drivers/addi-data/APCI1710_82x54.c
+++ b/drivers/staging/comedi/drivers/addi-data/APCI1710_82x54.c
@@ -32,7 +32,7 @@
| BYTE_ b_InputClockLevel, |
| BYTE_ b_OutputLevel, |
| BYTE_ b_HardwareGateLevel)
-INT i_InsnConfig_InitTimer(comedi_device *dev,comedi_subdevice *s,
+INT i_InsnConfig_InitTimer(struct comedi_device *dev,comedi_subdevice *s,
comedi_insn *insn,unsigned int *data)
|
+----------------------------------------------------------------------------+
@@ -219,7 +219,7 @@ INT i_InsnConfig_InitTimer(comedi_device *dev,comedi_subdevice *s,
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_InsnConfigInitTimer(comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1710_InsnConfigInitTimer(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
@@ -406,7 +406,7 @@ INT i_APCI1710_InsnConfigInitTimer(comedi_device * dev, comedi_subdevice * s,
| BYTE_ b_ModulNbr, |
| BYTE_ b_TimerNbr, |
| BYTE_ b_InterruptEnable)
-INT i_APCI1710_InsnWriteEnableDisableTimer(comedi_device *dev,comedi_subdevice *s,
+INT i_APCI1710_InsnWriteEnableDisableTimer(struct comedi_device *dev,comedi_subdevice *s,
comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Enable OR Disable the Timer (b_TimerNbr) from selected module |
@@ -448,7 +448,7 @@ i_ReturnValue=insn->n;
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_InsnWriteEnableDisableTimer(comedi_device * dev,
+INT i_APCI1710_InsnWriteEnableDisableTimer(struct comedi_device * dev,
comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
@@ -561,7 +561,7 @@ INT i_APCI1710_InsnWriteEnableDisableTimer(comedi_device * dev,
| (BYTE_ b_BoardHandle, |
| BYTE_ b_ModulNbr, |
| PULONG_ pul_TimerValueArray)
-INT i_APCI1710_InsnReadAllTimerValue(comedi_device *dev,comedi_subdevice *s,
+INT i_APCI1710_InsnReadAllTimerValue(struct comedi_device *dev,comedi_subdevice *s,
comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Return the all timer values from selected timer |
@@ -590,7 +590,7 @@ INT i_APCI1710_InsnReadAllTimerValue(comedi_device *dev,comedi_subdevice *s,
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_InsnReadAllTimerValue(comedi_device *dev, comedi_subdevice *s,
+INT i_APCI1710_InsnReadAllTimerValue(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
INT i_ReturnValue = 0;
@@ -668,7 +668,7 @@ INT i_APCI1710_InsnReadAllTimerValue(comedi_device *dev, comedi_subdevice *s,
/*
+----------------------------------------------------------------------------+
-| Function Name :INT i_APCI1710_InsnBitsTimer(comedi_device *dev,
+| Function Name :INT i_APCI1710_InsnBitsTimer(struct comedi_device *dev,
comedi_subdevice *s,comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read write functions for Timer |
@@ -681,7 +681,7 @@ comedi_subdevice *s,comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_InsnBitsTimer(comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1710_InsnBitsTimer(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
BYTE b_BitsType;
@@ -760,7 +760,7 @@ INT i_APCI1710_InsnBitsTimer(comedi_device * dev, comedi_subdevice * s,
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_ReadTimerValue(comedi_device * dev,
+INT i_APCI1710_ReadTimerValue(struct comedi_device * dev,
BYTE b_ModulNbr, BYTE b_TimerNbr,
PULONG pul_TimerValue)
{
@@ -848,7 +848,7 @@ INT i_APCI1710_ReadTimerValue(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_GetTimerOutputLevel(comedi_device * dev,
+INT i_APCI1710_GetTimerOutputLevel(struct comedi_device * dev,
BYTE b_ModulNbr, BYTE b_TimerNbr,
PBYTE pb_OutputLevel)
{
@@ -927,7 +927,7 @@ INT i_APCI1710_GetTimerOutputLevel(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_GetTimerProgressStatus(comedi_device *dev,
+INT i_APCI1710_GetTimerProgressStatus(struct comedi_device *dev,
BYTE b_ModulNbr, BYTE b_TimerNbr,
PBYTE pb_TimerStatus)
{
@@ -1006,7 +1006,7 @@ INT i_APCI1710_GetTimerProgressStatus(comedi_device *dev,
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_WriteTimerValue(comedi_device * dev,
+INT i_APCI1710_WriteTimerValue(struct comedi_device * dev,
BYTE b_ModulNbr, BYTE b_TimerNbr,
ULONG ul_WriteValue)
{
diff --git a/drivers/staging/comedi/drivers/addi-data/APCI1710_82x54.h b/drivers/staging/comedi/drivers/addi-data/APCI1710_82x54.h
index 80ee66233ec6..c17ac8ce251c 100644
--- a/drivers/staging/comedi/drivers/addi-data/APCI1710_82x54.h
+++ b/drivers/staging/comedi/drivers/addi-data/APCI1710_82x54.h
@@ -34,40 +34,40 @@
/*
* 82X54 TIMER INISIALISATION FUNCTION
*/
-INT i_APCI1710_InsnConfigInitTimer(comedi_device *dev, comedi_subdevice *s,
+INT i_APCI1710_InsnConfigInitTimer(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI1710_InsnWriteEnableDisableTimer(comedi_device *dev,
+INT i_APCI1710_InsnWriteEnableDisableTimer(struct comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
/*
* 82X54 READ FUNCTION
*/
-INT i_APCI1710_InsnReadAllTimerValue(comedi_device *dev, comedi_subdevice *s,
+INT i_APCI1710_InsnReadAllTimerValue(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI1710_InsnBitsTimer(comedi_device *dev, comedi_subdevice *s,
+INT i_APCI1710_InsnBitsTimer(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
/*
* 82X54 READ & WRITE FUNCTION
*/
-INT i_APCI1710_ReadTimerValue(comedi_device *dev,
+INT i_APCI1710_ReadTimerValue(struct comedi_device *dev,
BYTE b_ModulNbr, BYTE b_TimerNbr,
PULONG pul_TimerValue);
-INT i_APCI1710_GetTimerOutputLevel(comedi_device *dev,
+INT i_APCI1710_GetTimerOutputLevel(struct comedi_device *dev,
BYTE b_ModulNbr, BYTE b_TimerNbr,
PBYTE pb_OutputLevel);
-INT i_APCI1710_GetTimerProgressStatus(comedi_device *dev,
+INT i_APCI1710_GetTimerProgressStatus(struct comedi_device *dev,
BYTE b_ModulNbr, BYTE b_TimerNbr,
PBYTE pb_TimerStatus);
/*
* 82X54 WRITE FUNCTION
*/
-INT i_APCI1710_WriteTimerValue(comedi_device *dev,
+INT i_APCI1710_WriteTimerValue(struct comedi_device *dev,
BYTE b_ModulNbr, BYTE b_TimerNbr,
ULONG ul_WriteValue);
diff --git a/drivers/staging/comedi/drivers/addi-data/APCI1710_Chrono.c b/drivers/staging/comedi/drivers/addi-data/APCI1710_Chrono.c
index 25242871d470..75361fbaeefd 100644
--- a/drivers/staging/comedi/drivers/addi-data/APCI1710_Chrono.c
+++ b/drivers/staging/comedi/drivers/addi-data/APCI1710_Chrono.c
@@ -131,7 +131,7 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_InsnConfigInitChrono(comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1710_InsnConfigInitChrono(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
@@ -790,7 +790,7 @@ INT i_APCI1710_InsnConfigInitChrono(comedi_device * dev, comedi_subdevice * s,
| BYTE_ b_ModulNbr, |
| BYTE_ b_CycleMode, |
| BYTE_ b_InterruptEnable)
-INT i_APCI1710_InsnWriteEnableDisableChrono(comedi_device *dev,
+INT i_APCI1710_InsnWriteEnableDisableChrono(struct comedi_device *dev,
comedi_subdevice *s,comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Enable the chronometer from selected module |
@@ -840,7 +840,7 @@ comedi_subdevice *s,comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_InsnWriteEnableDisableChrono(comedi_device * dev,
+INT i_APCI1710_InsnWriteEnableDisableChrono(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
@@ -1077,7 +1077,7 @@ INT i_APCI1710_InsnWriteEnableDisableChrono(comedi_device * dev,
/*
+----------------------------------------------------------------------------+
-| Function Name :INT i_APCI1710_InsnReadChrono(comedi_device *dev,comedi_subdevice *s,
+| Function Name :INT i_APCI1710_InsnReadChrono(struct comedi_device *dev,comedi_subdevice *s,
comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read functions for Timer |
@@ -1090,7 +1090,7 @@ comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_InsnReadChrono(comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1710_InsnReadChrono(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
BYTE b_ReadType;
@@ -1194,7 +1194,7 @@ INT i_APCI1710_InsnReadChrono(comedi_device * dev, comedi_subdevice * s,
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_GetChronoProgressStatus(comedi_device * dev,
+INT i_APCI1710_GetChronoProgressStatus(struct comedi_device * dev,
BYTE b_ModulNbr, PBYTE pb_ChronoStatus)
{
INT i_ReturnValue = 0;
@@ -1355,7 +1355,7 @@ INT i_APCI1710_GetChronoProgressStatus(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_ReadChronoValue(comedi_device * dev,
+INT i_APCI1710_ReadChronoValue(struct comedi_device * dev,
BYTE b_ModulNbr,
UINT ui_TimeOut, PBYTE pb_ChronoStatus, PULONG pul_ChronoValue)
{
@@ -1619,7 +1619,7 @@ INT i_APCI1710_ReadChronoValue(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_ConvertChronoValue(comedi_device * dev,
+INT i_APCI1710_ConvertChronoValue(struct comedi_device * dev,
BYTE b_ModulNbr,
ULONG ul_ChronoValue,
PULONG pul_Hour,
@@ -1757,7 +1757,7 @@ INT i_APCI1710_ConvertChronoValue(comedi_device * dev,
/*
+----------------------------------------------------------------------------+
-| Function Name : INT i_APCI1710_InsnBitsChronoDigitalIO(comedi_device *dev,comedi_subdevice *s,
+| Function Name : INT i_APCI1710_InsnBitsChronoDigitalIO(struct comedi_device *dev,comedi_subdevice *s,
comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Sets the output witch has been passed with the |
@@ -1876,7 +1876,7 @@ INT i_APCI1710_ConvertChronoValue(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_InsnBitsChronoDigitalIO(comedi_device * dev,
+INT i_APCI1710_InsnBitsChronoDigitalIO(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
diff --git a/drivers/staging/comedi/drivers/addi-data/APCI1710_Chrono.h b/drivers/staging/comedi/drivers/addi-data/APCI1710_Chrono.h
index 9f6d0f003de4..ca4f5e117d5b 100644
--- a/drivers/staging/comedi/drivers/addi-data/APCI1710_Chrono.h
+++ b/drivers/staging/comedi/drivers/addi-data/APCI1710_Chrono.h
@@ -35,10 +35,10 @@
/*
* CHRONOMETER INISIALISATION FUNCTION
*/
-INT i_APCI1710_InsnConfigInitChrono(comedi_device *dev, comedi_subdevice *s,
+INT i_APCI1710_InsnConfigInitChrono(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI1710_InsnWriteEnableDisableChrono(comedi_device *dev,
+INT i_APCI1710_InsnWriteEnableDisableChrono(struct comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
@@ -46,18 +46,18 @@ INT i_APCI1710_InsnWriteEnableDisableChrono(comedi_device *dev,
/*
* CHRONOMETER READ FUNCTION
*/
-INT i_APCI1710_InsnReadChrono(comedi_device *dev, comedi_subdevice *s,
+INT i_APCI1710_InsnReadChrono(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI1710_GetChronoProgressStatus(comedi_device *dev,
+INT i_APCI1710_GetChronoProgressStatus(struct comedi_device *dev,
BYTE b_ModulNbr, PBYTE pb_ChronoStatus);
-INT i_APCI1710_ReadChronoValue(comedi_device *dev,
+INT i_APCI1710_ReadChronoValue(struct comedi_device *dev,
BYTE b_ModulNbr,
UINT ui_TimeOut, PBYTE pb_ChronoStatus,
PULONG pul_ChronoValue);
-INT i_APCI1710_ConvertChronoValue(comedi_device *dev,
+INT i_APCI1710_ConvertChronoValue(struct comedi_device *dev,
BYTE b_ModulNbr,
ULONG ul_ChronoValue,
PULONG pul_Hour,
@@ -69,6 +69,6 @@ INT i_APCI1710_ConvertChronoValue(comedi_device *dev,
/*
* CHRONOMETER DIGITAL INPUT OUTPUT FUNCTION
*/
-INT i_APCI1710_InsnBitsChronoDigitalIO(comedi_device *dev,
+INT i_APCI1710_InsnBitsChronoDigitalIO(struct comedi_device *dev,
comedi_subdevice *s, comedi_insn *insn,
unsigned int *data);
diff --git a/drivers/staging/comedi/drivers/addi-data/APCI1710_Dig_io.c b/drivers/staging/comedi/drivers/addi-data/APCI1710_Dig_io.c
index 87dba6a83d83..586a897a633c 100644
--- a/drivers/staging/comedi/drivers/addi-data/APCI1710_Dig_io.c
+++ b/drivers/staging/comedi/drivers/addi-data/APCI1710_Dig_io.c
@@ -61,7 +61,7 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
/*
+----------------------------------------------------------------------------+
-| Function Name : INT i_APCI1710_InsnConfigDigitalIO(comedi_device *dev, |
+| Function Name : INT i_APCI1710_InsnConfigDigitalIO(struct comedi_device *dev, |
| comedi_subdevice *s,comedi_insn *insn,unsigned int *data)|
+----------------------------------------------------------------------------+
| Task : Configure the digital I/O operating mode from selected |
@@ -99,7 +99,7 @@ Activates and deactivates the digital output memory.
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_InsnConfigDigitalIO(comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1710_InsnConfigDigitalIO(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
BYTE b_ModulNbr, b_ChannelAMode, b_ChannelBMode;
@@ -247,7 +247,7 @@ INT i_APCI1710_InsnConfigDigitalIO(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
-|INT i_APCI1710_InsnReadDigitalIOChlValue(comedi_device *dev,comedi_subdevice
+|INT i_APCI1710_InsnReadDigitalIOChlValue(struct comedi_device *dev,comedi_subdevice
*s, comedi_insn *insn,unsigned int *data)
+----------------------------------------------------------------------------+
@@ -293,7 +293,7 @@ INT i_APCI1710_InsnConfigDigitalIO(comedi_device * dev, comedi_subdevice * s,
// BYTE_ b_InputChannel,
//
// PBYTE_ pb_ChannelStatus)
-INT i_APCI1710_InsnReadDigitalIOChlValue(comedi_device * dev,
+INT i_APCI1710_InsnReadDigitalIOChlValue(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
@@ -481,7 +481,7 @@ INT i_APCI1710_InsnReadDigitalIOChlValue(comedi_device * dev,
//_INT_ i_APCI1710_SetDigitalIOChlOn (BYTE_ b_BoardHandle,
// BYTE_ b_ModulNbr,
// BYTE_ b_OutputChannel)
-INT i_APCI1710_InsnWriteDigitalIOChlOnOff(comedi_device * dev,
+INT i_APCI1710_InsnWriteDigitalIOChlOnOff(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
@@ -676,7 +676,7 @@ INT i_APCI1710_InsnWriteDigitalIOChlOnOff(comedi_device * dev,
/*
+----------------------------------------------------------------------------+
-|INT i_APCI1710_InsnBitsDigitalIOPortOnOff(comedi_device *dev,comedi_subdevice
+|INT i_APCI1710_InsnBitsDigitalIOPortOnOff(struct comedi_device *dev,comedi_subdevice
*s, comedi_insn *insn,unsigned int *data)
+----------------------------------------------------------------------------+
| Task : write:
@@ -728,7 +728,7 @@ INT i_APCI1710_InsnWriteDigitalIOChlOnOff(comedi_device * dev,
//_INT_ i_APCI1710_SetDigitalIOPortOn (BYTE_ b_BoardHandle,
// BYTE_ b_ModulNbr,
// BYTE_ b_PortValue)
-INT i_APCI1710_InsnBitsDigitalIOPortOnOff(comedi_device * dev,
+INT i_APCI1710_InsnBitsDigitalIOPortOnOff(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
diff --git a/drivers/staging/comedi/drivers/addi-data/APCI1710_Dig_io.h b/drivers/staging/comedi/drivers/addi-data/APCI1710_Dig_io.h
index 76dbf0840889..846e9000651b 100644
--- a/drivers/staging/comedi/drivers/addi-data/APCI1710_Dig_io.h
+++ b/drivers/staging/comedi/drivers/addi-data/APCI1710_Dig_io.h
@@ -27,20 +27,20 @@
/*
* DIGITAL I/O INISIALISATION FUNCTION
*/
-INT i_APCI1710_InsnConfigDigitalIO(comedi_device *dev, comedi_subdevice *s,
+INT i_APCI1710_InsnConfigDigitalIO(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
/*
* INPUT OUTPUT FUNCTIONS
*/
-INT i_APCI1710_InsnReadDigitalIOChlValue(comedi_device *dev,
+INT i_APCI1710_InsnReadDigitalIOChlValue(struct comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI1710_InsnWriteDigitalIOChlOnOff(comedi_device *dev,
+INT i_APCI1710_InsnWriteDigitalIOChlOnOff(struct comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI1710_InsnBitsDigitalIOPortOnOff(comedi_device *dev,
+INT i_APCI1710_InsnBitsDigitalIOPortOnOff(struct comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
diff --git a/drivers/staging/comedi/drivers/addi-data/APCI1710_INCCPT.c b/drivers/staging/comedi/drivers/addi-data/APCI1710_INCCPT.c
index 5ad6abff41a5..b8b4dedb0940 100644
--- a/drivers/staging/comedi/drivers/addi-data/APCI1710_INCCPT.c
+++ b/drivers/staging/comedi/drivers/addi-data/APCI1710_INCCPT.c
@@ -61,7 +61,7 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
/*
+----------------------------------------------------------------------------+
-| INT i_APCI1710_InsnConfigINCCPT(comedi_device *dev,comedi_subdevice *s,
+| INT i_APCI1710_InsnConfigINCCPT(struct comedi_device *dev,comedi_subdevice *s,
comedi_insn *insn,unsigned int *data)
+----------------------------------------------------------------------------+
@@ -75,7 +75,7 @@ comedi_insn *insn,unsigned int *data)
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_InsnConfigINCCPT(comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1710_InsnConfigINCCPT(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_ConfigType;
@@ -299,7 +299,7 @@ INT i_APCI1710_InsnConfigINCCPT(comedi_device * dev, comedi_subdevice * s,
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_InitCounter(comedi_device * dev,
+INT i_APCI1710_InitCounter(struct comedi_device * dev,
BYTE b_ModulNbr,
BYTE b_CounterRange,
BYTE b_FirstCounterModus,
@@ -545,7 +545,7 @@ INT i_APCI1710_InitCounter(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_CounterAutoTest(comedi_device * dev, PBYTE pb_TestStatus)
+INT i_APCI1710_CounterAutoTest(struct comedi_device * dev, PBYTE pb_TestStatus)
{
BYTE b_ModulCpt = 0;
INT i_ReturnValue = 0;
@@ -708,7 +708,7 @@ INT i_APCI1710_CounterAutoTest(comedi_device * dev, PBYTE pb_TestStatus)
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_InitIndex(comedi_device * dev,
+INT i_APCI1710_InitIndex(struct comedi_device * dev,
BYTE b_ModulNbr,
BYTE b_ReferenceAction,
BYTE b_IndexOperation, BYTE b_AutoMode, BYTE b_InterruptEnable)
@@ -1152,7 +1152,7 @@ INT i_APCI1710_InitIndex(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_InitReference(comedi_device * dev,
+INT i_APCI1710_InitReference(struct comedi_device * dev,
BYTE b_ModulNbr, BYTE b_ReferenceLevel)
{
INT i_ReturnValue = 0;
@@ -1277,7 +1277,7 @@ INT i_APCI1710_InitReference(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_InitExternalStrobe(comedi_device * dev,
+INT i_APCI1710_InitExternalStrobe(struct comedi_device * dev,
BYTE b_ModulNbr, BYTE b_ExternalStrobe, BYTE b_ExternalStrobeLevel)
{
INT i_ReturnValue = 0;
@@ -1391,7 +1391,7 @@ INT i_APCI1710_InitExternalStrobe(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_InitCompareLogic(comedi_device * dev,
+INT i_APCI1710_InitCompareLogic(struct comedi_device * dev,
BYTE b_ModulNbr, UINT ui_CompareValue)
{
INT i_ReturnValue = 0;
@@ -1487,7 +1487,7 @@ INT i_APCI1710_InitCompareLogic(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_InitFrequencyMeasurement(comedi_device * dev,
+INT i_APCI1710_InitFrequencyMeasurement(struct comedi_device * dev,
BYTE b_ModulNbr,
BYTE b_PCIInputClock,
BYTE b_TimingUnity,
@@ -2002,7 +2002,7 @@ INT i_APCI1710_InitFrequencyMeasurement(comedi_device * dev,
/*
+----------------------------------------------------------------------------+
-| Function Name :INT i_APCI1710_InsnBitsINCCPT(comedi_device *dev,comedi_subdevice *s,
+| Function Name :INT i_APCI1710_InsnBitsINCCPT(struct comedi_device *dev,comedi_subdevice *s,
comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Set & Clear Functions for INC_CPT |
@@ -2015,7 +2015,7 @@ comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_InsnBitsINCCPT(comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1710_InsnBitsINCCPT(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_BitsType;
@@ -2091,7 +2091,7 @@ INT i_APCI1710_InsnBitsINCCPT(comedi_device * dev, comedi_subdevice * s,
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_ClearCounterValue(comedi_device * dev, BYTE b_ModulNbr)
+INT i_APCI1710_ClearCounterValue(struct comedi_device * dev, BYTE b_ModulNbr)
{
INT i_ReturnValue = 0;
@@ -2151,7 +2151,7 @@ INT i_APCI1710_ClearCounterValue(comedi_device * dev, BYTE b_ModulNbr)
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_ClearAllCounterValue(comedi_device * dev)
+INT i_APCI1710_ClearAllCounterValue(struct comedi_device * dev)
{
BYTE b_ModulCpt = 0;
INT i_ReturnValue = 0;
@@ -2297,7 +2297,7 @@ INT i_APCI1710_ClearAllCounterValue(comedi_device * dev)
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_SetInputFilter(comedi_device * dev,
+INT i_APCI1710_SetInputFilter(struct comedi_device * dev,
BYTE b_ModulNbr, BYTE b_PCIInputClock, BYTE b_Filter)
{
INT i_ReturnValue = 0;
@@ -2561,7 +2561,7 @@ INT i_APCI1710_SetInputFilter(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_LatchCounter(comedi_device * dev,
+INT i_APCI1710_LatchCounter(struct comedi_device * dev,
BYTE b_ModulNbr, BYTE b_LatchReg)
{
INT i_ReturnValue = 0;
@@ -2658,7 +2658,7 @@ INT i_APCI1710_LatchCounter(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_SetIndexAndReferenceSource(comedi_device * dev,
+INT i_APCI1710_SetIndexAndReferenceSource(struct comedi_device * dev,
BYTE b_ModulNbr, BYTE b_SourceSelection)
{
INT i_ReturnValue = 0;
@@ -2795,7 +2795,7 @@ INT i_APCI1710_SetIndexAndReferenceSource(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_SetDigitalChlOn(comedi_device * dev, BYTE b_ModulNbr)
+INT i_APCI1710_SetDigitalChlOn(struct comedi_device * dev, BYTE b_ModulNbr)
{
INT i_ReturnValue = 0;
@@ -2875,7 +2875,7 @@ INT i_APCI1710_SetDigitalChlOn(comedi_device * dev, BYTE b_ModulNbr)
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_SetDigitalChlOff(comedi_device * dev, BYTE b_ModulNbr)
+INT i_APCI1710_SetDigitalChlOff(struct comedi_device * dev, BYTE b_ModulNbr)
{
INT i_ReturnValue = 0;
@@ -2939,7 +2939,7 @@ INT i_APCI1710_SetDigitalChlOff(comedi_device * dev, BYTE b_ModulNbr)
/*
+----------------------------------------------------------------------------+
-| Function Name :INT i_APCI1710_InsnWriteINCCPT(comedi_device *dev,comedi_subdevice *s,
+| Function Name :INT i_APCI1710_InsnWriteINCCPT(struct comedi_device *dev,comedi_subdevice *s,
comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Enable Disable functions for INC_CPT |
@@ -2951,7 +2951,7 @@ comedi_insn *insn,unsigned int *data) |
| Return Value :
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_InsnWriteINCCPT(comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1710_InsnWriteINCCPT(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_WriteType;
@@ -3047,7 +3047,7 @@ INT i_APCI1710_InsnWriteINCCPT(comedi_device * dev, comedi_subdevice * s,
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_EnableLatchInterrupt(comedi_device * dev, BYTE b_ModulNbr)
+INT i_APCI1710_EnableLatchInterrupt(struct comedi_device * dev, BYTE b_ModulNbr)
{
INT i_ReturnValue = 0;
@@ -3133,7 +3133,7 @@ INT i_APCI1710_EnableLatchInterrupt(comedi_device * dev, BYTE b_ModulNbr)
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_DisableLatchInterrupt(comedi_device * dev, BYTE b_ModulNbr)
+INT i_APCI1710_DisableLatchInterrupt(struct comedi_device * dev, BYTE b_ModulNbr)
{
INT i_ReturnValue = 0;
@@ -3231,7 +3231,7 @@ INT i_APCI1710_DisableLatchInterrupt(comedi_device * dev, BYTE b_ModulNbr)
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_Write16BitCounterValue(comedi_device * dev,
+INT i_APCI1710_Write16BitCounterValue(struct comedi_device * dev,
BYTE b_ModulNbr, BYTE b_SelectedCounter, UINT ui_WriteValue)
{
INT i_ReturnValue = 0;
@@ -3316,7 +3316,7 @@ INT i_APCI1710_Write16BitCounterValue(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_Write32BitCounterValue(comedi_device * dev,
+INT i_APCI1710_Write32BitCounterValue(struct comedi_device * dev,
BYTE b_ModulNbr, ULONG ul_WriteValue)
{
INT i_ReturnValue = 0;
@@ -3383,7 +3383,7 @@ INT i_APCI1710_Write32BitCounterValue(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_EnableIndex(comedi_device * dev, BYTE b_ModulNbr)
+INT i_APCI1710_EnableIndex(struct comedi_device * dev, BYTE b_ModulNbr)
{
INT i_ReturnValue = 0;
ULONG ul_InterruptLatchReg;
@@ -3481,7 +3481,7 @@ INT i_APCI1710_EnableIndex(comedi_device * dev, BYTE b_ModulNbr)
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_DisableIndex(comedi_device * dev, BYTE b_ModulNbr)
+INT i_APCI1710_DisableIndex(struct comedi_device * dev, BYTE b_ModulNbr)
{
INT i_ReturnValue = 0;
@@ -3580,7 +3580,7 @@ INT i_APCI1710_DisableIndex(comedi_device * dev, BYTE b_ModulNbr)
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_EnableCompareLogic(comedi_device * dev, BYTE b_ModulNbr)
+INT i_APCI1710_EnableCompareLogic(struct comedi_device * dev, BYTE b_ModulNbr)
{
INT i_ReturnValue = 0;
@@ -3680,7 +3680,7 @@ INT i_APCI1710_EnableCompareLogic(comedi_device * dev, BYTE b_ModulNbr)
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_DisableCompareLogic(comedi_device * dev, BYTE b_ModulNbr)
+INT i_APCI1710_DisableCompareLogic(struct comedi_device * dev, BYTE b_ModulNbr)
{
INT i_ReturnValue = 0;
@@ -3789,7 +3789,7 @@ INT i_APCI1710_DisableCompareLogic(comedi_device * dev, BYTE b_ModulNbr)
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_EnableFrequencyMeasurement(comedi_device * dev,
+INT i_APCI1710_EnableFrequencyMeasurement(struct comedi_device * dev,
BYTE b_ModulNbr, BYTE b_InterruptEnable)
{
INT i_ReturnValue = 0;
@@ -3936,7 +3936,7 @@ INT i_APCI1710_EnableFrequencyMeasurement(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_DisableFrequencyMeasurement(comedi_device * dev, BYTE b_ModulNbr)
+INT i_APCI1710_DisableFrequencyMeasurement(struct comedi_device * dev, BYTE b_ModulNbr)
{
INT i_ReturnValue = 0;
@@ -4037,7 +4037,7 @@ INT i_APCI1710_DisableFrequencyMeasurement(comedi_device * dev, BYTE b_ModulNbr)
/*
+----------------------------------------------------------------------------+
-| Function Name :INT i_APCI1710_InsnWriteINCCPT(comedi_device *dev,comedi_subdevice *s,
+| Function Name :INT i_APCI1710_InsnWriteINCCPT(struct comedi_device *dev,comedi_subdevice *s,
comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read and Get functions for INC_CPT |
@@ -4049,7 +4049,7 @@ comedi_insn *insn,unsigned int *data) |
| Return Value :
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_InsnReadINCCPT(comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1710_InsnReadINCCPT(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_ReadType;
@@ -4193,7 +4193,7 @@ INT i_APCI1710_InsnReadINCCPT(comedi_device * dev, comedi_subdevice * s,
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_ReadLatchRegisterStatus(comedi_device * dev,
+INT i_APCI1710_ReadLatchRegisterStatus(struct comedi_device * dev,
BYTE b_ModulNbr, BYTE b_LatchReg, PBYTE pb_LatchStatus)
{
INT i_ReturnValue = 0;
@@ -4280,7 +4280,7 @@ INT i_APCI1710_ReadLatchRegisterStatus(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_ReadLatchRegisterValue(comedi_device * dev,
+INT i_APCI1710_ReadLatchRegisterValue(struct comedi_device * dev,
BYTE b_ModulNbr, BYTE b_LatchReg, PULONG pul_LatchValue)
{
INT i_ReturnValue = 0;
@@ -4364,7 +4364,7 @@ INT i_APCI1710_ReadLatchRegisterValue(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_Read16BitCounterValue(comedi_device * dev,
+INT i_APCI1710_Read16BitCounterValue(struct comedi_device * dev,
BYTE b_ModulNbr, BYTE b_SelectedCounter, PUINT pui_CounterValue)
{
INT i_ReturnValue = 0;
@@ -4459,7 +4459,7 @@ INT i_APCI1710_Read16BitCounterValue(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_Read32BitCounterValue(comedi_device * dev,
+INT i_APCI1710_Read32BitCounterValue(struct comedi_device * dev,
BYTE b_ModulNbr, PULONG pul_CounterValue)
{
INT i_ReturnValue = 0;
@@ -4535,7 +4535,7 @@ INT i_APCI1710_Read32BitCounterValue(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_GetIndexStatus(comedi_device * dev,
+INT i_APCI1710_GetIndexStatus(struct comedi_device * dev,
BYTE b_ModulNbr, PBYTE pb_IndexStatus)
{
INT i_ReturnValue = 0;
@@ -4619,7 +4619,7 @@ INT i_APCI1710_GetIndexStatus(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_GetReferenceStatus(comedi_device * dev,
+INT i_APCI1710_GetReferenceStatus(struct comedi_device * dev,
BYTE b_ModulNbr, PBYTE pb_ReferenceStatus)
{
INT i_ReturnValue = 0;
@@ -4703,7 +4703,7 @@ INT i_APCI1710_GetReferenceStatus(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_GetUASStatus(comedi_device * dev,
+INT i_APCI1710_GetUASStatus(struct comedi_device * dev,
BYTE b_ModulNbr, PBYTE pb_UASStatus)
{
INT i_ReturnValue = 0;
@@ -4771,7 +4771,7 @@ INT i_APCI1710_GetUASStatus(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_GetCBStatus(comedi_device * dev,
+INT i_APCI1710_GetCBStatus(struct comedi_device * dev,
BYTE b_ModulNbr, PBYTE pb_CBStatus)
{
INT i_ReturnValue = 0;
@@ -4853,7 +4853,7 @@ INT i_APCI1710_GetCBStatus(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_Get16BitCBStatus(comedi_device * dev,
+INT i_APCI1710_Get16BitCBStatus(struct comedi_device * dev,
BYTE b_ModulNbr, PBYTE pb_CBStatusCounter0, PBYTE pb_CBStatusCounter1)
{
INT i_ReturnValue = 0;
@@ -4966,7 +4966,7 @@ INT i_APCI1710_Get16BitCBStatus(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_GetUDStatus(comedi_device * dev,
+INT i_APCI1710_GetUDStatus(struct comedi_device * dev,
BYTE b_ModulNbr, PBYTE pb_UDStatus)
{
INT i_ReturnValue = 0;
@@ -5040,7 +5040,7 @@ INT i_APCI1710_GetUDStatus(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_GetInterruptUDLatchedStatus(comedi_device * dev,
+INT i_APCI1710_GetInterruptUDLatchedStatus(struct comedi_device * dev,
BYTE b_ModulNbr, PBYTE pb_UDStatus)
{
INT i_ReturnValue = 0;
@@ -5145,7 +5145,7 @@ INT i_APCI1710_GetInterruptUDLatchedStatus(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_ReadFrequencyMeasurement(comedi_device * dev,
+INT i_APCI1710_ReadFrequencyMeasurement(struct comedi_device * dev,
BYTE b_ModulNbr,
PBYTE pb_Status, PBYTE pb_UDStatus, PULONG pul_ReadValue)
{
diff --git a/drivers/staging/comedi/drivers/addi-data/APCI1710_INCCPT.h b/drivers/staging/comedi/drivers/addi-data/APCI1710_INCCPT.h
index 8abcaa4a971c..a4189aeecaad 100644
--- a/drivers/staging/comedi/drivers/addi-data/APCI1710_INCCPT.h
+++ b/drivers/staging/comedi/drivers/addi-data/APCI1710_INCCPT.h
@@ -132,22 +132,22 @@
#define APCI1710_INCCPT_DISABLEFREQUENCYMEASUREMENT 409
/************ Main Functions *************/
-INT i_APCI1710_InsnConfigINCCPT(comedi_device *dev, comedi_subdevice *s,
+INT i_APCI1710_InsnConfigINCCPT(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int * data);
-INT i_APCI1710_InsnBitsINCCPT(comedi_device *dev, comedi_subdevice * s,
+INT i_APCI1710_InsnBitsINCCPT(struct comedi_device *dev, comedi_subdevice * s,
comedi_insn *insn, unsigned int * data);
-INT i_APCI1710_InsnWriteINCCPT(comedi_device *dev, comedi_subdevice * s,
+INT i_APCI1710_InsnWriteINCCPT(struct comedi_device *dev, comedi_subdevice * s,
comedi_insn *insn, unsigned int * data);
-INT i_APCI1710_InsnReadINCCPT(comedi_device *dev, comedi_subdevice * s,
+INT i_APCI1710_InsnReadINCCPT(struct comedi_device *dev, comedi_subdevice * s,
comedi_insn *insn, unsigned int * data);
/*********** Supplementary Functions********/
/* INSN CONFIG */
-INT i_APCI1710_InitCounter(comedi_device *dev,
+INT i_APCI1710_InitCounter(struct comedi_device *dev,
BYTE b_ModulNbr,
BYTE b_CounterRange,
BYTE b_FirstCounterModus,
@@ -155,25 +155,25 @@ INT i_APCI1710_InitCounter(comedi_device *dev,
BYTE b_SecondCounterModus,
BYTE b_SecondCounterOption);
-INT i_APCI1710_CounterAutoTest(comedi_device *dev, PBYTE pb_TestStatus);
+INT i_APCI1710_CounterAutoTest(struct comedi_device *dev, PBYTE pb_TestStatus);
-INT i_APCI1710_InitIndex(comedi_device *dev,
+INT i_APCI1710_InitIndex(struct comedi_device *dev,
BYTE b_ModulNbr,
BYTE b_ReferenceAction,
BYTE b_IndexOperation, BYTE b_AutoMode,
BYTE b_InterruptEnable);
-INT i_APCI1710_InitReference(comedi_device *dev,
+INT i_APCI1710_InitReference(struct comedi_device *dev,
BYTE b_ModulNbr, BYTE b_ReferenceLevel);
-INT i_APCI1710_InitExternalStrobe(comedi_device *dev,
+INT i_APCI1710_InitExternalStrobe(struct comedi_device *dev,
BYTE b_ModulNbr, BYTE b_ExternalStrobe,
BYTE b_ExternalStrobeLevel);
-INT i_APCI1710_InitCompareLogic(comedi_device *dev,
+INT i_APCI1710_InitCompareLogic(struct comedi_device *dev,
BYTE b_ModulNbr, UINT ui_CompareValue);
-INT i_APCI1710_InitFrequencyMeasurement(comedi_device *dev,
+INT i_APCI1710_InitFrequencyMeasurement(struct comedi_device *dev,
BYTE b_ModulNbr,
BYTE b_PCIInputClock,
BYTE b_TimingUnity,
@@ -181,91 +181,91 @@ INT i_APCI1710_InitFrequencyMeasurement(comedi_device *dev,
PULONG pul_RealTimingInterval);
/* INSN BITS */
-INT i_APCI1710_ClearCounterValue(comedi_device *dev, BYTE b_ModulNbr);
+INT i_APCI1710_ClearCounterValue(struct comedi_device *dev, BYTE b_ModulNbr);
-INT i_APCI1710_ClearAllCounterValue(comedi_device *dev);
+INT i_APCI1710_ClearAllCounterValue(struct comedi_device *dev);
-INT i_APCI1710_SetInputFilter(comedi_device *dev,
+INT i_APCI1710_SetInputFilter(struct comedi_device *dev,
BYTE b_ModulNbr, BYTE b_PCIInputClock,
BYTE b_Filter);
-INT i_APCI1710_LatchCounter(comedi_device *dev,
+INT i_APCI1710_LatchCounter(struct comedi_device *dev,
BYTE b_ModulNbr, BYTE b_LatchReg);
-INT i_APCI1710_SetIndexAndReferenceSource(comedi_device *dev,
+INT i_APCI1710_SetIndexAndReferenceSource(struct comedi_device *dev,
BYTE b_ModulNbr,
BYTE b_SourceSelection);
-INT i_APCI1710_SetDigitalChlOn(comedi_device *dev, BYTE b_ModulNbr);
+INT i_APCI1710_SetDigitalChlOn(struct comedi_device *dev, BYTE b_ModulNbr);
-INT i_APCI1710_SetDigitalChlOff(comedi_device *dev, BYTE b_ModulNbr);
+INT i_APCI1710_SetDigitalChlOff(struct comedi_device *dev, BYTE b_ModulNbr);
/* INSN WRITE */
-INT i_APCI1710_EnableLatchInterrupt(comedi_device *dev, BYTE b_ModulNbr);
+INT i_APCI1710_EnableLatchInterrupt(struct comedi_device *dev, BYTE b_ModulNbr);
-INT i_APCI1710_DisableLatchInterrupt(comedi_device *dev, BYTE b_ModulNbr);
+INT i_APCI1710_DisableLatchInterrupt(struct comedi_device *dev, BYTE b_ModulNbr);
-INT i_APCI1710_Write16BitCounterValue(comedi_device *dev,
+INT i_APCI1710_Write16BitCounterValue(struct comedi_device *dev,
BYTE b_ModulNbr, BYTE b_SelectedCounter,
UINT ui_WriteValue);
-INT i_APCI1710_Write32BitCounterValue(comedi_device *dev,
+INT i_APCI1710_Write32BitCounterValue(struct comedi_device *dev,
BYTE b_ModulNbr, ULONG ul_WriteValue);
-INT i_APCI1710_EnableIndex(comedi_device *dev, BYTE b_ModulNbr);
+INT i_APCI1710_EnableIndex(struct comedi_device *dev, BYTE b_ModulNbr);
-INT i_APCI1710_DisableIndex(comedi_device *dev, BYTE b_ModulNbr);
+INT i_APCI1710_DisableIndex(struct comedi_device *dev, BYTE b_ModulNbr);
-INT i_APCI1710_EnableCompareLogic(comedi_device *dev, BYTE b_ModulNbr);
+INT i_APCI1710_EnableCompareLogic(struct comedi_device *dev, BYTE b_ModulNbr);
-INT i_APCI1710_DisableCompareLogic(comedi_device *dev, BYTE b_ModulNbr);
+INT i_APCI1710_DisableCompareLogic(struct comedi_device *dev, BYTE b_ModulNbr);
-INT i_APCI1710_EnableFrequencyMeasurement(comedi_device *dev,
+INT i_APCI1710_EnableFrequencyMeasurement(struct comedi_device *dev,
BYTE b_ModulNbr,
BYTE b_InterruptEnable);
-INT i_APCI1710_DisableFrequencyMeasurement(comedi_device *dev,
+INT i_APCI1710_DisableFrequencyMeasurement(struct comedi_device *dev,
BYTE b_ModulNbr);
/* INSN READ */
-INT i_APCI1710_ReadLatchRegisterStatus(comedi_device *dev,
+INT i_APCI1710_ReadLatchRegisterStatus(struct comedi_device *dev,
BYTE b_ModulNbr, BYTE b_LatchReg,
PBYTE pb_LatchStatus);
-INT i_APCI1710_ReadLatchRegisterValue(comedi_device *dev,
+INT i_APCI1710_ReadLatchRegisterValue(struct comedi_device *dev,
BYTE b_ModulNbr, BYTE b_LatchReg,
PULONG pul_LatchValue);
-INT i_APCI1710_Read16BitCounterValue(comedi_device *dev,
+INT i_APCI1710_Read16BitCounterValue(struct comedi_device *dev,
BYTE b_ModulNbr, BYTE b_SelectedCounter,
PUINT pui_CounterValue);
-INT i_APCI1710_Read32BitCounterValue(comedi_device *dev,
+INT i_APCI1710_Read32BitCounterValue(struct comedi_device *dev,
BYTE b_ModulNbr, PULONG pul_CounterValue);
-INT i_APCI1710_GetIndexStatus(comedi_device *dev,
+INT i_APCI1710_GetIndexStatus(struct comedi_device *dev,
BYTE b_ModulNbr, PBYTE pb_IndexStatus);
-INT i_APCI1710_GetReferenceStatus(comedi_device *dev,
+INT i_APCI1710_GetReferenceStatus(struct comedi_device *dev,
BYTE b_ModulNbr, PBYTE pb_ReferenceStatus);
-INT i_APCI1710_GetUASStatus(comedi_device *dev,
+INT i_APCI1710_GetUASStatus(struct comedi_device *dev,
BYTE b_ModulNbr, PBYTE pb_UASStatus);
-INT i_APCI1710_GetCBStatus(comedi_device *dev,
+INT i_APCI1710_GetCBStatus(struct comedi_device *dev,
BYTE b_ModulNbr, PBYTE pb_CBStatus);
-INT i_APCI1710_Get16BitCBStatus(comedi_device *dev,
+INT i_APCI1710_Get16BitCBStatus(struct comedi_device *dev,
BYTE b_ModulNbr, PBYTE pb_CBStatusCounter0,
PBYTE pb_CBStatusCounter1);
-INT i_APCI1710_GetUDStatus(comedi_device *dev,
+INT i_APCI1710_GetUDStatus(struct comedi_device *dev,
BYTE b_ModulNbr, PBYTE pb_UDStatus);
-INT i_APCI1710_GetInterruptUDLatchedStatus(comedi_device *dev,
+INT i_APCI1710_GetInterruptUDLatchedStatus(struct comedi_device *dev,
BYTE b_ModulNbr, PBYTE pb_UDStatus);
-INT i_APCI1710_ReadFrequencyMeasurement(comedi_device *dev,
+INT i_APCI1710_ReadFrequencyMeasurement(struct comedi_device *dev,
BYTE b_ModulNbr,
PBYTE pb_Status, PBYTE pb_UDStatus,
PULONG pul_ReadValue);
diff --git a/drivers/staging/comedi/drivers/addi-data/APCI1710_Inp_cpt.c b/drivers/staging/comedi/drivers/addi-data/APCI1710_Inp_cpt.c
index d6101c9a998a..e557e6c40cf6 100644
--- a/drivers/staging/comedi/drivers/addi-data/APCI1710_Inp_cpt.c
+++ b/drivers/staging/comedi/drivers/addi-data/APCI1710_Inp_cpt.c
@@ -123,7 +123,7 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_InsnConfigInitPulseEncoder(comedi_device * dev,
+INT i_APCI1710_InsnConfigInitPulseEncoder(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
@@ -414,7 +414,7 @@ INT i_APCI1710_InsnConfigInitPulseEncoder(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_InsnWriteEnableDisablePulseEncoder(comedi_device * dev,
+INT i_APCI1710_InsnWriteEnableDisablePulseEncoder(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
@@ -708,7 +708,7 @@ INT i_APCI1710_InsnWriteEnableDisablePulseEncoder(comedi_device * dev,
PBYTE_ pb_Status)
*/
-INT i_APCI1710_InsnBitsReadWritePulseEncoder(comedi_device * dev,
+INT i_APCI1710_InsnBitsReadWritePulseEncoder(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
@@ -834,7 +834,7 @@ INT i_APCI1710_InsnBitsReadWritePulseEncoder(comedi_device * dev,
return (i_ReturnValue);
}
-INT i_APCI1710_InsnReadInterruptPulseEncoder(comedi_device * dev,
+INT i_APCI1710_InsnReadInterruptPulseEncoder(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
diff --git a/drivers/staging/comedi/drivers/addi-data/APCI1710_Inp_cpt.h b/drivers/staging/comedi/drivers/addi-data/APCI1710_Inp_cpt.h
index c901a317fc61..1dbdc39f96e0 100644
--- a/drivers/staging/comedi/drivers/addi-data/APCI1710_Inp_cpt.h
+++ b/drivers/staging/comedi/drivers/addi-data/APCI1710_Inp_cpt.h
@@ -21,11 +21,11 @@
#define APCI1710_PULSEENCODER_READ 0
#define APCI1710_PULSEENCODER_WRITE 1
-INT i_APCI1710_InsnConfigInitPulseEncoder(comedi_device *dev,
+INT i_APCI1710_InsnConfigInitPulseEncoder(struct comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI1710_InsnWriteEnableDisablePulseEncoder(comedi_device *dev,
+INT i_APCI1710_InsnWriteEnableDisablePulseEncoder(struct comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
@@ -33,7 +33,7 @@ INT i_APCI1710_InsnWriteEnableDisablePulseEncoder(comedi_device *dev,
/*
* READ PULSE ENCODER FUNCTIONS
*/
-INT i_APCI1710_InsnReadInterruptPulseEncoder(comedi_device *dev,
+INT i_APCI1710_InsnReadInterruptPulseEncoder(struct comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
@@ -41,7 +41,7 @@ INT i_APCI1710_InsnReadInterruptPulseEncoder(comedi_device *dev,
/*
* WRITE PULSE ENCODER FUNCTIONS
*/
-INT i_APCI1710_InsnBitsReadWritePulseEncoder(comedi_device *dev,
+INT i_APCI1710_InsnBitsReadWritePulseEncoder(struct comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
diff --git a/drivers/staging/comedi/drivers/addi-data/APCI1710_Pwm.c b/drivers/staging/comedi/drivers/addi-data/APCI1710_Pwm.c
index 9a2dd408f38f..178d773563a1 100644
--- a/drivers/staging/comedi/drivers/addi-data/APCI1710_Pwm.c
+++ b/drivers/staging/comedi/drivers/addi-data/APCI1710_Pwm.c
@@ -57,7 +57,7 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
/*
+----------------------------------------------------------------------------+
-| Function Name :INT i_APCI1710_InsnConfigPWM(comedi_device *dev,
+| Function Name :INT i_APCI1710_InsnConfigPWM(struct comedi_device *dev,
comedi_subdevice *s,comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Pwm Init and Get Pwm Initialisation |
@@ -70,7 +70,7 @@ comedi_subdevice *s,comedi_insn *insn,unsigned int *data)
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_InsnConfigPWM(comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1710_InsnConfigPWM(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
BYTE b_ConfigType;
@@ -179,7 +179,7 @@ INT i_APCI1710_InsnConfigPWM(comedi_device * dev, comedi_subdevice * s,
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_InitPWM(comedi_device * dev,
+INT i_APCI1710_InitPWM(struct comedi_device * dev,
BYTE b_ModulNbr,
BYTE b_PWM,
BYTE b_ClockSelection,
@@ -1534,7 +1534,7 @@ INT i_APCI1710_InitPWM(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_GetPWMInitialisation(comedi_device * dev,
+INT i_APCI1710_GetPWMInitialisation(struct comedi_device * dev,
BYTE b_ModulNbr,
BYTE b_PWM,
PBYTE pb_TimingUnit,
@@ -1670,7 +1670,7 @@ INT i_APCI1710_GetPWMInitialisation(comedi_device * dev,
/*
+----------------------------------------------------------------------------+
-| Function Name :INT i_APCI1710_InsnWritePWM(comedi_device *dev,
+| Function Name :INT i_APCI1710_InsnWritePWM(struct comedi_device *dev,
comedi_subdevice *s,comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Pwm Enable Disable and Set New Timing |
@@ -1683,7 +1683,7 @@ comedi_subdevice *s,comedi_insn *insn,unsigned int *data)
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_InsnWritePWM(comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1710_InsnWritePWM(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
BYTE b_WriteType;
@@ -1806,7 +1806,7 @@ INT i_APCI1710_InsnWritePWM(comedi_device * dev, comedi_subdevice * s,
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_EnablePWM(comedi_device * dev,
+INT i_APCI1710_EnablePWM(struct comedi_device * dev,
BYTE b_ModulNbr,
BYTE b_PWM,
BYTE b_StartLevel,
@@ -2062,7 +2062,7 @@ INT i_APCI1710_EnablePWM(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_DisablePWM(comedi_device * dev, BYTE b_ModulNbr, BYTE b_PWM)
+INT i_APCI1710_DisablePWM(struct comedi_device * dev, BYTE b_ModulNbr, BYTE b_PWM)
{
INT i_ReturnValue = 0;
DWORD dw_Status;
@@ -2189,7 +2189,7 @@ INT i_APCI1710_DisablePWM(comedi_device * dev, BYTE b_ModulNbr, BYTE b_PWM)
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_SetNewPWMTiming(comedi_device * dev,
+INT i_APCI1710_SetNewPWMTiming(struct comedi_device * dev,
BYTE b_ModulNbr,
BYTE b_PWM, BYTE b_TimingUnit, ULONG ul_LowTiming, ULONG ul_HighTiming)
{
@@ -3460,7 +3460,7 @@ INT i_APCI1710_SetNewPWMTiming(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_InsnReadGetPWMStatus(comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1710_InsnReadGetPWMStatus(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
@@ -3561,7 +3561,7 @@ INT i_APCI1710_InsnReadGetPWMStatus(comedi_device * dev, comedi_subdevice * s,
return (i_ReturnValue);
}
-INT i_APCI1710_InsnBitsReadPWMInterrupt(comedi_device * dev,
+INT i_APCI1710_InsnBitsReadPWMInterrupt(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
data[0] = devpriv->s_InterruptParameters.
diff --git a/drivers/staging/comedi/drivers/addi-data/APCI1710_Pwm.h b/drivers/staging/comedi/drivers/addi-data/APCI1710_Pwm.h
index 1f40d00b10e6..0c10b1e8fab4 100644
--- a/drivers/staging/comedi/drivers/addi-data/APCI1710_Pwm.h
+++ b/drivers/staging/comedi/drivers/addi-data/APCI1710_Pwm.h
@@ -26,10 +26,10 @@
#define APCI1710_PWM_ENABLE 1
#define APCI1710_PWM_NEWTIMING 2
-INT i_APCI1710_InsnConfigPWM(comedi_device *dev, comedi_subdevice *s,
+INT i_APCI1710_InsnConfigPWM(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI1710_InitPWM(comedi_device *dev,
+INT i_APCI1710_InitPWM(struct comedi_device *dev,
BYTE b_ModulNbr,
BYTE b_PWM,
BYTE b_ClockSelection,
@@ -38,7 +38,7 @@ INT i_APCI1710_InitPWM(comedi_device *dev,
ULONG ul_HighTiming,
PULONG pul_RealLowTiming, PULONG pul_RealHighTiming);
-INT i_APCI1710_GetPWMInitialisation(comedi_device *dev,
+INT i_APCI1710_GetPWMInitialisation(struct comedi_device *dev,
BYTE b_ModulNbr,
BYTE b_PWM,
PBYTE pb_TimingUnit,
@@ -50,10 +50,10 @@ INT i_APCI1710_GetPWMInitialisation(comedi_device *dev,
PBYTE pb_ExternGate,
PBYTE pb_InterruptEnable, PBYTE pb_Enable);
-INT i_APCI1710_InsnWritePWM(comedi_device *dev, comedi_subdevice *s,
+INT i_APCI1710_InsnWritePWM(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI1710_EnablePWM(comedi_device *dev,
+INT i_APCI1710_EnablePWM(struct comedi_device *dev,
BYTE b_ModulNbr,
BYTE b_PWM,
BYTE b_StartLevel,
@@ -61,16 +61,16 @@ INT i_APCI1710_EnablePWM(comedi_device *dev,
BYTE b_StopLevel, BYTE b_ExternGate,
BYTE b_InterruptEnable);
-INT i_APCI1710_SetNewPWMTiming(comedi_device *dev,
+INT i_APCI1710_SetNewPWMTiming(struct comedi_device *dev,
BYTE b_ModulNbr,
BYTE b_PWM, BYTE b_TimingUnit,
ULONG ul_LowTiming, ULONG ul_HighTiming);
-INT i_APCI1710_DisablePWM(comedi_device *dev, BYTE b_ModulNbr, BYTE b_PWM);
+INT i_APCI1710_DisablePWM(struct comedi_device *dev, BYTE b_ModulNbr, BYTE b_PWM);
-INT i_APCI1710_InsnReadGetPWMStatus(comedi_device *dev, comedi_subdevice *s,
+INT i_APCI1710_InsnReadGetPWMStatus(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI1710_InsnBitsReadPWMInterrupt(comedi_device *dev,
+INT i_APCI1710_InsnBitsReadPWMInterrupt(struct comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
diff --git a/drivers/staging/comedi/drivers/addi-data/APCI1710_Ssi.c b/drivers/staging/comedi/drivers/addi-data/APCI1710_Ssi.c
index 650b5752e61a..de2b158698f6 100644
--- a/drivers/staging/comedi/drivers/addi-data/APCI1710_Ssi.c
+++ b/drivers/staging/comedi/drivers/addi-data/APCI1710_Ssi.c
@@ -133,7 +133,7 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_InsnConfigInitSSI(comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1710_InsnConfigInitSSI(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
@@ -362,7 +362,7 @@ INT i_APCI1710_InsnConfigInitSSI(comedi_device * dev, comedi_subdevice * s,
| BYTE_ b_SelectedSSI, |
| PULONG_ pul_Position, |
| PULONG_ pul_TurnCpt)
- INT i_APCI1710_ReadSSIValue(comedi_device *dev,comedi_subdevice *s,
+ INT i_APCI1710_ReadSSIValue(struct comedi_device *dev,comedi_subdevice *s,
comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task :
@@ -400,7 +400,7 @@ pul_Position = (PULONG) &data[0];
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_InsnReadSSIValue(comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1710_InsnReadSSIValue(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
@@ -735,7 +735,7 @@ INT i_APCI1710_InsnReadSSIValue(comedi_device * dev, comedi_subdevice * s,
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_InsnBitsSSIDigitalIO(comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1710_InsnBitsSSIDigitalIO(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
diff --git a/drivers/staging/comedi/drivers/addi-data/APCI1710_Ssi.h b/drivers/staging/comedi/drivers/addi-data/APCI1710_Ssi.h
index a0ad47d2f7a8..2a631b8163c4 100644
--- a/drivers/staging/comedi/drivers/addi-data/APCI1710_Ssi.h
+++ b/drivers/staging/comedi/drivers/addi-data/APCI1710_Ssi.h
@@ -33,11 +33,11 @@
/*
* SSI INISIALISATION FUNCTION
*/
-INT i_APCI1710_InsnConfigInitSSI(comedi_device *dev, comedi_subdevice *s,
+INT i_APCI1710_InsnConfigInitSSI(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI1710_InsnReadSSIValue(comedi_device *dev, comedi_subdevice *s,
+INT i_APCI1710_InsnReadSSIValue(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI1710_InsnBitsSSIDigitalIO(comedi_device *dev, comedi_subdevice *s,
+INT i_APCI1710_InsnBitsSSIDigitalIO(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
diff --git a/drivers/staging/comedi/drivers/addi-data/APCI1710_Tor.c b/drivers/staging/comedi/drivers/addi-data/APCI1710_Tor.c
index 09d5a2fadee6..a9cad8066a54 100644
--- a/drivers/staging/comedi/drivers/addi-data/APCI1710_Tor.c
+++ b/drivers/staging/comedi/drivers/addi-data/APCI1710_Tor.c
@@ -130,7 +130,7 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_InsnConfigInitTorCounter(comedi_device * dev,
+INT i_APCI1710_InsnConfigInitTorCounter(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
@@ -987,7 +987,7 @@ INT i_APCI1710_InsnConfigInitTorCounter(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_InsnWriteEnableDisableTorCounter(comedi_device * dev,
+INT i_APCI1710_InsnWriteEnableDisableTorCounter(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
@@ -1460,7 +1460,7 @@ INT i_APCI1710_InsnWriteEnableDisableTorCounter(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_InsnReadGetTorCounterInitialisation(comedi_device * dev,
+INT i_APCI1710_InsnReadGetTorCounterInitialisation(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
@@ -1700,7 +1700,7 @@ INT i_APCI1710_InsnReadGetTorCounterInitialisation(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_InsnBitsGetTorCounterProgressStatusAndValue(comedi_device * dev,
+INT i_APCI1710_InsnBitsGetTorCounterProgressStatusAndValue(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
diff --git a/drivers/staging/comedi/drivers/addi-data/APCI1710_Tor.h b/drivers/staging/comedi/drivers/addi-data/APCI1710_Tor.h
index a4807de42441..80d100a9bc92 100644
--- a/drivers/staging/comedi/drivers/addi-data/APCI1710_Tor.h
+++ b/drivers/staging/comedi/drivers/addi-data/APCI1710_Tor.h
@@ -35,23 +35,23 @@
/*
* TOR_COUNTER INISIALISATION FUNCTION
*/
-INT i_APCI1710_InsnConfigInitTorCounter(comedi_device *dev,
+INT i_APCI1710_InsnConfigInitTorCounter(struct comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI1710_InsnWriteEnableDisableTorCounter(comedi_device *dev,
+INT i_APCI1710_InsnWriteEnableDisableTorCounter(struct comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
-INT i_APCI1710_InsnReadGetTorCounterInitialisation(comedi_device *dev,
+INT i_APCI1710_InsnReadGetTorCounterInitialisation(struct comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
/*
* TOR_COUNTER READ FUNCTION
*/
-INT i_APCI1710_InsnBitsGetTorCounterProgressStatusAndValue(comedi_device *dev,
+INT i_APCI1710_InsnBitsGetTorCounterProgressStatusAndValue(struct comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
diff --git a/drivers/staging/comedi/drivers/addi-data/APCI1710_Ttl.c b/drivers/staging/comedi/drivers/addi-data/APCI1710_Ttl.c
index 0a40f46442e9..9932fc1fa55f 100644
--- a/drivers/staging/comedi/drivers/addi-data/APCI1710_Ttl.c
+++ b/drivers/staging/comedi/drivers/addi-data/APCI1710_Ttl.c
@@ -100,7 +100,7 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_InsnConfigInitTTLIO(comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1710_InsnConfigInitTTLIO(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
@@ -406,7 +406,7 @@ APCI1710_TTL_READCHANNEL
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_InsnBitsReadTTLIO(comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1710_InsnBitsReadTTLIO(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
@@ -655,7 +655,7 @@ INT i_APCI1710_InsnBitsReadTTLIO(comedi_device * dev, comedi_subdevice * s,
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_InsnReadTTLIOAllPortValue(comedi_device * dev,
+INT i_APCI1710_InsnReadTTLIOAllPortValue(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
@@ -792,7 +792,7 @@ INT i_APCI1710_InsnReadTTLIOAllPortValue(comedi_device * dev,
| (BYTE_ b_BoardHandle, |
| BYTE_ b_ModulNbr, |
| BYTE_ b_OutputChannel)
-INT i_APCI1710_InsnWriteSetTTLIOChlOnOff(comedi_device *dev,comedi_subdevice *s,
+INT i_APCI1710_InsnWriteSetTTLIOChlOnOff(struct comedi_device *dev,comedi_subdevice *s,
comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Sets or resets the output witch has been passed with the |
@@ -825,7 +825,7 @@ INT i_APCI1710_InsnWriteSetTTLIOChlOnOff(comedi_device *dev,comedi_subdevice *s,
+----------------------------------------------------------------------------+
*/
-INT i_APCI1710_InsnWriteSetTTLIOChlOnOff(comedi_device * dev,
+INT i_APCI1710_InsnWriteSetTTLIOChlOnOff(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = 0;
diff --git a/drivers/staging/comedi/drivers/addi-data/APCI1710_Ttl.h b/drivers/staging/comedi/drivers/addi-data/APCI1710_Ttl.h
index 8993ac642736..d0bde4bb809a 100644
--- a/drivers/staging/comedi/drivers/addi-data/APCI1710_Ttl.h
+++ b/drivers/staging/comedi/drivers/addi-data/APCI1710_Ttl.h
@@ -24,21 +24,21 @@
/*
* TTL INISIALISATION FUNCTION
*/
-INT i_APCI1710_InsnConfigInitTTLIO(comedi_device *dev, comedi_subdevice *s,
+INT i_APCI1710_InsnConfigInitTTLIO(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
/*
* TTL INPUT FUNCTION
*/
-INT i_APCI1710_InsnBitsReadTTLIO(comedi_device *dev, comedi_subdevice *s,
+INT i_APCI1710_InsnBitsReadTTLIO(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI1710_InsnReadTTLIOAllPortValue(comedi_device *dev,
+INT i_APCI1710_InsnReadTTLIOAllPortValue(struct comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
/*
* TTL OUTPUT FUNCTIONS
*/
-INT i_APCI1710_InsnWriteSetTTLIOChlOnOff(comedi_device *dev,
+INT i_APCI1710_InsnWriteSetTTLIOChlOnOff(struct comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
diff --git a/drivers/staging/comedi/drivers/addi-data/addi_common.c b/drivers/staging/comedi/drivers/addi-data/addi_common.c
index 4cd552568ac3..1e091eca8019 100644
--- a/drivers/staging/comedi/drivers/addi-data/addi_common.c
+++ b/drivers/staging/comedi/drivers/addi-data/addi_common.c
@@ -2541,7 +2541,7 @@ COMEDI_PCI_INITCLEANUP(driver_addi, addi_apci_tbl);
/*
+----------------------------------------------------------------------------+
-| Function name :static int i_ADDI_Attach(comedi_device *dev, |
+| Function name :static int i_ADDI_Attach(struct comedi_device *dev, |
| comedi_devconfig *it) |
| |
+----------------------------------------------------------------------------+
@@ -2550,7 +2550,7 @@ COMEDI_PCI_INITCLEANUP(driver_addi, addi_apci_tbl);
| This function does all the initializations and memory |
| allocation of data structures for the driver. |
+----------------------------------------------------------------------------+
-| Input Parameters :comedi_device *dev |
+| Input Parameters :struct comedi_device *dev |
| comedi_devconfig *it |
| |
+----------------------------------------------------------------------------+
@@ -2559,7 +2559,7 @@ COMEDI_PCI_INITCLEANUP(driver_addi, addi_apci_tbl);
+----------------------------------------------------------------------------+
*/
-static int i_ADDI_Attach(comedi_device * dev, comedi_devconfig * it)
+static int i_ADDI_Attach(struct comedi_device * dev, comedi_devconfig * it)
{
comedi_subdevice *s;
int ret, pages, i, n_subdevices;
@@ -2909,7 +2909,7 @@ static int i_ADDI_Attach(comedi_device * dev, comedi_devconfig * it)
/*
+----------------------------------------------------------------------------+
-| Function name : static int i_ADDI_Detach(comedi_device *dev) |
+| Function name : static int i_ADDI_Detach(struct comedi_device *dev) |
| |
| |
+----------------------------------------------------------------------------+
@@ -2917,7 +2917,7 @@ static int i_ADDI_Attach(comedi_device * dev, comedi_devconfig * it)
| Free the DMA buffers, unregister irq. |
| |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev |
+| Input Parameters : struct comedi_device *dev |
| |
| |
+----------------------------------------------------------------------------+
@@ -2926,7 +2926,7 @@ static int i_ADDI_Attach(comedi_device * dev, comedi_devconfig * it)
+----------------------------------------------------------------------------+
*/
-static int i_ADDI_Detach(comedi_device * dev)
+static int i_ADDI_Detach(struct comedi_device * dev)
{
if (dev->private) {
@@ -2976,14 +2976,14 @@ static int i_ADDI_Detach(comedi_device * dev)
/*
+----------------------------------------------------------------------------+
-| Function name : static int i_ADDI_Reset(comedi_device *dev) |
+| Function name : static int i_ADDI_Reset(struct comedi_device *dev) |
| |
+----------------------------------------------------------------------------+
| Task : Disables all interrupts, Resets digital output to low, |
| Set all analog output to low |
| |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev |
+| Input Parameters : struct comedi_device *dev |
| |
| |
+----------------------------------------------------------------------------+
@@ -2992,7 +2992,7 @@ static int i_ADDI_Detach(comedi_device * dev)
+----------------------------------------------------------------------------+
*/
-static int i_ADDI_Reset(comedi_device * dev)
+static int i_ADDI_Reset(struct comedi_device * dev)
{
this_board->i_hwdrv_Reset(dev);
@@ -3020,7 +3020,7 @@ static int i_ADDI_Reset(comedi_device * dev)
static irqreturn_t v_ADDI_Interrupt(int irq, void *d PT_REGS_ARG)
{
- comedi_device *dev = d;
+ struct comedi_device *dev = d;
this_board->v_hwdrv_Interrupt(irq, d);
return IRQ_RETVAL(1);
}
@@ -3029,14 +3029,14 @@ static irqreturn_t v_ADDI_Interrupt(int irq, void *d PT_REGS_ARG)
/*
+----------------------------------------------------------------------------+
| Function name : |
-|INT i_ADDIDATA_InsnReadEeprom(comedi_device *dev,comedi_subdevice *s,
+|INT i_ADDIDATA_InsnReadEeprom(struct comedi_device *dev,comedi_subdevice *s,
comedi_insn *insn,unsigned int *data)
| |
+----------------------------------------------------------------------------+
| Task : Read 256 words from EEPROM |
| |
+----------------------------------------------------------------------------+
-| Input Parameters :(comedi_device *dev,comedi_subdevice *s,
+| Input Parameters :(struct comedi_device *dev,comedi_subdevice *s,
comedi_insn *insn,unsigned int *data) |
| |
| |
@@ -3046,7 +3046,7 @@ static irqreturn_t v_ADDI_Interrupt(int irq, void *d PT_REGS_ARG)
+----------------------------------------------------------------------------+
*/
-static int i_ADDIDATA_InsnReadEeprom(comedi_device * dev, comedi_subdevice * s,
+static int i_ADDIDATA_InsnReadEeprom(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
WORD w_Data;
diff --git a/drivers/staging/comedi/drivers/addi-data/addi_common.h b/drivers/staging/comedi/drivers/addi-data/addi_common.h
index ca7c5cb4dac6..9f3aa717b403 100644
--- a/drivers/staging/comedi/drivers/addi-data/addi_common.h
+++ b/drivers/staging/comedi/drivers/addi-data/addi_common.h
@@ -112,108 +112,108 @@ typedef struct {
/* interrupt and reset */
void (*v_hwdrv_Interrupt)(int irq, void *d);
- int (*i_hwdrv_Reset)(comedi_device *dev);
+ int (*i_hwdrv_Reset)(struct comedi_device *dev);
/* Subdevice functions */
/* ANALOG INPUT */
- int (*i_hwdrv_InsnConfigAnalogInput)(comedi_device *dev,
+ int (*i_hwdrv_InsnConfigAnalogInput)(struct comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
- int (*i_hwdrv_InsnReadAnalogInput)(comedi_device *dev,
+ int (*i_hwdrv_InsnReadAnalogInput)(struct comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
- int (*i_hwdrv_InsnWriteAnalogInput)(comedi_device *dev,
+ int (*i_hwdrv_InsnWriteAnalogInput)(struct comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
- int (*i_hwdrv_InsnBitsAnalogInput)(comedi_device *dev,
+ int (*i_hwdrv_InsnBitsAnalogInput)(struct comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
- int (*i_hwdrv_CommandTestAnalogInput)(comedi_device *dev,
+ int (*i_hwdrv_CommandTestAnalogInput)(struct comedi_device *dev,
comedi_subdevice *s,
comedi_cmd *cmd);
- int (*i_hwdrv_CommandAnalogInput)(comedi_device *dev,
+ int (*i_hwdrv_CommandAnalogInput)(struct comedi_device *dev,
comedi_subdevice *s);
- int (*i_hwdrv_CancelAnalogInput)(comedi_device *dev,
+ int (*i_hwdrv_CancelAnalogInput)(struct comedi_device *dev,
comedi_subdevice *s);
/* Analog Output */
- int (*i_hwdrv_InsnConfigAnalogOutput)(comedi_device *dev,
+ int (*i_hwdrv_InsnConfigAnalogOutput)(struct comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
- int (*i_hwdrv_InsnWriteAnalogOutput)(comedi_device *dev,
+ int (*i_hwdrv_InsnWriteAnalogOutput)(struct comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
- int (*i_hwdrv_InsnBitsAnalogOutput)(comedi_device *dev,
+ int (*i_hwdrv_InsnBitsAnalogOutput)(struct comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
/* Digital Input */
- int (*i_hwdrv_InsnConfigDigitalInput) (comedi_device *dev,
+ int (*i_hwdrv_InsnConfigDigitalInput) (struct comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
- int (*i_hwdrv_InsnReadDigitalInput) (comedi_device *dev,
+ int (*i_hwdrv_InsnReadDigitalInput) (struct comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
- int (*i_hwdrv_InsnWriteDigitalInput) (comedi_device *dev,
+ int (*i_hwdrv_InsnWriteDigitalInput) (struct comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
- int (*i_hwdrv_InsnBitsDigitalInput) (comedi_device *dev,
+ int (*i_hwdrv_InsnBitsDigitalInput) (struct comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
/* Digital Output */
- int (*i_hwdrv_InsnConfigDigitalOutput)(comedi_device *dev,
+ int (*i_hwdrv_InsnConfigDigitalOutput)(struct comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
- int (*i_hwdrv_InsnWriteDigitalOutput)(comedi_device *dev,
+ int (*i_hwdrv_InsnWriteDigitalOutput)(struct comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
- int (*i_hwdrv_InsnBitsDigitalOutput)(comedi_device *dev,
+ int (*i_hwdrv_InsnBitsDigitalOutput)(struct comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
- int (*i_hwdrv_InsnReadDigitalOutput)(comedi_device *dev,
+ int (*i_hwdrv_InsnReadDigitalOutput)(struct comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
/* TIMER */
- int (*i_hwdrv_InsnConfigTimer)(comedi_device *dev,
+ int (*i_hwdrv_InsnConfigTimer)(struct comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
- int (*i_hwdrv_InsnWriteTimer)(comedi_device *dev,
+ int (*i_hwdrv_InsnWriteTimer)(struct comedi_device *dev,
comedi_subdevice *s, comedi_insn *insn,
unsigned int *data);
- int (*i_hwdrv_InsnReadTimer)(comedi_device *dev, comedi_subdevice *s,
+ int (*i_hwdrv_InsnReadTimer)(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
- int (*i_hwdrv_InsnBitsTimer)(comedi_device *dev, comedi_subdevice *s,
+ int (*i_hwdrv_InsnBitsTimer)(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
/* TTL IO */
- int (*i_hwdr_ConfigInitTTLIO)(comedi_device *dev,
+ int (*i_hwdr_ConfigInitTTLIO)(struct comedi_device *dev,
comedi_subdevice *s, comedi_insn *insn,
unsigned int *data);
- int (*i_hwdr_ReadTTLIOBits)(comedi_device *dev, comedi_subdevice *s,
+ int (*i_hwdr_ReadTTLIOBits)(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
- int (*i_hwdr_ReadTTLIOAllPortValue)(comedi_device *dev,
+ int (*i_hwdr_ReadTTLIOAllPortValue)(struct comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
- int (*i_hwdr_WriteTTLIOChlOnOff)(comedi_device *dev,
+ int (*i_hwdr_WriteTTLIOChlOnOff)(struct comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
} boardtype;
@@ -456,10 +456,10 @@ typedef struct {
static unsigned short pci_list_builded; /* set to 1 when list of card is known */
/* Function declarations */
-static int i_ADDI_Attach(comedi_device *dev, comedi_devconfig *it);
-static int i_ADDI_Detach(comedi_device *dev);
-static int i_ADDI_Reset(comedi_device *dev);
+static int i_ADDI_Attach(struct comedi_device *dev, comedi_devconfig *it);
+static int i_ADDI_Detach(struct comedi_device *dev);
+static int i_ADDI_Reset(struct comedi_device *dev);
static irqreturn_t v_ADDI_Interrupt(int irq, void *d PT_REGS_ARG);
-static int i_ADDIDATA_InsnReadEeprom(comedi_device *dev, comedi_subdevice *s,
+static int i_ADDIDATA_InsnReadEeprom(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
diff --git a/drivers/staging/comedi/drivers/addi-data/addi_eeprom.c b/drivers/staging/comedi/drivers/addi-data/addi_eeprom.c
index b8fa5c9071a6..bf83af20f489 100644
--- a/drivers/staging/comedi/drivers/addi-data/addi_eeprom.c
+++ b/drivers/staging/comedi/drivers/addi-data/addi_eeprom.c
@@ -121,7 +121,7 @@ typedef struct {
/*****************************************/
INT i_EepromReadMainHeader(WORD w_PCIBoardEepromAddress,
- PCHAR pc_PCIChipInformation, comedi_device * dev);
+ PCHAR pc_PCIChipInformation, struct comedi_device *dev);
INT i_EepromReadDigitalInputHeader(WORD w_PCIBoardEepromAddress,
PCHAR pc_PCIChipInformation, WORD w_Address,
@@ -787,7 +787,7 @@ VOID v_EepromCs76Read(DWORD dw_Address, WORD w_offset, PWORD pw_Value)
/*
+----------------------------------------------------------------------------+
| Function Name : INT i_EepromReadMainHeader(WORD w_PCIBoardEepromAddress, |
-| PCHAR pc_PCIChipInformation,comedi_device *dev) |
+| PCHAR pc_PCIChipInformation,struct comedi_device *dev) |
+----------------------------------------------------------------------------+
| Task : Read from eeprom Main Header |
+----------------------------------------------------------------------------+
@@ -795,7 +795,7 @@ VOID v_EepromCs76Read(DWORD dw_Address, WORD w_offset, PWORD pw_Value)
| |
| PCHAR pc_PCIChipInformation : PCI Chip Type. |
| |
-| comedi_device *dev : comedi device structure |
+| struct comedi_device *dev : comedi device structure |
| pointer |
+----------------------------------------------------------------------------+
| Output Parameters : - |
@@ -805,7 +805,7 @@ VOID v_EepromCs76Read(DWORD dw_Address, WORD w_offset, PWORD pw_Value)
*/
INT i_EepromReadMainHeader(WORD w_PCIBoardEepromAddress,
- PCHAR pc_PCIChipInformation, comedi_device * dev)
+ PCHAR pc_PCIChipInformation, struct comedi_device *dev)
{
WORD w_Temp, i, w_Count = 0;
UINT ui_Temp;
diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_APCI1710.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_APCI1710.c
index e18d085bbd6b..7d6a6e05cdbc 100644
--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_APCI1710.c
+++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_APCI1710.c
@@ -56,7 +56,7 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
#include "APCI1710_Pwm.c"
#include "APCI1710_INCCPT.c"
-void i_ADDI_AttachPCI1710(comedi_device * dev)
+void i_ADDI_AttachPCI1710(struct comedi_device * dev)
{
comedi_subdevice *s;
int ret = 0;
@@ -195,11 +195,11 @@ void i_ADDI_AttachPCI1710(comedi_device * dev)
s->insn_bits = i_APCI1710_InsnBitsINCCPT;
}
-int i_APCI1710_Reset(comedi_device * dev);
+int i_APCI1710_Reset(struct comedi_device * dev);
VOID v_APCI1710_Interrupt(int irq, void *d);
//for 1710
-int i_APCI1710_Reset(comedi_device * dev)
+int i_APCI1710_Reset(struct comedi_device * dev)
{
int ret;
DWORD dw_Dummy;
@@ -249,7 +249,7 @@ int i_APCI1710_Reset(comedi_device * dev)
VOID v_APCI1710_Interrupt(int irq, void *d)
{
- comedi_device *dev = d;
+ struct comedi_device *dev = d;
BYTE b_ModuleCpt = 0;
BYTE b_InterruptFlag = 0;
BYTE b_PWMCpt = 0;
diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci035.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci035.c
index 4a4356550a6c..599c7c3b68f7 100644
--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci035.c
+++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci035.c
@@ -58,12 +58,12 @@ INT i_Flag = 1;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI035_ConfigTimerWatchdog |
-| (comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Configures The Timer , Counter or Watchdog |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| UINT *data : Data Pointer contains |
| configuration parameters as below |
| |
@@ -109,7 +109,7 @@ INT i_Flag = 1;
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI035_ConfigTimerWatchdog(comedi_device * dev, comedi_subdevice * s,
+INT i_APCI035_ConfigTimerWatchdog(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_Status = 0;
@@ -254,12 +254,12 @@ INT i_APCI035_ConfigTimerWatchdog(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI035_StartStopWriteTimerWatchdog |
-| (comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Start / Stop The Selected Timer , or Watchdog |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| UINT *data : Data Pointer contains |
| configuration parameters as below |
| |
@@ -278,7 +278,7 @@ INT i_APCI035_ConfigTimerWatchdog(comedi_device * dev, comedi_subdevice * s,
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI035_StartStopWriteTimerWatchdog(comedi_device * dev,
+INT i_APCI035_StartStopWriteTimerWatchdog(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
UINT ui_Command = 0;
@@ -367,12 +367,12 @@ INT i_APCI035_StartStopWriteTimerWatchdog(comedi_device * dev,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI035_ReadTimerWatchdog |
-| (comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read The Selected Timer , Counter or Watchdog |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| UINT *data : Data Pointer contains |
| configuration parameters as below |
| |
@@ -391,7 +391,7 @@ INT i_APCI035_StartStopWriteTimerWatchdog(comedi_device * dev,
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI035_ReadTimerWatchdog(comedi_device * dev, comedi_subdevice * s,
+INT i_APCI035_ReadTimerWatchdog(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_Status = 0; // Status register
@@ -427,12 +427,12 @@ INT i_APCI035_ReadTimerWatchdog(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
| Function Name : INT i_APCI035_ConfigAnalogInput |
-| (comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Configures The Analog Input Subdevice |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| comedi_subdevice *s : Subdevice Pointer |
| comedi_insn *insn : Insn Structure Pointer |
| unsigned int *data : Data Pointer contains |
@@ -447,7 +447,7 @@ INT i_APCI035_ReadTimerWatchdog(comedi_device * dev, comedi_subdevice * s,
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI035_ConfigAnalogInput(comedi_device * dev, comedi_subdevice * s,
+INT i_APCI035_ConfigAnalogInput(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
devpriv->tsk_Current = current;
@@ -466,12 +466,12 @@ INT i_APCI035_ConfigAnalogInput(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI035_ReadAnalogInput |
-| (comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read value of the selected channel |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| UINT ui_NoOfChannels : No Of Channels To read |
| UINT *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
@@ -484,7 +484,7 @@ INT i_APCI035_ConfigAnalogInput(comedi_device * dev, comedi_subdevice * s,
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI035_ReadAnalogInput(comedi_device * dev, comedi_subdevice * s,
+INT i_APCI035_ReadAnalogInput(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_CommandRegister = 0;
@@ -506,7 +506,7 @@ INT i_APCI035_ReadAnalogInput(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
-| Function Name : int i_APCI035_Reset(comedi_device *dev) |
+| Function Name : int i_APCI035_Reset(struct comedi_device *dev) |
| |
+----------------------------------------------------------------------------+
| Task :Resets the registers of the card |
@@ -519,7 +519,7 @@ INT i_APCI035_ReadAnalogInput(comedi_device * dev, comedi_subdevice * s,
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI035_Reset(comedi_device * dev)
+INT i_APCI035_Reset(struct comedi_device * dev)
{
INT i_Count = 0;
for (i_Count = 1; i_Count <= 4; i_Count++) {
@@ -550,7 +550,7 @@ INT i_APCI035_Reset(comedi_device * dev)
*/
static void v_APCI035_Interrupt(int irq, void *d)
{
- comedi_device *dev = d;
+ struct comedi_device *dev = d;
UINT ui_StatusRegister1 = 0;
UINT ui_StatusRegister2 = 0;
UINT ui_ReadCommand = 0;
diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci035.h b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci035.h
index 0e4ec157ad3a..c0330d8a3137 100644
--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci035.h
+++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci035.h
@@ -101,23 +101,23 @@ comedi_lrange range_apci035_ai = { 8, {
/* TIMER */
/* timer value is passed as u seconds */
-INT i_APCI035_ConfigTimerWatchdog(comedi_device *dev, comedi_subdevice *s,
+INT i_APCI035_ConfigTimerWatchdog(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI035_StartStopWriteTimerWatchdog(comedi_device *dev,
+INT i_APCI035_StartStopWriteTimerWatchdog(struct comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI035_ReadTimerWatchdog(comedi_device *dev, comedi_subdevice *s,
+INT i_APCI035_ReadTimerWatchdog(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
/* Temperature Related Defines (Analog Input Subdevice) */
-INT i_APCI035_ConfigAnalogInput(comedi_device *dev, comedi_subdevice *s,
+INT i_APCI035_ConfigAnalogInput(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI035_ReadAnalogInput(comedi_device *dev, comedi_subdevice *s,
+INT i_APCI035_ReadAnalogInput(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
/* Interrupt */
static void v_APCI035_Interrupt(int irq, void *d);
/* Reset functions */
-INT i_APCI035_Reset(comedi_device *dev);
+INT i_APCI035_Reset(struct comedi_device *dev);
diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1032.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1032.c
index 5f65d1d4baab..bdfe5e95eb61 100644
--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1032.c
+++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1032.c
@@ -59,12 +59,12 @@ UINT ui_InterruptStatus = 0;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1032_ConfigDigitalInput |
-| (comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Configures the digital input Subdevice |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| unsigned int *data : Data Pointer contains |
| configuration parameters as below |
| |
@@ -84,7 +84,7 @@ UINT ui_InterruptStatus = 0;
+----------------------------------------------------------------------------+
*/
-INT i_APCI1032_ConfigDigitalInput(comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1032_ConfigDigitalInput(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_TmpValue;
@@ -128,12 +128,12 @@ INT i_APCI1032_ConfigDigitalInput(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1032_Read1DigitalInput |
-| (comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Return the status of the digital input |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| UINT ui_Channel : Channel number to read |
| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
@@ -144,7 +144,7 @@ INT i_APCI1032_ConfigDigitalInput(comedi_device * dev, comedi_subdevice * s,
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI1032_Read1DigitalInput(comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1032_Read1DigitalInput(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_TmpValue = 0;
@@ -166,12 +166,12 @@ INT i_APCI1032_Read1DigitalInput(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1032_ReadMoreDigitalInput |
-| (comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Return the status of the Requested digital inputs |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| UINT ui_NoOfChannels : No Of Channels To be Read |
| UINT *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
@@ -183,7 +183,7 @@ INT i_APCI1032_Read1DigitalInput(comedi_device * dev, comedi_subdevice * s,
+----------------------------------------------------------------------------+
*/
-INT i_APCI1032_ReadMoreDigitalInput(comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1032_ReadMoreDigitalInput(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_PortValue = data[0];
@@ -245,7 +245,7 @@ INT i_APCI1032_ReadMoreDigitalInput(comedi_device * dev, comedi_subdevice * s,
*/
static VOID v_APCI1032_Interrupt(int irq, void *d)
{
- comedi_device *dev = d;
+ struct comedi_device *dev = d;
UINT ui_Temp;
//disable the interrupt
@@ -262,11 +262,11 @@ static VOID v_APCI1032_Interrupt(int irq, void *d)
/*
+----------------------------------------------------------------------------+
-| Function Name : int i_APCI1032_Reset(comedi_device *dev) | |
+| Function Name : int i_APCI1032_Reset(struct comedi_device *dev) | |
+----------------------------------------------------------------------------+
| Task :resets all the registers |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev
+| Input Parameters : struct comedi_device *dev
+----------------------------------------------------------------------------+
| Output Parameters : -- |
+----------------------------------------------------------------------------+
@@ -275,7 +275,7 @@ static VOID v_APCI1032_Interrupt(int irq, void *d)
+----------------------------------------------------------------------------+
*/
-INT i_APCI1032_Reset(comedi_device * dev)
+INT i_APCI1032_Reset(struct comedi_device * dev)
{
outl(0x0, devpriv->iobase + APCI1032_DIGITAL_IP_IRQ); //disable the interrupts
inl(devpriv->iobase + APCI1032_DIGITAL_IP_INTERRUPT_STATUS); //Reset the interrupt status register
diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1032.h b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1032.h
index 51abd4f073de..cb96ff1778c5 100644
--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1032.h
+++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1032.h
@@ -47,17 +47,17 @@
//DI
// for di read
-INT i_APCI1032_ConfigDigitalInput(comedi_device *dev, comedi_subdevice *s,
+INT i_APCI1032_ConfigDigitalInput(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI1032_Read1DigitalInput(comedi_device *dev, comedi_subdevice *s,
+INT i_APCI1032_Read1DigitalInput(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI1032_ReadMoreDigitalInput(comedi_device *dev, comedi_subdevice *s,
+INT i_APCI1032_ReadMoreDigitalInput(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
// Interrupt functions.....
static VOID v_APCI1032_Interrupt(int irq, void *d);
//Reset
-INT i_APCI1032_Reset(comedi_device *dev);
+INT i_APCI1032_Reset(struct comedi_device *dev);
diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.c
index 33885c55be9d..9a786c9060b6 100644
--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.c
+++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.c
@@ -61,7 +61,7 @@ int i_TimerCounter1Enabled = 0, i_TimerCounter2Enabled =
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1500_ConfigDigitalInputEvent |
-| (comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : An event can be generated for each port. |
@@ -70,7 +70,7 @@ int i_TimerCounter1Enabled = 0, i_TimerCounter2Enabled =
| (port 2). An interrupt is generated when one or both |
| events have occurred |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| unsigned int *data : Data Pointer contains |
| configuration parameters as below |
| |
@@ -137,7 +137,7 @@ int i_TimerCounter1Enabled = 0, i_TimerCounter2Enabled =
+----------------------------------------------------------------------------+
*/
-INT i_APCI1500_ConfigDigitalInputEvent(comedi_device * dev,
+INT i_APCI1500_ConfigDigitalInputEvent(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
int i_PatternPolarity = 0, i_PatternTransition = 0, i_PatternMask = 0;
@@ -500,12 +500,12 @@ INT i_APCI1500_ConfigDigitalInputEvent(comedi_device * dev,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1500_StartStopInputEvent |
-| (comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Allows or disallows a port event |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| UINT ui_Channel : Channel number to read |
| unsigned int *data : Data Pointer to read status |
data[0] :0 Start input event
@@ -519,7 +519,7 @@ INT i_APCI1500_ConfigDigitalInputEvent(comedi_device * dev,
| |
+----------------------------------------------------------------------------+
*/
-int i_APCI1500_StartStopInputEvent(comedi_device * dev, comedi_subdevice * s,
+int i_APCI1500_StartStopInputEvent(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i_Event1InterruptStatus = 0, i_Event2InterruptStatus =
@@ -768,12 +768,12 @@ int i_APCI1500_StartStopInputEvent(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1500_Initialisation |
-| (comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Return the status of the digital input |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| UINT ui_Channel : Channel number to read |
| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
@@ -784,7 +784,7 @@ int i_APCI1500_StartStopInputEvent(comedi_device * dev, comedi_subdevice * s,
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI1500_Initialisation(comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1500_Initialisation(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i_DummyRead = 0;
@@ -937,12 +937,12 @@ INT i_APCI1500_Initialisation(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1500_ReadMoreDigitalInput |
-| (comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Return the status of the Requested digital inputs |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| UINT ui_NoOfChannels : No Of Channels To be Read |
| UINT *data : Data Pointer
data[0] : 0 Read a single channel
@@ -957,7 +957,7 @@ INT i_APCI1500_Initialisation(comedi_device * dev, comedi_subdevice * s,
+----------------------------------------------------------------------------+
*/
-INT i_APCI1500_ReadMoreDigitalInput(comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1500_ReadMoreDigitalInput(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_PortValue = data[1];
@@ -1015,14 +1015,14 @@ INT i_APCI1500_ReadMoreDigitalInput(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1500_ConfigDigitalOutputErrorInterrupt
- (comedi_device *dev,comedi_subdevice *s comedi_insn
+ (struct comedi_device *dev,comedi_subdevice *s comedi_insn
*insn,unsigned int *data) |
| |
+----------------------------------------------------------------------------+
| Task : Configures the digital output memory and the digital
output error interrupt |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| unsigned int *data : Data Pointer contains |
| configuration parameters as below |
| comedi_subdevice *s, :pointer to subdevice structure
@@ -1040,7 +1040,7 @@ INT i_APCI1500_ReadMoreDigitalInput(comedi_device * dev, comedi_subdevice * s,
| |
+----------------------------------------------------------------------------+
*/
-int i_APCI1500_ConfigDigitalOutputErrorInterrupt(comedi_device * dev,
+int i_APCI1500_ConfigDigitalOutputErrorInterrupt(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
devpriv->b_OutputMemoryStatus = data[0];
@@ -1050,12 +1050,12 @@ int i_APCI1500_ConfigDigitalOutputErrorInterrupt(comedi_device * dev,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1500_WriteDigitalOutput |
-| (comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Writes port value To the selected port |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| UINT ui_NoOfChannels : No Of Channels To Write |
| UINT *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
@@ -1067,7 +1067,7 @@ int i_APCI1500_ConfigDigitalOutputErrorInterrupt(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-INT i_APCI1500_WriteDigitalOutput(comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1500_WriteDigitalOutput(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
static UINT ui_Temp = 0;
@@ -1220,7 +1220,7 @@ INT i_APCI1500_WriteDigitalOutput(comedi_device * dev, comedi_subdevice * s,
+----------------------------------------------------------------------------+
| Task : Configures The Watchdog |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| comedi_subdevice *s, :pointer to subdevice structure
comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status data[0] : 2 APCI1500_1_8_KHZ
@@ -1261,7 +1261,7 @@ INT i_APCI1500_WriteDigitalOutput(comedi_device * dev, comedi_subdevice * s,
+----------------------------------------------------------------------------+
*/
-int i_APCI1500_ConfigCounterTimerWatchdog(comedi_device * dev,
+int i_APCI1500_ConfigCounterTimerWatchdog(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
int i_TimerCounterMode, i_MasterConfiguration;
@@ -1835,12 +1835,12 @@ int i_APCI1500_ConfigCounterTimerWatchdog(comedi_device * dev,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1500_StartStopTriggerTimerCounterWatchdog |
-| (comedi_device *dev,comedi_subdevice *s,
+| (struct comedi_device *dev,comedi_subdevice *s,
comedi_insn *insn,unsigned int *data); |
+----------------------------------------------------------------------------+
| Task : Start / Stop or trigger the timer counter or Watchdog |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| comedi_subdevice *s, :pointer to subdevice structure
comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
@@ -1860,7 +1860,7 @@ int i_APCI1500_ConfigCounterTimerWatchdog(comedi_device * dev,
| |
+----------------------------------------------------------------------------+
*/
-int i_APCI1500_StartStopTriggerTimerCounterWatchdog(comedi_device * dev,
+int i_APCI1500_StartStopTriggerTimerCounterWatchdog(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
int i_CommandAndStatusValue;
@@ -2160,12 +2160,12 @@ int i_APCI1500_StartStopTriggerTimerCounterWatchdog(comedi_device * dev,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1500_ReadCounterTimerWatchdog |
-| (comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,
+| (struct comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,
unsigned int *data); |
+----------------------------------------------------------------------------+
| Task : Read The Watchdog |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| comedi_subdevice *s, :pointer to subdevice structure
comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
@@ -2182,7 +2182,7 @@ int i_APCI1500_StartStopTriggerTimerCounterWatchdog(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-int i_APCI1500_ReadCounterTimerWatchdog(comedi_device * dev,
+int i_APCI1500_ReadCounterTimerWatchdog(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
int i_CommandAndStatusValue;
@@ -2351,12 +2351,12 @@ int i_APCI1500_ReadCounterTimerWatchdog(comedi_device * dev,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1500_ReadInterruptMask |
-| (comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,
+| (struct comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,
unsigned int *data); |
+----------------------------------------------------------------------------+
| Task : Read the interrupt mask |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| comedi_subdevice *s, :pointer to subdevice structure
comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
@@ -2370,7 +2370,7 @@ int i_APCI1500_ReadCounterTimerWatchdog(comedi_device * dev,
| |
+----------------------------------------------------------------------------+
*/
-int i_APCI1500_ReadInterruptMask(comedi_device * dev, comedi_subdevice * s,
+int i_APCI1500_ReadInterruptMask(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
data[0] = i_InterruptMask;
@@ -2382,12 +2382,12 @@ int i_APCI1500_ReadInterruptMask(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1500_ConfigureInterrupt |
-| (comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,
+| (struct comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,
unsigned int *data); |
+----------------------------------------------------------------------------+
| Task : Configures the interrupt registers |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| comedi_subdevice *s, :pointer to subdevice structure
comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer |
@@ -2401,7 +2401,7 @@ int i_APCI1500_ReadInterruptMask(comedi_device * dev, comedi_subdevice * s,
| |
+----------------------------------------------------------------------------+
*/
-int i_APCI1500_ConfigureInterrupt(comedi_device * dev, comedi_subdevice * s,
+int i_APCI1500_ConfigureInterrupt(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_Status;
@@ -2579,7 +2579,7 @@ int i_APCI1500_ConfigureInterrupt(comedi_device * dev, comedi_subdevice * s,
static VOID v_APCI1500_Interrupt(int irq, void *d)
{
- comedi_device *dev = d;
+ struct comedi_device *dev = d;
UINT ui_InterruptStatus = 0;
int i_RegValue = 0;
i_InterruptMask = 0;
@@ -2809,11 +2809,11 @@ static VOID v_APCI1500_Interrupt(int irq, void *d)
/*
+----------------------------------------------------------------------------+
-| Function Name : int i_APCI1500_Reset(comedi_device *dev) | |
+| Function Name : int i_APCI1500_Reset(struct comedi_device *dev) | |
+----------------------------------------------------------------------------+
| Task :resets all the registers |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev
+| Input Parameters : struct comedi_device *dev
+----------------------------------------------------------------------------+
| Output Parameters : -- |
+----------------------------------------------------------------------------+
@@ -2822,7 +2822,7 @@ static VOID v_APCI1500_Interrupt(int irq, void *d)
+----------------------------------------------------------------------------+
*/
-INT i_APCI1500_Reset(comedi_device * dev)
+INT i_APCI1500_Reset(struct comedi_device * dev)
{
int i_DummyRead = 0;
i_TimerCounter1Init = 0;
diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.h b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.h
index f1519e70cfbc..dc3f3ea78b0f 100644
--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.h
+++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.h
@@ -116,50 +116,50 @@ enum {
};
/*----------DIGITAL INPUT----------------*/
-static int i_APCI1500_Initialisation(comedi_device *dev, comedi_subdevice *s,
+static int i_APCI1500_Initialisation(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-static int i_APCI1500_ConfigDigitalInputEvent(comedi_device *dev,
+static int i_APCI1500_ConfigDigitalInputEvent(struct comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
-static int i_APCI1500_StartStopInputEvent(comedi_device *dev,
+static int i_APCI1500_StartStopInputEvent(struct comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-static int i_APCI1500_ReadMoreDigitalInput(comedi_device *dev,
+static int i_APCI1500_ReadMoreDigitalInput(struct comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
/*---------- DIGITAL OUTPUT------------*/
-static int i_APCI1500_ConfigDigitalOutputErrorInterrupt(comedi_device *dev,
+static int i_APCI1500_ConfigDigitalOutputErrorInterrupt(struct comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
-static int i_APCI1500_WriteDigitalOutput(comedi_device *dev,
+static int i_APCI1500_WriteDigitalOutput(struct comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
/*----------TIMER----------------*/
-static int i_APCI1500_ConfigCounterTimerWatchdog(comedi_device *dev,
+static int i_APCI1500_ConfigCounterTimerWatchdog(struct comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
-static int i_APCI1500_StartStopTriggerTimerCounterWatchdog(comedi_device *dev,
+static int i_APCI1500_StartStopTriggerTimerCounterWatchdog(struct comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
-static int i_APCI1500_ReadCounterTimerWatchdog(comedi_device *dev,
+static int i_APCI1500_ReadCounterTimerWatchdog(struct comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
-static int i_APCI1500_ReadInterruptMask(comedi_device *dev,
+static int i_APCI1500_ReadInterruptMask(struct comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
/*----------INTERRUPT HANDLER------*/
static void v_APCI1500_Interrupt(int irq, void *d);
-static int i_APCI1500_ConfigureInterrupt(comedi_device *dev,
+static int i_APCI1500_ConfigureInterrupt(struct comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
/*----------RESET---------------*/
-static int i_APCI1500_Reset(comedi_device *dev);
+static int i_APCI1500_Reset(struct comedi_device *dev);
diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1516.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1516.c
index 5be566eda898..5ad419b9fa8e 100644
--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1516.c
+++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1516.c
@@ -56,12 +56,12 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1516_Read1DigitalInput |
-| (comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Return the status of the digital input |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| comedi_subdevice *s, :pointer to subdevice structure
comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
@@ -73,7 +73,7 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI1516_Read1DigitalInput(comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1516_Read1DigitalInput(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_TmpValue = 0;
@@ -96,12 +96,12 @@ INT i_APCI1516_Read1DigitalInput(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1516_ReadMoreDigitalInput |
-| (comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Return the status of the Requested digital inputs |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| comedi_subdevice *s, :pointer to subdevice structure
comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
@@ -114,7 +114,7 @@ INT i_APCI1516_Read1DigitalInput(comedi_device * dev, comedi_subdevice * s,
+----------------------------------------------------------------------------+
*/
-INT i_APCI1516_ReadMoreDigitalInput(comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1516_ReadMoreDigitalInput(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
@@ -148,13 +148,13 @@ INT i_APCI1516_ReadMoreDigitalInput(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
-| Function Name : int i_APCI1516_ConfigDigitalOutput (comedi_device *dev,
+| Function Name : int i_APCI1516_ConfigDigitalOutput (struct comedi_device *dev,
comedi_subdevice *s comedi_insn *insn,unsigned int *data) |
| |
+----------------------------------------------------------------------------+
| Task : Configures The Digital Output Subdevice. |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| unsigned int *data : Data Pointer contains |
| configuration parameters as below |
| comedi_subdevice *s, :pointer to subdevice structure
@@ -171,7 +171,7 @@ INT i_APCI1516_ReadMoreDigitalInput(comedi_device * dev, comedi_subdevice * s,
| |
+----------------------------------------------------------------------------+
*/
-int i_APCI1516_ConfigDigitalOutput(comedi_device * dev, comedi_subdevice * s,
+int i_APCI1516_ConfigDigitalOutput(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
devpriv->b_OutputMemoryStatus = data[0];
@@ -181,12 +181,12 @@ int i_APCI1516_ConfigDigitalOutput(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1516_WriteDigitalOutput |
-| (comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,
+| (struct comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,
unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Writes port value To the selected port |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| comedi_subdevice *s, :pointer to subdevice structure
comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
@@ -199,7 +199,7 @@ int i_APCI1516_ConfigDigitalOutput(comedi_device * dev, comedi_subdevice * s,
+----------------------------------------------------------------------------+
*/
-INT i_APCI1516_WriteDigitalOutput(comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1516_WriteDigitalOutput(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_Temp, ui_Temp1;
@@ -341,12 +341,12 @@ INT i_APCI1516_WriteDigitalOutput(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1516_ReadDigitalOutput |
-| (comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,
+| (struct comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,
unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read value of the selected channel or port |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| comedi_subdevice *s, :pointer to subdevice structure
comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
@@ -359,7 +359,7 @@ INT i_APCI1516_WriteDigitalOutput(comedi_device * dev, comedi_subdevice * s,
+----------------------------------------------------------------------------+
*/
-INT i_APCI1516_ReadDigitalOutput(comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1516_ReadDigitalOutput(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
@@ -400,13 +400,13 @@ INT i_APCI1516_ReadDigitalOutput(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
-| Function Name : int i_APCI1516_ConfigWatchdog(comedi_device *dev,
+| Function Name : int i_APCI1516_ConfigWatchdog(struct comedi_device *dev,
comedi_subdevice *s,comedi_insn *insn,unsigned int *data) |
| |
+----------------------------------------------------------------------------+
| Task : Configures The Watchdog |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| comedi_subdevice *s, :pointer to subdevice structure
comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
@@ -419,7 +419,7 @@ INT i_APCI1516_ReadDigitalOutput(comedi_device * dev, comedi_subdevice * s,
+----------------------------------------------------------------------------+
*/
-int i_APCI1516_ConfigWatchdog(comedi_device * dev, comedi_subdevice * s,
+int i_APCI1516_ConfigWatchdog(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (data[0] == 0) {
@@ -447,12 +447,12 @@ int i_APCI1516_ConfigWatchdog(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1516_StartStopWriteWatchdog |
- | (comedi_device *dev,comedi_subdevice *s,
+ | (struct comedi_device *dev,comedi_subdevice *s,
comedi_insn *insn,unsigned int *data); |
+----------------------------------------------------------------------------+
| Task : Start / Stop The Watchdog |
+----------------------------------------------------------------------------+
- | Input Parameters : comedi_device *dev : Driver handle |
+ | Input Parameters : struct comedi_device *dev : Driver handle |
| comedi_subdevice *s, :pointer to subdevice structure
comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
@@ -465,7 +465,7 @@ int i_APCI1516_ConfigWatchdog(comedi_device * dev, comedi_subdevice * s,
+----------------------------------------------------------------------------+
*/
-int i_APCI1516_StartStopWriteWatchdog(comedi_device * dev, comedi_subdevice * s,
+int i_APCI1516_StartStopWriteWatchdog(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
switch (data[0]) {
@@ -492,12 +492,12 @@ int i_APCI1516_StartStopWriteWatchdog(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1516_ReadWatchdog |
-| (comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,
+| (struct comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,
unsigned int *data); |
+----------------------------------------------------------------------------+
| Task : Read The Watchdog |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| comedi_subdevice *s, :pointer to subdevice structure
comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
@@ -510,7 +510,7 @@ int i_APCI1516_StartStopWriteWatchdog(comedi_device * dev, comedi_subdevice * s,
+----------------------------------------------------------------------------+
*/
-int i_APCI1516_ReadWatchdog(comedi_device * dev, comedi_subdevice * s,
+int i_APCI1516_ReadWatchdog(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
data[0] = inw(devpriv->i_IobaseAddon + APCI1516_WATCHDOG_STATUS) & 0x1;
@@ -519,11 +519,11 @@ int i_APCI1516_ReadWatchdog(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
-| Function Name : int i_APCI1516_Reset(comedi_device *dev) | |
+| Function Name : int i_APCI1516_Reset(struct comedi_device *dev) | |
+----------------------------------------------------------------------------+
| Task :resets all the registers |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev
+| Input Parameters : struct comedi_device *dev
+----------------------------------------------------------------------------+
| Output Parameters : -- |
+----------------------------------------------------------------------------+
@@ -532,7 +532,7 @@ int i_APCI1516_ReadWatchdog(comedi_device * dev, comedi_subdevice * s,
+----------------------------------------------------------------------------+
*/
-INT i_APCI1516_Reset(comedi_device * dev)
+INT i_APCI1516_Reset(struct comedi_device * dev)
{
outw(0x0, devpriv->iobase + APCI1516_DIGITAL_OP); //RESETS THE DIGITAL OUTPUTS
outw(0x0, devpriv->i_IobaseAddon + APCI1516_WATCHDOG_ENABLEDISABLE);
diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1516.h b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1516.h
index 176e4785819e..b166257775ce 100644
--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1516.h
+++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1516.h
@@ -38,27 +38,27 @@
// Hardware Layer functions for Apci1516
//Digital Input
-INT i_APCI1516_ReadMoreDigitalInput(comedi_device *dev, comedi_subdevice *s,
+INT i_APCI1516_ReadMoreDigitalInput(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI1516_Read1DigitalInput(comedi_device *dev, comedi_subdevice *s,
+INT i_APCI1516_Read1DigitalInput(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
//Digital Output
-int i_APCI1516_ConfigDigitalOutput(comedi_device *dev, comedi_subdevice *s,
+int i_APCI1516_ConfigDigitalOutput(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI1516_WriteDigitalOutput(comedi_device *dev, comedi_subdevice *s,
+INT i_APCI1516_WriteDigitalOutput(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI1516_ReadDigitalOutput(comedi_device *dev, comedi_subdevice *s,
+INT i_APCI1516_ReadDigitalOutput(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
// TIMER
// timer value is passed as u seconds
-int i_APCI1516_ConfigWatchdog(comedi_device *dev, comedi_subdevice *s,
+int i_APCI1516_ConfigWatchdog(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-int i_APCI1516_StartStopWriteWatchdog(comedi_device *dev, comedi_subdevice *s,
+int i_APCI1516_StartStopWriteWatchdog(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-int i_APCI1516_ReadWatchdog(comedi_device *dev, comedi_subdevice *s,
+int i_APCI1516_ReadWatchdog(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
//reset
-INT i_APCI1516_Reset(comedi_device *dev);
+INT i_APCI1516_Reset(struct comedi_device *dev);
diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c
index cb7510930626..44b4965d8ecc 100644
--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c
+++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c
@@ -62,12 +62,12 @@ UINT ui_InterruptData, ui_Type;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1564_ConfigDigitalInput |
-| (comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Configures the digital input Subdevice |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| unsigned int *data : Data Pointer contains |
| configuration parameters as below |
| |
@@ -86,7 +86,7 @@ UINT ui_InterruptData, ui_Type;
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI1564_ConfigDigitalInput(comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1564_ConfigDigitalInput(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
devpriv->tsk_Current = current;
@@ -131,12 +131,12 @@ INT i_APCI1564_ConfigDigitalInput(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1564_Read1DigitalInput |
-| (comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Return the status of the digital input |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| UINT ui_Channel : Channel number to read |
| unsigned int *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
@@ -147,7 +147,7 @@ INT i_APCI1564_ConfigDigitalInput(comedi_device * dev, comedi_subdevice * s,
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI1564_Read1DigitalInput(comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1564_Read1DigitalInput(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_TmpValue = 0;
@@ -171,12 +171,12 @@ INT i_APCI1564_Read1DigitalInput(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1564_ReadMoreDigitalInput |
-| (comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Return the status of the Requested digital inputs |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| UINT ui_NoOfChannels : No Of Channels To be Read |
| UINT *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
@@ -187,7 +187,7 @@ INT i_APCI1564_Read1DigitalInput(comedi_device * dev, comedi_subdevice * s,
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI1564_ReadMoreDigitalInput(comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1564_ReadMoreDigitalInput(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_PortValue = data[0];
@@ -233,12 +233,12 @@ INT i_APCI1564_ReadMoreDigitalInput(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1564_ConfigDigitalOutput |
-| (comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Configures The Digital Output Subdevice. |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| UINT *data : Data Pointer contains |
| configuration parameters as below |
| |
@@ -255,7 +255,7 @@ INT i_APCI1564_ReadMoreDigitalInput(comedi_device * dev, comedi_subdevice * s,
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI1564_ConfigDigitalOutput(comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1564_ConfigDigitalOutput(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
ULONG ul_Command = 0;
@@ -296,12 +296,12 @@ INT i_APCI1564_ConfigDigitalOutput(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1564_WriteDigitalOutput |
-| (comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Writes port value To the selected port |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| UINT ui_NoOfChannels : No Of Channels To Write |
| UINT *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
@@ -312,7 +312,7 @@ INT i_APCI1564_ConfigDigitalOutput(comedi_device * dev, comedi_subdevice * s,
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI1564_WriteDigitalOutput(comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1564_WriteDigitalOutput(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_Temp, ui_Temp1;
@@ -470,12 +470,12 @@ INT i_APCI1564_WriteDigitalOutput(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1564_ReadDigitalOutput |
-| (comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read value of the selected channel or port |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| UINT ui_NoOfChannels : No Of Channels To read |
| UINT *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
@@ -486,7 +486,7 @@ INT i_APCI1564_WriteDigitalOutput(comedi_device * dev, comedi_subdevice * s,
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI1564_ReadDigitalOutput(comedi_device * dev, comedi_subdevice * s,
+INT i_APCI1564_ReadDigitalOutput(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_Temp;
@@ -537,12 +537,12 @@ INT i_APCI1564_ReadDigitalOutput(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1564_ConfigTimerCounterWatchdog |
-| (comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Configures The Timer , Counter or Watchdog |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| UINT *data : Data Pointer contains |
| configuration parameters as below |
| |
@@ -564,7 +564,7 @@ INT i_APCI1564_ReadDigitalOutput(comedi_device * dev, comedi_subdevice * s,
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI1564_ConfigTimerCounterWatchdog(comedi_device * dev,
+INT i_APCI1564_ConfigTimerCounterWatchdog(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
ULONG ul_Command1 = 0;
@@ -695,12 +695,12 @@ INT i_APCI1564_ConfigTimerCounterWatchdog(comedi_device * dev,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1564_StartStopWriteTimerCounterWatchdog |
-| (comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Start / Stop The Selected Timer , Counter or Watchdog |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| UINT *data : Data Pointer contains |
| configuration parameters as below |
| |
@@ -718,7 +718,7 @@ INT i_APCI1564_ConfigTimerCounterWatchdog(comedi_device * dev,
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI1564_StartStopWriteTimerCounterWatchdog(comedi_device * dev,
+INT i_APCI1564_StartStopWriteTimerCounterWatchdog(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
ULONG ul_Command1 = 0;
@@ -795,12 +795,12 @@ INT i_APCI1564_StartStopWriteTimerCounterWatchdog(comedi_device * dev,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1564_ReadTimerCounterWatchdog |
-| (comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read The Selected Timer , Counter or Watchdog |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| UINT *data : Data Pointer contains |
| configuration parameters as below |
| |
@@ -813,7 +813,7 @@ INT i_APCI1564_StartStopWriteTimerCounterWatchdog(comedi_device * dev,
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI1564_ReadTimerCounterWatchdog(comedi_device * dev,
+INT i_APCI1564_ReadTimerCounterWatchdog(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
ULONG ul_Command1 = 0;
@@ -878,7 +878,7 @@ INT i_APCI1564_ReadTimerCounterWatchdog(comedi_device * dev,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI1564_ReadInterruptStatus |
-| (comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task :Reads the interrupt status register |
@@ -892,7 +892,7 @@ INT i_APCI1564_ReadTimerCounterWatchdog(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-int i_APCI1564_ReadInterruptStatus(comedi_device * dev, comedi_subdevice * s,
+int i_APCI1564_ReadInterruptStatus(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
*data = ui_Type;
@@ -918,7 +918,7 @@ int i_APCI1564_ReadInterruptStatus(comedi_device * dev, comedi_subdevice * s,
*/
static VOID v_APCI1564_Interrupt(int irq, void *d)
{
- comedi_device *dev = d;
+ struct comedi_device *dev = d;
UINT ui_DO, ui_DI;
UINT ui_Timer;
UINT ui_C1, ui_C2, ui_C3, ui_C4;
@@ -1068,11 +1068,11 @@ static VOID v_APCI1564_Interrupt(int irq, void *d)
/*
+----------------------------------------------------------------------------+
-| Function Name : int i_APCI1564_Reset(comedi_device *dev) | |
+| Function Name : int i_APCI1564_Reset(struct comedi_device *dev) | |
+----------------------------------------------------------------------------+
| Task :resets all the registers |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev
+| Input Parameters : struct comedi_device *dev
+----------------------------------------------------------------------------+
| Output Parameters : -- |
+----------------------------------------------------------------------------+
@@ -1081,7 +1081,7 @@ static VOID v_APCI1564_Interrupt(int irq, void *d)
+----------------------------------------------------------------------------+
*/
-INT i_APCI1564_Reset(comedi_device * dev)
+INT i_APCI1564_Reset(struct comedi_device * dev)
{
outl(0x0, devpriv->i_IobaseAmcc + APCI1564_DIGITAL_IP_IRQ); //disable the interrupts
inl(devpriv->i_IobaseAmcc + APCI1564_DIGITAL_IP_INTERRUPT_STATUS); //Reset the interrupt status register
diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.h b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.h
index 914231f2edb6..4b40da7879de 100644
--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.h
+++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.h
@@ -82,33 +82,33 @@
//DI
// for di read
-INT i_APCI1564_ConfigDigitalInput(comedi_device *dev, comedi_subdevice *s,
+INT i_APCI1564_ConfigDigitalInput(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI1564_Read1DigitalInput(comedi_device *dev, comedi_subdevice *s,
+INT i_APCI1564_Read1DigitalInput(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI1564_ReadMoreDigitalInput(comedi_device *dev, comedi_subdevice *s,
+INT i_APCI1564_ReadMoreDigitalInput(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
//DO
-int i_APCI1564_ConfigDigitalOutput(comedi_device *dev, comedi_subdevice *s,
+int i_APCI1564_ConfigDigitalOutput(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI1564_WriteDigitalOutput(comedi_device *dev, comedi_subdevice *s,
+INT i_APCI1564_WriteDigitalOutput(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI1564_ReadDigitalOutput(comedi_device *dev, comedi_subdevice *s,
+INT i_APCI1564_ReadDigitalOutput(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-int i_APCI1564_ReadInterruptStatus(comedi_device *dev, comedi_subdevice *s,
+int i_APCI1564_ReadInterruptStatus(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
// TIMER
// timer value is passed as u seconds
-INT i_APCI1564_ConfigTimerCounterWatchdog(comedi_device *dev,
+INT i_APCI1564_ConfigTimerCounterWatchdog(struct comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-int i_APCI1564_StartStopWriteTimerCounterWatchdog(comedi_device *dev,
+int i_APCI1564_StartStopWriteTimerCounterWatchdog(struct comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
-int i_APCI1564_ReadTimerCounterWatchdog(comedi_device *dev,
+int i_APCI1564_ReadTimerCounterWatchdog(struct comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
@@ -116,4 +116,4 @@ int i_APCI1564_ReadTimerCounterWatchdog(comedi_device *dev,
static VOID v_APCI1564_Interrupt(int irq, void *d);
// RESET
-INT i_APCI1564_Reset(comedi_device *dev);
+INT i_APCI1564_Reset(struct comedi_device *dev);
diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci16xx.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci16xx.c
index 0955fdf31cd1..74b0bd484bde 100644
--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci16xx.c
+++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci16xx.c
@@ -58,7 +58,7 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
/*
+----------------------------------------------------------------------------+
| Function Name : INT i_APCI16XX_InsnConfigInitTTLIO |
-| (comedi_device *dev, |
+| (struct comedi_device *dev, |
| comedi_subdevice *s, |
| comedi_insn *insn, |
| unsigned int *data) |
@@ -90,7 +90,7 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
+----------------------------------------------------------------------------+
*/
-int i_APCI16XX_InsnConfigInitTTLIO(comedi_device * dev,
+int i_APCI16XX_InsnConfigInitTTLIO(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = insn->n;
@@ -251,7 +251,7 @@ int i_APCI16XX_InsnConfigInitTTLIO(comedi_device * dev,
/*
+----------------------------------------------------------------------------+
| Function Name : INT i_APCI16XX_InsnBitsReadTTLIO |
-| (comedi_device *dev, |
+| (struct comedi_device *dev, |
| comedi_subdevice *s, |
| comedi_insn *insn, |
| unsigned int *data) |
@@ -283,7 +283,7 @@ int i_APCI16XX_InsnConfigInitTTLIO(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-int i_APCI16XX_InsnBitsReadTTLIO(comedi_device * dev,
+int i_APCI16XX_InsnBitsReadTTLIO(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = insn->n;
@@ -411,7 +411,7 @@ int i_APCI16XX_InsnBitsReadTTLIO(comedi_device * dev,
/*
+----------------------------------------------------------------------------+
| Function Name : INT i_APCI16XX_InsnReadTTLIOAllPortValue |
-| (comedi_device *dev, |
+| (struct comedi_device *dev, |
| comedi_subdevice *s, |
| comedi_insn *insn, |
| unsigned int *data) |
@@ -430,7 +430,7 @@ int i_APCI16XX_InsnBitsReadTTLIO(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-int i_APCI16XX_InsnReadTTLIOAllPortValue(comedi_device * dev,
+int i_APCI16XX_InsnReadTTLIOAllPortValue(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
BYTE b_Command = (BYTE) CR_AREF(insn->chanspec);
@@ -536,7 +536,7 @@ int i_APCI16XX_InsnReadTTLIOAllPortValue(comedi_device * dev,
/*
+----------------------------------------------------------------------------+
| Function Name : INT i_APCI16XX_InsnBitsWriteTTLIO |
-| (comedi_device *dev, |
+| (struct comedi_device *dev, |
| comedi_subdevice *s, |
| comedi_insn *insn, |
| unsigned int *data) |
@@ -570,7 +570,7 @@ int i_APCI16XX_InsnReadTTLIOAllPortValue(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-int i_APCI16XX_InsnBitsWriteTTLIO(comedi_device * dev,
+int i_APCI16XX_InsnBitsWriteTTLIO(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = insn->n;
@@ -763,10 +763,10 @@ int i_APCI16XX_InsnBitsWriteTTLIO(comedi_device * dev,
/*
+----------------------------------------------------------------------------+
-| Function Name : int i_APCI2200_Reset(comedi_device *dev) | +----------------------------------------------------------------------------+
+| Function Name : int i_APCI2200_Reset(struct comedi_device *dev) | +----------------------------------------------------------------------------+
| Task :resets all the registers |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev |
+| Input Parameters : struct comedi_device *dev |
+----------------------------------------------------------------------------+
| Output Parameters : - |
+----------------------------------------------------------------------------+
@@ -774,7 +774,7 @@ int i_APCI16XX_InsnBitsWriteTTLIO(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-int i_APCI16XX_Reset(comedi_device * dev)
+int i_APCI16XX_Reset(struct comedi_device * dev)
{
return 0;
}
diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci16xx.h b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci16xx.h
index 6e8d09407807..9f8f2b752431 100644
--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci16xx.h
+++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci16xx.h
@@ -62,7 +62,7 @@ static const comedi_lrange range_apci16xx_ttl = { 12,
+----------------------------------------------------------------------------+
*/
-int i_APCI16XX_InsnConfigInitTTLIO(comedi_device *dev,
+int i_APCI16XX_InsnConfigInitTTLIO(struct comedi_device *dev,
comedi_subdevice *s, comedi_insn *insn,
unsigned int *data);
@@ -72,11 +72,11 @@ int i_APCI16XX_InsnConfigInitTTLIO(comedi_device *dev,
+----------------------------------------------------------------------------+
*/
-int i_APCI16XX_InsnBitsReadTTLIO(comedi_device *dev,
+int i_APCI16XX_InsnBitsReadTTLIO(struct comedi_device *dev,
comedi_subdevice *s, comedi_insn *insn,
unsigned int *data);
-int i_APCI16XX_InsnReadTTLIOAllPortValue(comedi_device *dev,
+int i_APCI16XX_InsnReadTTLIOAllPortValue(struct comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
@@ -86,9 +86,9 @@ int i_APCI16XX_InsnReadTTLIOAllPortValue(comedi_device *dev,
+----------------------------------------------------------------------------+
*/
-int i_APCI16XX_InsnBitsWriteTTLIO(comedi_device *dev,
+int i_APCI16XX_InsnBitsWriteTTLIO(struct comedi_device *dev,
comedi_subdevice *s, comedi_insn *insn,
unsigned int *data);
-int i_APCI16XX_Reset(comedi_device *dev);
+int i_APCI16XX_Reset(struct comedi_device *dev);
#endif
diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci2016.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci2016.c
index fd4ae6abbb3f..dcb837dee3b1 100644
--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci2016.c
+++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci2016.c
@@ -56,12 +56,12 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2016_ConfigDigitalOutput |
-| (comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Configures The Digital Output Subdevice. |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| UINT *data : Data Pointer contains |
| configuration parameters as below |
| |
@@ -75,7 +75,7 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
| |
+----------------------------------------------------------------------------+
*/
-int i_APCI2016_ConfigDigitalOutput(comedi_device * dev, comedi_subdevice * s,
+int i_APCI2016_ConfigDigitalOutput(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if ((data[0] != 0) && (data[0] != 1)) {
@@ -95,12 +95,12 @@ int i_APCI2016_ConfigDigitalOutput(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2016_WriteDigitalOutput |
-| (comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Writes port value To the selected port |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| UINT ui_NoOfChannels : No Of Channels To Write |
| UINT *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
@@ -111,7 +111,7 @@ int i_APCI2016_ConfigDigitalOutput(comedi_device * dev, comedi_subdevice * s,
| |
+----------------------------------------------------------------------------+
*/
-int i_APCI2016_WriteDigitalOutput(comedi_device * dev, comedi_subdevice * s,
+int i_APCI2016_WriteDigitalOutput(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_NoOfChannel;
@@ -250,12 +250,12 @@ int i_APCI2016_WriteDigitalOutput(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2016_BitsDigitalOutput |
-| (comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read value of the selected channel or port |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| UINT ui_NoOfChannels : No Of Channels To read |
| UINT *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
@@ -266,7 +266,7 @@ int i_APCI2016_WriteDigitalOutput(comedi_device * dev, comedi_subdevice * s,
| |
+----------------------------------------------------------------------------+
*/
-int i_APCI2016_BitsDigitalOutput(comedi_device * dev, comedi_subdevice * s,
+int i_APCI2016_BitsDigitalOutput(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_Temp;
@@ -320,12 +320,12 @@ int i_APCI2016_BitsDigitalOutput(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2016_ConfigWatchdog |
-| (comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Configures The Watchdog |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| comedi_subdevice *s, :pointer to subdevice structure |
| comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
@@ -337,7 +337,7 @@ int i_APCI2016_BitsDigitalOutput(comedi_device * dev, comedi_subdevice * s,
| |
+----------------------------------------------------------------------------+
*/
-int i_APCI2016_ConfigWatchdog(comedi_device * dev, comedi_subdevice * s,
+int i_APCI2016_ConfigWatchdog(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
@@ -363,12 +363,12 @@ int i_APCI2016_ConfigWatchdog(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2016_StartStopWriteWatchdog |
-| (comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Start / Stop The Watchdog |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| comedi_subdevice *s, :pointer to subdevice structure |
| comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
@@ -380,7 +380,7 @@ int i_APCI2016_ConfigWatchdog(comedi_device * dev, comedi_subdevice * s,
| |
+----------------------------------------------------------------------------+
*/
-int i_APCI2016_StartStopWriteWatchdog(comedi_device * dev, comedi_subdevice * s,
+int i_APCI2016_StartStopWriteWatchdog(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
@@ -409,12 +409,12 @@ int i_APCI2016_StartStopWriteWatchdog(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2016_ReadWatchdog |
-| (comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read The Watchdog |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| comedi_subdevice *s, :pointer to subdevice structure |
| comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
@@ -427,7 +427,7 @@ int i_APCI2016_StartStopWriteWatchdog(comedi_device * dev, comedi_subdevice * s,
+----------------------------------------------------------------------------+
*/
-int i_APCI2016_ReadWatchdog(comedi_device * dev, comedi_subdevice * s,
+int i_APCI2016_ReadWatchdog(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
udelay(5);
@@ -437,11 +437,11 @@ int i_APCI2016_ReadWatchdog(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
-| Function Name : int i_APCI2016_Reset(comedi_device *dev) | |
+| Function Name : int i_APCI2016_Reset(struct comedi_device *dev) | |
+----------------------------------------------------------------------------+
| Task :resets all the registers |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev
+| Input Parameters : struct comedi_device *dev
+----------------------------------------------------------------------------+
| Output Parameters : -- |
+----------------------------------------------------------------------------+
@@ -450,7 +450,7 @@ int i_APCI2016_ReadWatchdog(comedi_device * dev, comedi_subdevice * s,
+----------------------------------------------------------------------------+
*/
-INT i_APCI2016_Reset(comedi_device * dev)
+INT i_APCI2016_Reset(struct comedi_device * dev)
{
outw(0x0, devpriv->iobase + APCI2016_DIGITAL_OP); // Resets the digital output channels
outw(0x0, devpriv->i_IobaseAddon + APCI2016_WATCHDOG_ENABLEDISABLE);
diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci2016.h b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci2016.h
index 3ca52e9eca5a..765de4212ed0 100644
--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci2016.h
+++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci2016.h
@@ -40,25 +40,25 @@
// Hardware Layer functions for Apci2016
//DO
-int i_APCI2016_ConfigDigitalOutput(comedi_device *dev, comedi_subdevice *s,
+int i_APCI2016_ConfigDigitalOutput(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-int i_APCI2016_WriteDigitalOutput(comedi_device *dev, comedi_subdevice *s,
+int i_APCI2016_WriteDigitalOutput(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-int i_APCI2016_BitsDigitalOutput(comedi_device *dev, comedi_subdevice *s,
+int i_APCI2016_BitsDigitalOutput(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
// TIMER
// timer value is passed as u seconds
-int i_APCI2016_ConfigWatchdog(comedi_device *dev, comedi_subdevice *s,
+int i_APCI2016_ConfigWatchdog(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-int i_APCI2016_StartStopWriteWatchdog(comedi_device *dev, comedi_subdevice *s,
+int i_APCI2016_StartStopWriteWatchdog(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-int i_APCI2016_ReadWatchdog(comedi_device *dev, comedi_subdevice *s,
+int i_APCI2016_ReadWatchdog(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
// Interrupt functions.....
@@ -67,4 +67,4 @@ int i_APCI2016_ReadWatchdog(comedi_device *dev, comedi_subdevice *s,
//VOID v_APCI2016_Interrupt(int irq, void *d);
// RESET
-INT i_APCI2016_Reset(comedi_device *dev);
+INT i_APCI2016_Reset(struct comedi_device *dev);
diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci2032.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci2032.c
index 4345dda7f99d..b536667398cf 100644
--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci2032.c
+++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci2032.c
@@ -57,12 +57,12 @@ UINT ui_InterruptData, ui_Type;
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2032_ConfigDigitalOutput |
-| (comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Configures The Digital Output Subdevice. |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| UINT *data : Data Pointer contains |
| configuration parameters as below |
| |
@@ -79,7 +79,7 @@ UINT ui_InterruptData, ui_Type;
| |
+----------------------------------------------------------------------------+
*/
-int i_APCI2032_ConfigDigitalOutput(comedi_device * dev, comedi_subdevice * s,
+int i_APCI2032_ConfigDigitalOutput(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
ULONG ul_Command = 0;
@@ -117,12 +117,12 @@ int i_APCI2032_ConfigDigitalOutput(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2032_WriteDigitalOutput |
-| (comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Writes port value To the selected port |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| UINT ui_NoOfChannels : No Of Channels To Write |
| UINT *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
@@ -134,7 +134,7 @@ int i_APCI2032_ConfigDigitalOutput(comedi_device * dev, comedi_subdevice * s,
+----------------------------------------------------------------------------+
*/
-INT i_APCI2032_WriteDigitalOutput(comedi_device * dev, comedi_subdevice * s,
+INT i_APCI2032_WriteDigitalOutput(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_Temp, ui_Temp1;
@@ -296,12 +296,12 @@ INT i_APCI2032_WriteDigitalOutput(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2032_ReadDigitalOutput |
-| (comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read value of the selected channel or port |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| UINT ui_NoOfChannels : No Of Channels To read |
| UINT *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
@@ -313,7 +313,7 @@ INT i_APCI2032_WriteDigitalOutput(comedi_device * dev, comedi_subdevice * s,
+----------------------------------------------------------------------------+
*/
-INT i_APCI2032_ReadDigitalOutput(comedi_device * dev, comedi_subdevice * s,
+INT i_APCI2032_ReadDigitalOutput(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_Temp;
@@ -368,7 +368,7 @@ INT i_APCI2032_ReadDigitalOutput(comedi_device * dev, comedi_subdevice * s,
+----------------------------------------------------------------------------+
| Task : Configures The Watchdog |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| comedi_subdevice *s, :pointer to subdevice structure
comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
@@ -380,7 +380,7 @@ INT i_APCI2032_ReadDigitalOutput(comedi_device * dev, comedi_subdevice * s,
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI2032_ConfigWatchdog(comedi_device * dev, comedi_subdevice * s,
+INT i_APCI2032_ConfigWatchdog(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (data[0] == 0) {
@@ -403,12 +403,12 @@ INT i_APCI2032_ConfigWatchdog(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2032_StartStopWriteWatchdog |
- | (comedi_device *dev,comedi_subdevice *s,
+ | (struct comedi_device *dev,comedi_subdevice *s,
comedi_insn *insn,unsigned int *data); |
+----------------------------------------------------------------------------+
| Task : Start / Stop The Watchdog |
+----------------------------------------------------------------------------+
- | Input Parameters : comedi_device *dev : Driver handle |
+ | Input Parameters : struct comedi_device *dev : Driver handle |
| comedi_subdevice *s, :pointer to subdevice structure
comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
@@ -421,7 +421,7 @@ INT i_APCI2032_ConfigWatchdog(comedi_device * dev, comedi_subdevice * s,
+----------------------------------------------------------------------------+
*/
-int i_APCI2032_StartStopWriteWatchdog(comedi_device * dev, comedi_subdevice * s,
+int i_APCI2032_StartStopWriteWatchdog(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
switch (data[0]) {
@@ -448,12 +448,12 @@ int i_APCI2032_StartStopWriteWatchdog(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2032_ReadWatchdog |
-| (comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,
+| (struct comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,
unsigned int *data); |
+----------------------------------------------------------------------------+
| Task : Read The Watchdog |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| comedi_subdevice *s, :pointer to subdevice structure
comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
@@ -466,7 +466,7 @@ int i_APCI2032_StartStopWriteWatchdog(comedi_device * dev, comedi_subdevice * s,
+----------------------------------------------------------------------------+
*/
-int i_APCI2032_ReadWatchdog(comedi_device * dev, comedi_subdevice * s,
+int i_APCI2032_ReadWatchdog(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
@@ -495,7 +495,7 @@ int i_APCI2032_ReadWatchdog(comedi_device * dev, comedi_subdevice * s,
*/
void v_APCI2032_Interrupt(int irq, void *d)
{
- comedi_device *dev = d;
+ struct comedi_device *dev = d;
unsigned int ui_DO;
ui_DO = inl(devpriv->iobase + APCI2032_DIGITAL_OP_IRQ) & 0x1; //Check if VCC OR CC interrupt has occured.
@@ -530,7 +530,7 @@ void v_APCI2032_Interrupt(int irq, void *d)
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2032_ReadInterruptStatus |
-| (comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task :Reads the interrupt status register |
@@ -544,7 +544,7 @@ void v_APCI2032_Interrupt(int irq, void *d)
+----------------------------------------------------------------------------+
*/
-int i_APCI2032_ReadInterruptStatus(comedi_device * dev, comedi_subdevice * s,
+int i_APCI2032_ReadInterruptStatus(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
*data = ui_Type;
@@ -553,7 +553,7 @@ int i_APCI2032_ReadInterruptStatus(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
-| Function Name : int i_APCI2032_Reset(comedi_device *dev) |
+| Function Name : int i_APCI2032_Reset(struct comedi_device *dev) |
| |
+----------------------------------------------------------------------------+
| Task :Resets the registers of the card |
@@ -567,7 +567,7 @@ int i_APCI2032_ReadInterruptStatus(comedi_device * dev, comedi_subdevice * s,
+----------------------------------------------------------------------------+
*/
-int i_APCI2032_Reset(comedi_device * dev)
+int i_APCI2032_Reset(struct comedi_device * dev)
{
devpriv->b_DigitalOutputRegister = 0;
ui_Type = 0;
diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci2032.h b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci2032.h
index 7d858af87979..8ceefb07d503 100644
--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci2032.h
+++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci2032.h
@@ -55,22 +55,22 @@
// Hardware Layer functions for Apci2032
//DO
-int i_APCI2032_ConfigDigitalOutput(comedi_device *dev, comedi_subdevice *s,
+int i_APCI2032_ConfigDigitalOutput(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI2032_WriteDigitalOutput(comedi_device *dev, comedi_subdevice *s,
+INT i_APCI2032_WriteDigitalOutput(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI2032_ReadDigitalOutput(comedi_device *dev, comedi_subdevice *s,
+INT i_APCI2032_ReadDigitalOutput(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-int i_APCI2032_ReadInterruptStatus(comedi_device *dev, comedi_subdevice *s,
+int i_APCI2032_ReadInterruptStatus(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
// TIMER
// timer value is passed as u seconds
-INT i_APCI2032_ConfigWatchdog(comedi_device *dev, comedi_subdevice *s,
+INT i_APCI2032_ConfigWatchdog(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-int i_APCI2032_StartStopWriteWatchdog(comedi_device *dev, comedi_subdevice *s,
+int i_APCI2032_StartStopWriteWatchdog(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-int i_APCI2032_ReadWatchdog(comedi_device *dev, comedi_subdevice *s,
+int i_APCI2032_ReadWatchdog(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
// Interrupt functions.....
@@ -78,4 +78,4 @@ int i_APCI2032_ReadWatchdog(comedi_device *dev, comedi_subdevice *s,
void v_APCI2032_Interrupt(int irq, void *d);
//Reset functions
-int i_APCI2032_Reset(comedi_device *dev);
+int i_APCI2032_Reset(struct comedi_device *dev);
diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci2200.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci2200.c
index d61dfd1d1eab..b297f6f96089 100644
--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci2200.c
+++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci2200.c
@@ -56,12 +56,12 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2200_Read1DigitalInput |
-| (comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Return the status of the digital input |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| comedi_subdevice *s, :pointer to subdevice structure
comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
@@ -73,7 +73,7 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI2200_Read1DigitalInput(comedi_device * dev, comedi_subdevice * s,
+INT i_APCI2200_Read1DigitalInput(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_TmpValue = 0;
@@ -94,12 +94,12 @@ INT i_APCI2200_Read1DigitalInput(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2200_ReadMoreDigitalInput |
-| (comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Return the status of the Requested digital inputs |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| comedi_subdevice *s, :pointer to subdevice structure
comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
@@ -112,7 +112,7 @@ INT i_APCI2200_Read1DigitalInput(comedi_device * dev, comedi_subdevice * s,
+----------------------------------------------------------------------------+
*/
-INT i_APCI2200_ReadMoreDigitalInput(comedi_device * dev, comedi_subdevice * s,
+INT i_APCI2200_ReadMoreDigitalInput(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
@@ -146,13 +146,13 @@ INT i_APCI2200_ReadMoreDigitalInput(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
-| Function Name : int i_APCI2200_ConfigDigitalOutput (comedi_device *dev,
+| Function Name : int i_APCI2200_ConfigDigitalOutput (struct comedi_device *dev,
comedi_subdevice *s comedi_insn *insn,unsigned int *data) |
| |
+----------------------------------------------------------------------------+
| Task : Configures The Digital Output Subdevice. |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| unsigned int *data : Data Pointer contains |
| configuration parameters as below |
| comedi_subdevice *s, :pointer to subdevice structure
@@ -169,7 +169,7 @@ INT i_APCI2200_ReadMoreDigitalInput(comedi_device * dev, comedi_subdevice * s,
| |
+----------------------------------------------------------------------------+
*/
-int i_APCI2200_ConfigDigitalOutput(comedi_device * dev, comedi_subdevice * s,
+int i_APCI2200_ConfigDigitalOutput(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
devpriv->b_OutputMemoryStatus = data[0];
@@ -179,12 +179,12 @@ int i_APCI2200_ConfigDigitalOutput(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2200_WriteDigitalOutput |
-| (comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,
+| (struct comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,
unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Writes port value To the selected port |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| comedi_subdevice *s, :pointer to subdevice structure
comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
@@ -197,7 +197,7 @@ int i_APCI2200_ConfigDigitalOutput(comedi_device * dev, comedi_subdevice * s,
+----------------------------------------------------------------------------+
*/
-INT i_APCI2200_WriteDigitalOutput(comedi_device * dev, comedi_subdevice * s,
+INT i_APCI2200_WriteDigitalOutput(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_Temp, ui_Temp1;
@@ -336,12 +336,12 @@ INT i_APCI2200_WriteDigitalOutput(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2200_ReadDigitalOutput |
-| (comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,
+| (struct comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,
unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read value of the selected channel or port |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| comedi_subdevice *s, :pointer to subdevice structure
comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
@@ -354,7 +354,7 @@ INT i_APCI2200_WriteDigitalOutput(comedi_device * dev, comedi_subdevice * s,
+----------------------------------------------------------------------------+
*/
-INT i_APCI2200_ReadDigitalOutput(comedi_device * dev, comedi_subdevice * s,
+INT i_APCI2200_ReadDigitalOutput(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
@@ -399,13 +399,13 @@ INT i_APCI2200_ReadDigitalOutput(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
-| Function Name : int i_APCI2200_ConfigWatchdog(comedi_device *dev,
+| Function Name : int i_APCI2200_ConfigWatchdog(struct comedi_device *dev,
comedi_subdevice *s,comedi_insn *insn,unsigned int *data) |
| |
+----------------------------------------------------------------------------+
| Task : Configures The Watchdog |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| comedi_subdevice *s, :pointer to subdevice structure
comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
@@ -418,7 +418,7 @@ INT i_APCI2200_ReadDigitalOutput(comedi_device * dev, comedi_subdevice * s,
+----------------------------------------------------------------------------+
*/
-int i_APCI2200_ConfigWatchdog(comedi_device * dev, comedi_subdevice * s,
+int i_APCI2200_ConfigWatchdog(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (data[0] == 0) {
@@ -446,12 +446,12 @@ int i_APCI2200_ConfigWatchdog(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2200_StartStopWriteWatchdog |
- | (comedi_device *dev,comedi_subdevice *s,
+ | (struct comedi_device *dev,comedi_subdevice *s,
comedi_insn *insn,unsigned int *data); |
+----------------------------------------------------------------------------+
| Task : Start / Stop The Watchdog |
+----------------------------------------------------------------------------+
- | Input Parameters : comedi_device *dev : Driver handle |
+ | Input Parameters : struct comedi_device *dev : Driver handle |
| comedi_subdevice *s, :pointer to subdevice structure
comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
@@ -464,7 +464,7 @@ int i_APCI2200_ConfigWatchdog(comedi_device * dev, comedi_subdevice * s,
+----------------------------------------------------------------------------+
*/
-int i_APCI2200_StartStopWriteWatchdog(comedi_device * dev, comedi_subdevice * s,
+int i_APCI2200_StartStopWriteWatchdog(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
switch (data[0]) {
@@ -491,12 +491,12 @@ int i_APCI2200_StartStopWriteWatchdog(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI2200_ReadWatchdog |
-| (comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,
+| (struct comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,
unsigned int *data); |
+----------------------------------------------------------------------------+
| Task : Read The Watchdog |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| comedi_subdevice *s, :pointer to subdevice structure
comedi_insn *insn :pointer to insn structure |
| unsigned int *data : Data Pointer to read status |
@@ -509,7 +509,7 @@ int i_APCI2200_StartStopWriteWatchdog(comedi_device * dev, comedi_subdevice * s,
+----------------------------------------------------------------------------+
*/
-int i_APCI2200_ReadWatchdog(comedi_device * dev, comedi_subdevice * s,
+int i_APCI2200_ReadWatchdog(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
data[0] =
@@ -520,11 +520,11 @@ int i_APCI2200_ReadWatchdog(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
-| Function Name : int i_APCI2200_Reset(comedi_device *dev) | |
+| Function Name : int i_APCI2200_Reset(struct comedi_device *dev) | |
+----------------------------------------------------------------------------+
| Task :resets all the registers |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev
+| Input Parameters : struct comedi_device *dev
+----------------------------------------------------------------------------+
| Output Parameters : -- |
+----------------------------------------------------------------------------+
@@ -533,7 +533,7 @@ int i_APCI2200_ReadWatchdog(comedi_device * dev, comedi_subdevice * s,
+----------------------------------------------------------------------------+
*/
-INT i_APCI2200_Reset(comedi_device * dev)
+INT i_APCI2200_Reset(struct comedi_device * dev)
{
outw(0x0, devpriv->iobase + APCI2200_DIGITAL_OP); //RESETS THE DIGITAL OUTPUTS
outw(0x0,
diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci2200.h b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci2200.h
index 59fc451e71c7..ab1bb309767a 100644
--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci2200.h
+++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci2200.h
@@ -36,26 +36,26 @@
// Hardware Layer functions for Apci2200
//Digital Input
-INT i_APCI2200_ReadMoreDigitalInput(comedi_device *dev, comedi_subdevice *s,
+INT i_APCI2200_ReadMoreDigitalInput(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI2200_Read1DigitalInput(comedi_device *dev, comedi_subdevice *s,
+INT i_APCI2200_Read1DigitalInput(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
//Digital Output
-int i_APCI2200_ConfigDigitalOutput(comedi_device *dev, comedi_subdevice *s,
+int i_APCI2200_ConfigDigitalOutput(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI2200_WriteDigitalOutput(comedi_device *dev, comedi_subdevice *s,
+INT i_APCI2200_WriteDigitalOutput(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI2200_ReadDigitalOutput(comedi_device *dev, comedi_subdevice *s,
+INT i_APCI2200_ReadDigitalOutput(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
// TIMER
-int i_APCI2200_ConfigWatchdog(comedi_device *dev, comedi_subdevice *s,
+int i_APCI2200_ConfigWatchdog(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-int i_APCI2200_StartStopWriteWatchdog(comedi_device *dev, comedi_subdevice *s,
+int i_APCI2200_StartStopWriteWatchdog(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-int i_APCI2200_ReadWatchdog(comedi_device *dev, comedi_subdevice *s,
+int i_APCI2200_ReadWatchdog(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
//reset
-INT i_APCI2200_Reset(comedi_device *dev);
+INT i_APCI2200_Reset(struct comedi_device *dev);
diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c
index 45445e675f72..6aaab8cf3c1a 100644
--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c
+++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c
@@ -57,14 +57,14 @@ static UINT ui_Temp = 0;
/*
+----------------------------------------------------------------------------+
-| Function name :int i_APCI3120_InsnConfigAnalogInput(comedi_device *dev,|
+| Function name :int i_APCI3120_InsnConfigAnalogInput(struct comedi_device *dev,|
| comedi_subdevice *s,comedi_insn *insn,unsigned int *data) |
| |
+----------------------------------------------------------------------------+
| Task : Calls card specific function |
| |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev |
+| Input Parameters : struct comedi_device *dev |
| comedi_subdevice *s |
| comedi_insn *insn |
| unsigned int *data |
@@ -74,7 +74,7 @@ static UINT ui_Temp = 0;
+----------------------------------------------------------------------------+
*/
-int i_APCI3120_InsnConfigAnalogInput(comedi_device * dev, comedi_subdevice * s,
+int i_APCI3120_InsnConfigAnalogInput(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT i;
@@ -124,7 +124,7 @@ int i_APCI3120_InsnConfigAnalogInput(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
-| Function name :int i_APCI3120_InsnReadAnalogInput(comedi_device *dev, |
+| Function name :int i_APCI3120_InsnReadAnalogInput(struct comedi_device *dev, |
| comedi_subdevice *s,comedi_insn *insn, unsigned int *data) |
| |
+----------------------------------------------------------------------------+
@@ -135,7 +135,7 @@ int i_APCI3120_InsnConfigAnalogInput(comedi_device * dev, comedi_subdevice * s,
| time 10 microsec. |
| |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev |
+| Input Parameters : struct comedi_device *dev |
| comedi_subdevice *s |
| comedi_insn *insn |
| unsigned int *data |
@@ -145,7 +145,7 @@ int i_APCI3120_InsnConfigAnalogInput(comedi_device * dev, comedi_subdevice * s,
+----------------------------------------------------------------------------+
*/
-int i_APCI3120_InsnReadAnalogInput(comedi_device * dev, comedi_subdevice * s,
+int i_APCI3120_InsnReadAnalogInput(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
USHORT us_ConvertTiming, us_TmpValue, i;
@@ -393,14 +393,14 @@ int i_APCI3120_InsnReadAnalogInput(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
-| Function name :int i_APCI3120_StopCyclicAcquisition(comedi_device *dev,|
+| Function name :int i_APCI3120_StopCyclicAcquisition(struct comedi_device *dev,|
| comedi_subdevice *s)|
| |
+----------------------------------------------------------------------------+
| Task : Stops Cyclic acquisition |
| |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev |
+| Input Parameters : struct comedi_device *dev |
| comedi_subdevice *s |
| |
+----------------------------------------------------------------------------+
@@ -409,7 +409,7 @@ int i_APCI3120_InsnReadAnalogInput(comedi_device * dev, comedi_subdevice * s,
+----------------------------------------------------------------------------+
*/
-int i_APCI3120_StopCyclicAcquisition(comedi_device * dev, comedi_subdevice * s)
+int i_APCI3120_StopCyclicAcquisition(struct comedi_device * dev, comedi_subdevice * s)
{
// Disable A2P Fifo write and AMWEN signal
outw(0, devpriv->i_IobaseAddon + 4);
@@ -459,7 +459,7 @@ int i_APCI3120_StopCyclicAcquisition(comedi_device * dev, comedi_subdevice * s)
/*
+----------------------------------------------------------------------------+
-| Function name :int i_APCI3120_CommandTestAnalogInput(comedi_device *dev|
+| Function name :int i_APCI3120_CommandTestAnalogInput(struct comedi_device *dev|
| ,comedi_subdevice *s,comedi_cmd *cmd) |
| |
+----------------------------------------------------------------------------+
@@ -467,7 +467,7 @@ int i_APCI3120_StopCyclicAcquisition(comedi_device * dev, comedi_subdevice * s)
| acquisition |
| |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev |
+| Input Parameters : struct comedi_device *dev |
| comedi_subdevice *s |
| comedi_cmd *cmd |
+----------------------------------------------------------------------------+
@@ -476,7 +476,7 @@ int i_APCI3120_StopCyclicAcquisition(comedi_device * dev, comedi_subdevice * s)
+----------------------------------------------------------------------------+
*/
-int i_APCI3120_CommandTestAnalogInput(comedi_device * dev, comedi_subdevice * s,
+int i_APCI3120_CommandTestAnalogInput(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
@@ -616,7 +616,7 @@ int i_APCI3120_CommandTestAnalogInput(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
-| Function name : int i_APCI3120_CommandAnalogInput(comedi_device *dev, |
+| Function name : int i_APCI3120_CommandAnalogInput(struct comedi_device *dev, |
| comedi_subdevice *s) |
| |
+----------------------------------------------------------------------------+
@@ -624,7 +624,7 @@ int i_APCI3120_CommandTestAnalogInput(comedi_device * dev, comedi_subdevice * s,
| Determines the mode 1 or 2. |
| |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev |
+| Input Parameters : struct comedi_device *dev |
| comedi_subdevice *s |
| |
+----------------------------------------------------------------------------+
@@ -633,7 +633,7 @@ int i_APCI3120_CommandTestAnalogInput(comedi_device * dev, comedi_subdevice * s,
+----------------------------------------------------------------------------+
*/
-int i_APCI3120_CommandAnalogInput(comedi_device * dev, comedi_subdevice * s)
+int i_APCI3120_CommandAnalogInput(struct comedi_device * dev, comedi_subdevice * s)
{
comedi_cmd *cmd = &s->async->cmd;
@@ -690,7 +690,7 @@ int i_APCI3120_CommandAnalogInput(comedi_device * dev, comedi_subdevice * s)
/*
+----------------------------------------------------------------------------+
| Function name : int i_APCI3120_CyclicAnalogInput(int mode, |
-| comedi_device * dev,comedi_subdevice * s) |
+| struct comedi_device * dev,comedi_subdevice * s) |
+----------------------------------------------------------------------------+
| Task : This is used for analog input cyclic acquisition |
| Performs the command operations. |
@@ -707,7 +707,7 @@ int i_APCI3120_CommandAnalogInput(comedi_device * dev, comedi_subdevice * s)
+----------------------------------------------------------------------------+
*/
-int i_APCI3120_CyclicAnalogInput(int mode, comedi_device * dev,
+int i_APCI3120_CyclicAnalogInput(int mode, struct comedi_device * dev,
comedi_subdevice * s)
{
BYTE b_Tmp;
@@ -1202,14 +1202,14 @@ int i_APCI3120_CyclicAnalogInput(int mode, comedi_device * dev,
/*
+----------------------------------------------------------------------------+
-| Function name : int i_APCI3120_Reset(comedi_device *dev) |
+| Function name : int i_APCI3120_Reset(struct comedi_device *dev) |
| |
| |
+----------------------------------------------------------------------------+
| Task : Hardware reset function |
| |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev |
+| Input Parameters : struct comedi_device *dev |
| |
| |
+----------------------------------------------------------------------------+
@@ -1218,7 +1218,7 @@ int i_APCI3120_CyclicAnalogInput(int mode, comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-int i_APCI3120_Reset(comedi_device * dev)
+int i_APCI3120_Reset(struct comedi_device * dev)
{
unsigned int i;
unsigned short us_TmpValue;
@@ -1274,7 +1274,7 @@ int i_APCI3120_Reset(comedi_device * dev)
/*
+----------------------------------------------------------------------------+
-| Function name : int i_APCI3120_SetupChannelList(comedi_device * dev, |
+| Function name : int i_APCI3120_SetupChannelList(struct comedi_device * dev, |
| comedi_subdevice * s, int n_chan,unsigned int *chanlist|
| ,char check) |
| |
@@ -1285,7 +1285,7 @@ int i_APCI3120_Reset(comedi_device * dev)
|list is ok or not. |
| |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device * dev |
+| Input Parameters : struct comedi_device * dev |
| comedi_subdevice * s |
| int n_chan |
unsigned int *chanlist
@@ -1296,7 +1296,7 @@ int i_APCI3120_Reset(comedi_device * dev)
+----------------------------------------------------------------------------+
*/
-int i_APCI3120_SetupChannelList(comedi_device * dev, comedi_subdevice * s,
+int i_APCI3120_SetupChannelList(struct comedi_device * dev, comedi_subdevice * s,
int n_chan, unsigned int *chanlist, char check)
{
unsigned int i; //, differencial=0, bipolar=0;
@@ -1344,14 +1344,14 @@ int i_APCI3120_SetupChannelList(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
-| Function name : int i_APCI3120_ExttrigEnable(comedi_device * dev) |
+| Function name : int i_APCI3120_ExttrigEnable(struct comedi_device * dev) |
| |
| |
+----------------------------------------------------------------------------+
| Task : Enable the external trigger |
| |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device * dev |
+| Input Parameters : struct comedi_device * dev |
| |
| |
+----------------------------------------------------------------------------+
@@ -1360,7 +1360,7 @@ int i_APCI3120_SetupChannelList(comedi_device * dev, comedi_subdevice * s,
+----------------------------------------------------------------------------+
*/
-int i_APCI3120_ExttrigEnable(comedi_device * dev)
+int i_APCI3120_ExttrigEnable(struct comedi_device * dev)
{
devpriv->us_OutputRegister |= APCI3120_ENABLE_EXT_TRIGGER;
@@ -1370,13 +1370,13 @@ int i_APCI3120_ExttrigEnable(comedi_device * dev)
/*
+----------------------------------------------------------------------------+
-| Function name : int i_APCI3120_ExttrigDisable(comedi_device * dev) |
+| Function name : int i_APCI3120_ExttrigDisable(struct comedi_device * dev) |
| |
+----------------------------------------------------------------------------+
| Task : Disables the external trigger |
| |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device * dev |
+| Input Parameters : struct comedi_device * dev |
| |
| |
+----------------------------------------------------------------------------+
@@ -1385,7 +1385,7 @@ int i_APCI3120_ExttrigEnable(comedi_device * dev)
+----------------------------------------------------------------------------+
*/
-int i_APCI3120_ExttrigDisable(comedi_device * dev)
+int i_APCI3120_ExttrigDisable(struct comedi_device * dev)
{
devpriv->us_OutputRegister &= ~APCI3120_ENABLE_EXT_TRIGGER;
outw(devpriv->us_OutputRegister, dev->iobase + APCI3120_WR_ADDRESS);
@@ -1421,7 +1421,7 @@ int i_APCI3120_ExttrigDisable(comedi_device * dev)
void v_APCI3120_Interrupt(int irq, void *d)
{
- comedi_device *dev = d;
+ struct comedi_device *dev = d;
USHORT int_daq;
unsigned int int_amcc, ui_Check, i;
@@ -1612,7 +1612,7 @@ void v_APCI3120_Interrupt(int irq, void *d)
/*
+----------------------------------------------------------------------------+
-| Function name :int i_APCI3120_InterruptHandleEos(comedi_device *dev) |
+| Function name :int i_APCI3120_InterruptHandleEos(struct comedi_device *dev) |
| |
| |
+----------------------------------------------------------------------------+
@@ -1621,7 +1621,7 @@ void v_APCI3120_Interrupt(int irq, void *d)
| to Comedi buffer. |
| |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev |
+| Input Parameters : struct comedi_device *dev |
| |
| |
+----------------------------------------------------------------------------+
@@ -1630,7 +1630,7 @@ void v_APCI3120_Interrupt(int irq, void *d)
+----------------------------------------------------------------------------+
*/
-/*int i_APCI3120_InterruptHandleEos(comedi_device *dev)
+/*int i_APCI3120_InterruptHandleEos(struct comedi_device *dev)
{
int n_chan,i;
short *data;
@@ -1654,7 +1654,7 @@ void v_APCI3120_Interrupt(int irq, void *d)
}
return 0;
}*/
-int i_APCI3120_InterruptHandleEos(comedi_device * dev)
+int i_APCI3120_InterruptHandleEos(struct comedi_device * dev)
{
int n_chan, i;
comedi_subdevice *s = dev->subdevices + 0;
@@ -1698,7 +1698,7 @@ int i_APCI3120_InterruptHandleEos(comedi_device * dev)
void v_APCI3120_InterruptDma(int irq, void *d)
{
- comedi_device *dev = d;
+ struct comedi_device *dev = d;
comedi_subdevice *s = dev->subdevices + 0;
unsigned int next_dma_buf, samplesinbuf;
unsigned long low_word, high_word, var;
@@ -1886,7 +1886,7 @@ void v_APCI3120_InterruptDma(int irq, void *d)
| Comedi buffer |
| |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev |
+| Input Parameters : struct comedi_device *dev |
| comedi_subdevice *s |
| short *dma |
| short *data,int n |
@@ -1896,7 +1896,7 @@ void v_APCI3120_InterruptDma(int irq, void *d)
+----------------------------------------------------------------------------+
*/
-/*void v_APCI3120_InterruptDmaMoveBlock16bit(comedi_device *dev,comedi_subdevice *s,short *dma,short *data,int n)
+/*void v_APCI3120_InterruptDmaMoveBlock16bit(struct comedi_device *dev,comedi_subdevice *s,short *dma,short *data,int n)
{
int i,j,m;
@@ -1925,7 +1925,7 @@ void v_APCI3120_InterruptDma(int irq, void *d)
}
*/
-void v_APCI3120_InterruptDmaMoveBlock16bit(comedi_device * dev,
+void v_APCI3120_InterruptDmaMoveBlock16bit(struct comedi_device * dev,
comedi_subdevice * s, short * dma_buffer, unsigned int num_samples)
{
devpriv->ui_AiActualScan +=
@@ -1944,14 +1944,14 @@ void v_APCI3120_InterruptDmaMoveBlock16bit(comedi_device * dev,
/*
+----------------------------------------------------------------------------+
-| Function name :int i_APCI3120_InsnConfigTimer(comedi_device *dev, |
+| Function name :int i_APCI3120_InsnConfigTimer(struct comedi_device *dev, |
| comedi_subdevice *s,comedi_insn *insn,unsigned int *data) |
| |
+----------------------------------------------------------------------------+
| Task :Configure Timer 2 |
| |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev |
+| Input Parameters : struct comedi_device *dev |
| comedi_subdevice *s |
| comedi_insn *insn |
| unsigned int *data |
@@ -1967,7 +1967,7 @@ void v_APCI3120_InterruptDmaMoveBlock16bit(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-int i_APCI3120_InsnConfigTimer(comedi_device * dev, comedi_subdevice * s,
+int i_APCI3120_InsnConfigTimer(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
@@ -2092,13 +2092,13 @@ int i_APCI3120_InsnConfigTimer(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
-| Function name :int i_APCI3120_InsnWriteTimer(comedi_device *dev, |
+| Function name :int i_APCI3120_InsnWriteTimer(struct comedi_device *dev, |
| comedi_subdevice *s, comedi_insn *insn,unsigned int *data) |
| |
+----------------------------------------------------------------------------+
| Task : To start and stop the timer |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev |
+| Input Parameters : struct comedi_device *dev |
| comedi_subdevice *s |
| comedi_insn *insn |
| unsigned int *data |
@@ -2118,7 +2118,7 @@ int i_APCI3120_InsnConfigTimer(comedi_device * dev, comedi_subdevice * s,
+----------------------------------------------------------------------------+
*/
-int i_APCI3120_InsnWriteTimer(comedi_device * dev, comedi_subdevice * s,
+int i_APCI3120_InsnWriteTimer(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
@@ -2283,14 +2283,14 @@ int i_APCI3120_InsnWriteTimer(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
-| Function name : int i_APCI3120_InsnReadTimer(comedi_device *dev, |
+| Function name : int i_APCI3120_InsnReadTimer(struct comedi_device *dev, |
| comedi_subdevice *s,comedi_insn *insn, unsigned int *data) |
| |
| |
+----------------------------------------------------------------------------+
| Task : read the Timer value |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev |
+| Input Parameters : struct comedi_device *dev |
| comedi_subdevice *s |
| comedi_insn *insn |
| unsigned int *data |
@@ -2304,7 +2304,7 @@ int i_APCI3120_InsnWriteTimer(comedi_device * dev, comedi_subdevice * s,
| |
+----------------------------------------------------------------------------+
*/
-int i_APCI3120_InsnReadTimer(comedi_device * dev, comedi_subdevice * s,
+int i_APCI3120_InsnReadTimer(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
BYTE b_Tmp;
@@ -2360,7 +2360,7 @@ int i_APCI3120_InsnReadTimer(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
-| Function name :int i_APCI3120_InsnReadDigitalInput(comedi_device *dev, |
+| Function name :int i_APCI3120_InsnReadDigitalInput(struct comedi_device *dev, |
| comedi_subdevice *s, comedi_insn *insn,unsigned int *data) |
| |
| |
@@ -2368,7 +2368,7 @@ int i_APCI3120_InsnReadTimer(comedi_device * dev, comedi_subdevice * s,
| Task : Reads the value of the specified Digital input channel|
| |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev |
+| Input Parameters : struct comedi_device *dev |
| comedi_subdevice *s |
| comedi_insn *insn |
| unsigned int *data |
@@ -2378,7 +2378,7 @@ int i_APCI3120_InsnReadTimer(comedi_device * dev, comedi_subdevice * s,
+----------------------------------------------------------------------------+
*/
-int i_APCI3120_InsnReadDigitalInput(comedi_device * dev, comedi_subdevice
+int i_APCI3120_InsnReadDigitalInput(struct comedi_device * dev, comedi_subdevice
* s, comedi_insn * insn, unsigned int * data)
{
UINT ui_Chan, ui_TmpValue;
@@ -2403,7 +2403,7 @@ int i_APCI3120_InsnReadDigitalInput(comedi_device * dev, comedi_subdevice
/*
+----------------------------------------------------------------------------+
-| Function name :int i_APCI3120_InsnBitsDigitalInput(comedi_device *dev, |
+| Function name :int i_APCI3120_InsnBitsDigitalInput(struct comedi_device *dev, |
|comedi_subdevice *s, comedi_insn *insn,unsigned int *data) |
| |
+----------------------------------------------------------------------------+
@@ -2411,7 +2411,7 @@ int i_APCI3120_InsnReadDigitalInput(comedi_device * dev, comedi_subdevice
| value is returned in data[0] |
| |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev |
+| Input Parameters : struct comedi_device *dev |
| comedi_subdevice *s |
| comedi_insn *insn |
| unsigned int *data |
@@ -2420,7 +2420,7 @@ int i_APCI3120_InsnReadDigitalInput(comedi_device * dev, comedi_subdevice
| |
+----------------------------------------------------------------------------+
*/
-int i_APCI3120_InsnBitsDigitalInput(comedi_device * dev, comedi_subdevice * s,
+int i_APCI3120_InsnBitsDigitalInput(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_TmpValue;
@@ -2442,14 +2442,14 @@ int i_APCI3120_InsnBitsDigitalInput(comedi_device * dev, comedi_subdevice * s,
*/
/*
+----------------------------------------------------------------------------+
-| Function name :int i_APCI3120_InsnConfigDigitalOutput(comedi_device |
+| Function name :int i_APCI3120_InsnConfigDigitalOutput(struct comedi_device |
| *dev,comedi_subdevice *s,comedi_insn *insn,unsigned int *data) |
| |
+----------------------------------------------------------------------------+
| Task :Configure the output memory ON or OFF |
| |
+----------------------------------------------------------------------------+
-| Input Parameters :comedi_device *dev |
+| Input Parameters :struct comedi_device *dev |
| comedi_subdevice *s |
| comedi_insn *insn |
| unsigned int *data |
@@ -2459,7 +2459,7 @@ int i_APCI3120_InsnBitsDigitalInput(comedi_device * dev, comedi_subdevice * s,
+----------------------------------------------------------------------------+
*/
-int i_APCI3120_InsnConfigDigitalOutput(comedi_device * dev,
+int i_APCI3120_InsnConfigDigitalOutput(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
@@ -2485,14 +2485,14 @@ int i_APCI3120_InsnConfigDigitalOutput(comedi_device * dev,
/*
+----------------------------------------------------------------------------+
-| Function name :int i_APCI3120_InsnBitsDigitalOutput(comedi_device *dev, |
+| Function name :int i_APCI3120_InsnBitsDigitalOutput(struct comedi_device *dev, |
| comedi_subdevice *s, comedi_insn *insn,unsigned int *data) |
| |
+----------------------------------------------------------------------------+
| Task : write diatal output port |
| |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev |
+| Input Parameters : struct comedi_device *dev |
| comedi_subdevice *s |
| comedi_insn *insn |
| unsigned int *data |
@@ -2505,7 +2505,7 @@ int i_APCI3120_InsnConfigDigitalOutput(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-int i_APCI3120_InsnBitsDigitalOutput(comedi_device * dev, comedi_subdevice
+int i_APCI3120_InsnBitsDigitalOutput(struct comedi_device * dev, comedi_subdevice
* s, comedi_insn * insn, unsigned int * data)
{
if ((data[0] > this_board->i_DoMaxdata) || (data[0] < 0)) {
@@ -2536,14 +2536,14 @@ int i_APCI3120_InsnBitsDigitalOutput(comedi_device * dev, comedi_subdevice
/*
+----------------------------------------------------------------------------+
-| Function name :int i_APCI3120_InsnWriteDigitalOutput(comedi_device *dev,|
+| Function name :int i_APCI3120_InsnWriteDigitalOutput(struct comedi_device *dev,|
|comedi_subdevice *s,comedi_insn *insn,unsigned int *data) |
| |
+----------------------------------------------------------------------------+
| Task : Write digiatl output |
| |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev |
+| Input Parameters : struct comedi_device *dev |
| comedi_subdevice *s |
| comedi_insn *insn |
| unsigned int *data |
@@ -2556,7 +2556,7 @@ int i_APCI3120_InsnBitsDigitalOutput(comedi_device * dev, comedi_subdevice
+----------------------------------------------------------------------------+
*/
-int i_APCI3120_InsnWriteDigitalOutput(comedi_device * dev, comedi_subdevice
+int i_APCI3120_InsnWriteDigitalOutput(struct comedi_device * dev, comedi_subdevice
* s, comedi_insn * insn, unsigned int * data)
{
@@ -2617,14 +2617,14 @@ int i_APCI3120_InsnWriteDigitalOutput(comedi_device * dev, comedi_subdevice
/*
+----------------------------------------------------------------------------+
-| Function name :int i_APCI3120_InsnWriteAnalogOutput(comedi_device *dev,|
+| Function name :int i_APCI3120_InsnWriteAnalogOutput(struct comedi_device *dev,|
|comedi_subdevice *s, comedi_insn *insn,unsigned int *data) |
| |
+----------------------------------------------------------------------------+
| Task : Write analog output |
| |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev |
+| Input Parameters : struct comedi_device *dev |
| comedi_subdevice *s |
| comedi_insn *insn |
| unsigned int *data |
@@ -2634,7 +2634,7 @@ int i_APCI3120_InsnWriteDigitalOutput(comedi_device * dev, comedi_subdevice
+----------------------------------------------------------------------------+
*/
-int i_APCI3120_InsnWriteAnalogOutput(comedi_device * dev, comedi_subdevice
+int i_APCI3120_InsnWriteAnalogOutput(struct comedi_device * dev, comedi_subdevice
* s, comedi_insn * insn, unsigned int * data)
{
UINT ui_Range, ui_Channel;
diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.h b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.h
index 591061743c74..ee346f6d0ba1 100644
--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.h
+++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.h
@@ -178,64 +178,64 @@ typedef struct {
// Function Declaration For APCI-3120
// Internal functions
-int i_APCI3120_SetupChannelList(comedi_device *dev, comedi_subdevice *s,
+int i_APCI3120_SetupChannelList(struct comedi_device *dev, comedi_subdevice *s,
int n_chan, unsigned int *chanlist, char check);
-int i_APCI3120_ExttrigEnable(comedi_device *dev);
-int i_APCI3120_ExttrigDisable(comedi_device *dev);
-int i_APCI3120_StopCyclicAcquisition(comedi_device *dev, comedi_subdevice *s);
-int i_APCI3120_Reset(comedi_device *dev);
-int i_APCI3120_CyclicAnalogInput(int mode, comedi_device *dev,
+int i_APCI3120_ExttrigEnable(struct comedi_device *dev);
+int i_APCI3120_ExttrigDisable(struct comedi_device *dev);
+int i_APCI3120_StopCyclicAcquisition(struct comedi_device *dev, comedi_subdevice *s);
+int i_APCI3120_Reset(struct comedi_device *dev);
+int i_APCI3120_CyclicAnalogInput(int mode, struct comedi_device *dev,
comedi_subdevice *s);
// Interrupt functions
void v_APCI3120_Interrupt(int irq, void *d);
-//UPDATE-0.7.57->0.7.68 void v_APCI3120_InterruptDmaMoveBlock16bit(comedi_device *dev,comedi_subdevice *s,short *dma,short *data,int n);
-void v_APCI3120_InterruptDmaMoveBlock16bit(comedi_device *dev,
+//UPDATE-0.7.57->0.7.68 void v_APCI3120_InterruptDmaMoveBlock16bit(struct comedi_device *dev,comedi_subdevice *s,short *dma,short *data,int n);
+void v_APCI3120_InterruptDmaMoveBlock16bit(struct comedi_device *dev,
comedi_subdevice *s,
short *dma_buffer,
unsigned int num_samples);
-int i_APCI3120_InterruptHandleEos(comedi_device *dev);
+int i_APCI3120_InterruptHandleEos(struct comedi_device *dev);
void v_APCI3120_InterruptDma(int irq, void *d);
// TIMER
-int i_APCI3120_InsnConfigTimer(comedi_device *dev, comedi_subdevice *s,
+int i_APCI3120_InsnConfigTimer(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-int i_APCI3120_InsnWriteTimer(comedi_device *dev, comedi_subdevice *s,
+int i_APCI3120_InsnWriteTimer(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-int i_APCI3120_InsnReadTimer(comedi_device *dev, comedi_subdevice *s,
+int i_APCI3120_InsnReadTimer(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
//DI
// for di read
-int i_APCI3120_InsnBitsDigitalInput(comedi_device *dev, comedi_subdevice *s,
+int i_APCI3120_InsnBitsDigitalInput(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-int i_APCI3120_InsnReadDigitalInput(comedi_device *dev, comedi_subdevice *s,
+int i_APCI3120_InsnReadDigitalInput(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
//DO
-//int i_APCI3120_WriteDigitalOutput(comedi_device *dev, BYTE data);
-int i_APCI3120_InsnConfigDigitalOutput(comedi_device *dev,
+//int i_APCI3120_WriteDigitalOutput(struct comedi_device *dev, BYTE data);
+int i_APCI3120_InsnConfigDigitalOutput(struct comedi_device *dev,
comedi_subdevice *s, comedi_insn *insn,
unsigned int *data);
-int i_APCI3120_InsnBitsDigitalOutput(comedi_device *dev, comedi_subdevice *s,
+int i_APCI3120_InsnBitsDigitalOutput(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-int i_APCI3120_InsnWriteDigitalOutput(comedi_device *dev, comedi_subdevice *s,
+int i_APCI3120_InsnWriteDigitalOutput(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
//AO
-//int i_APCI3120_Write1AnalogValue(comedi_device *dev,UINT ui_Range,UINT ui_Channel,UINT data );
-int i_APCI3120_InsnWriteAnalogOutput(comedi_device *dev, comedi_subdevice *s,
+//int i_APCI3120_Write1AnalogValue(struct comedi_device *dev,UINT ui_Range,UINT ui_Channel,UINT data );
+int i_APCI3120_InsnWriteAnalogOutput(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
//AI HArdware layer
-int i_APCI3120_InsnConfigAnalogInput(comedi_device *dev, comedi_subdevice *s,
+int i_APCI3120_InsnConfigAnalogInput(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-int i_APCI3120_InsnReadAnalogInput(comedi_device *dev, comedi_subdevice *s,
+int i_APCI3120_InsnReadAnalogInput(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-int i_APCI3120_CommandTestAnalogInput(comedi_device *dev, comedi_subdevice *s,
+int i_APCI3120_CommandTestAnalogInput(struct comedi_device *dev, comedi_subdevice *s,
comedi_cmd *cmd);
-int i_APCI3120_CommandAnalogInput(comedi_device *dev, comedi_subdevice *s);
-//int i_APCI3120_CancelAnalogInput(comedi_device *dev, comedi_subdevice *s);
-int i_APCI3120_StopCyclicAcquisition(comedi_device *dev, comedi_subdevice *s);
+int i_APCI3120_CommandAnalogInput(struct comedi_device *dev, comedi_subdevice *s);
+//int i_APCI3120_CancelAnalogInput(struct comedi_device *dev, comedi_subdevice *s);
+int i_APCI3120_StopCyclicAcquisition(struct comedi_device *dev, comedi_subdevice *s);
diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c
index 83868d8f1c5f..f07e0b1cf8f8 100644
--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c
+++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c
@@ -453,7 +453,7 @@ VOID v_GetAPCI3200EepromCalibrationValue(DWORD dw_PCIBoardEepromAddress,
}
}
-INT i_APCI3200_GetChannelCalibrationValue(comedi_device * dev,
+INT i_APCI3200_GetChannelCalibrationValue(struct comedi_device * dev,
unsigned int ui_Channel_num, unsigned int * CJCCurrentSource,
unsigned int * ChannelCurrentSource, unsigned int * ChannelGainFactor)
{
@@ -530,12 +530,12 @@ INT i_APCI3200_GetChannelCalibrationValue(comedi_device * dev,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3200_ReadDigitalInput |
- | (comedi_device *dev,comedi_subdevice *s, |
+ | (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read value of the selected channel or port |
+----------------------------------------------------------------------------+
- | Input Parameters : comedi_device *dev : Driver handle |
+ | Input Parameters : struct comedi_device *dev : Driver handle |
| UINT ui_NoOfChannels : No Of Channels To read for Port
Channel Numberfor single channel
| UINT data[0] : 0: Read single channel
@@ -550,7 +550,7 @@ INT i_APCI3200_GetChannelCalibrationValue(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-INT i_APCI3200_ReadDigitalInput(comedi_device * dev, comedi_subdevice * s,
+INT i_APCI3200_ReadDigitalInput(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_Temp = 0;
@@ -592,12 +592,12 @@ INT i_APCI3200_ReadDigitalInput(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3200_ConfigDigitalOutput |
- | (comedi_device *dev,comedi_subdevice *s, |
+ | (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Configures The Digital Output Subdevice. |
+----------------------------------------------------------------------------+
- | Input Parameters : comedi_device *dev : Driver handle |
+ | Input Parameters : struct comedi_device *dev : Driver handle |
| data[0] :1 Memory enable
0 Memory Disable
+----------------------------------------------------------------------------+
@@ -608,7 +608,7 @@ INT i_APCI3200_ReadDigitalInput(comedi_device * dev, comedi_subdevice * s,
| |
+----------------------------------------------------------------------------+
*/
-int i_APCI3200_ConfigDigitalOutput(comedi_device * dev, comedi_subdevice * s,
+int i_APCI3200_ConfigDigitalOutput(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
@@ -629,12 +629,12 @@ int i_APCI3200_ConfigDigitalOutput(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3200_WriteDigitalOutput |
- | (comedi_device *dev,comedi_subdevice *s, |
+ | (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : writes To the digital Output Subdevice |
+----------------------------------------------------------------------------+
- | Input Parameters : comedi_device *dev : Driver handle |
+ | Input Parameters : struct comedi_device *dev : Driver handle |
| comedi_subdevice *s : Subdevice Pointer |
| comedi_insn *insn : Insn Structure Pointer |
| unsigned int *data : Data Pointer contains |
@@ -653,7 +653,7 @@ int i_APCI3200_ConfigDigitalOutput(comedi_device * dev, comedi_subdevice * s,
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI3200_WriteDigitalOutput(comedi_device * dev, comedi_subdevice * s,
+INT i_APCI3200_WriteDigitalOutput(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_Temp = 0, ui_Temp1 = 0;
@@ -746,12 +746,12 @@ INT i_APCI3200_WriteDigitalOutput(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3200_ReadDigitalOutput |
- | (comedi_device *dev,comedi_subdevice *s, |
+ | (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read value of the selected channel or port |
+----------------------------------------------------------------------------+
- | Input Parameters : comedi_device *dev : Driver handle |
+ | Input Parameters : struct comedi_device *dev : Driver handle |
| UINT ui_NoOfChannels : No Of Channels To read |
| UINT *data : Data Pointer to read status |
data[0] :0 read single channel
@@ -766,7 +766,7 @@ INT i_APCI3200_WriteDigitalOutput(comedi_device * dev, comedi_subdevice * s,
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI3200_ReadDigitalOutput(comedi_device * dev, comedi_subdevice * s,
+INT i_APCI3200_ReadDigitalOutput(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_Temp;
@@ -807,12 +807,12 @@ INT i_APCI3200_ReadDigitalOutput(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
| Function Name : INT i_APCI3200_ConfigAnalogInput |
- | (comedi_device *dev,comedi_subdevice *s, |
+ | (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Configures The Analog Input Subdevice |
+----------------------------------------------------------------------------+
- | Input Parameters : comedi_device *dev : Driver handle |
+ | Input Parameters : struct comedi_device *dev : Driver handle |
| comedi_subdevice *s : Subdevice Pointer |
| comedi_insn *insn : Insn Structure Pointer |
| unsigned int *data : Data Pointer contains |
@@ -874,7 +874,7 @@ INT i_APCI3200_ReadDigitalOutput(comedi_device * dev, comedi_subdevice * s,
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI3200_ConfigAnalogInput(comedi_device * dev, comedi_subdevice * s,
+INT i_APCI3200_ConfigAnalogInput(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
@@ -1334,12 +1334,12 @@ INT i_APCI3200_ConfigAnalogInput(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3200_ReadAnalogInput |
- | (comedi_device *dev,comedi_subdevice *s, |
+ | (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read value of the selected channel |
+----------------------------------------------------------------------------+
- | Input Parameters : comedi_device *dev : Driver handle |
+ | Input Parameters : struct comedi_device *dev : Driver handle |
| UINT ui_NoOfChannels : No Of Channels To read |
| UINT *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
@@ -1361,7 +1361,7 @@ INT i_APCI3200_ConfigAnalogInput(comedi_device * dev, comedi_subdevice * s,
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI3200_ReadAnalogInput(comedi_device * dev, comedi_subdevice * s,
+INT i_APCI3200_ReadAnalogInput(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_DummyValue = 0;
@@ -1633,12 +1633,12 @@ INT i_APCI3200_ReadAnalogInput(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3200_Read1AnalogInputChannel |
- | (comedi_device *dev,comedi_subdevice *s, |
+ | (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read value of the selected channel |
+----------------------------------------------------------------------------+
- | Input Parameters : comedi_device *dev : Driver handle |
+ | Input Parameters : struct comedi_device *dev : Driver handle |
| UINT ui_NoOfChannel : Channel No to read |
| UINT *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
@@ -1651,7 +1651,7 @@ INT i_APCI3200_ReadAnalogInput(comedi_device * dev, comedi_subdevice * s,
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI3200_Read1AnalogInputChannel(comedi_device * dev,
+INT i_APCI3200_Read1AnalogInputChannel(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
UINT ui_EOC = 0;
@@ -1759,12 +1759,12 @@ INT i_APCI3200_Read1AnalogInputChannel(comedi_device * dev,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3200_ReadCalibrationOffsetValue |
- | (comedi_device *dev,comedi_subdevice *s, |
+ | (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read calibration offset value of the selected channel|
+----------------------------------------------------------------------------+
- | Input Parameters : comedi_device *dev : Driver handle |
+ | Input Parameters : struct comedi_device *dev : Driver handle |
| UINT *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
| Output Parameters : -- |
@@ -1776,7 +1776,7 @@ INT i_APCI3200_Read1AnalogInputChannel(comedi_device * dev,
| |
+----------------------------------------------------------------------------+
*/
-int i_APCI3200_ReadCalibrationOffsetValue(comedi_device * dev, UINT * data)
+int i_APCI3200_ReadCalibrationOffsetValue(struct comedi_device * dev, UINT * data)
{
UINT ui_Temp = 0, ui_EOC = 0;
UINT ui_CommandRegister = 0;
@@ -1895,12 +1895,12 @@ int i_APCI3200_ReadCalibrationOffsetValue(comedi_device * dev, UINT * data)
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3200_ReadCalibrationGainValue |
- | (comedi_device *dev,comedi_subdevice *s, |
+ | (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read calibration gain value of the selected channel |
+----------------------------------------------------------------------------+
- | Input Parameters : comedi_device *dev : Driver handle |
+ | Input Parameters : struct comedi_device *dev : Driver handle |
| UINT *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
| Output Parameters : -- |
@@ -1912,7 +1912,7 @@ int i_APCI3200_ReadCalibrationOffsetValue(comedi_device * dev, UINT * data)
| |
+----------------------------------------------------------------------------+
*/
-int i_APCI3200_ReadCalibrationGainValue(comedi_device * dev, UINT * data)
+int i_APCI3200_ReadCalibrationGainValue(struct comedi_device * dev, UINT * data)
{
UINT ui_EOC = 0;
INT ui_CommandRegister = 0;
@@ -2030,12 +2030,12 @@ int i_APCI3200_ReadCalibrationGainValue(comedi_device * dev, UINT * data)
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3200_ReadCJCValue |
- | (comedi_device *dev,comedi_subdevice *s, |
+ | (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read CJC value of the selected channel |
+----------------------------------------------------------------------------+
- | Input Parameters : comedi_device *dev : Driver handle |
+ | Input Parameters : struct comedi_device *dev : Driver handle |
| UINT *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
| Output Parameters : -- |
@@ -2048,7 +2048,7 @@ int i_APCI3200_ReadCalibrationGainValue(comedi_device * dev, UINT * data)
+----------------------------------------------------------------------------+
*/
-int i_APCI3200_ReadCJCValue(comedi_device * dev, unsigned int * data)
+int i_APCI3200_ReadCJCValue(struct comedi_device * dev, unsigned int * data)
{
UINT ui_EOC = 0;
INT ui_CommandRegister = 0;
@@ -2150,12 +2150,12 @@ int i_APCI3200_ReadCJCValue(comedi_device * dev, unsigned int * data)
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3200_ReadCJCCalOffset |
- | (comedi_device *dev,comedi_subdevice *s, |
+ | (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read CJC calibration offset value of the selected channel
+----------------------------------------------------------------------------+
- | Input Parameters : comedi_device *dev : Driver handle |
+ | Input Parameters : struct comedi_device *dev : Driver handle |
| UINT *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
| Output Parameters : -- |
@@ -2167,7 +2167,7 @@ int i_APCI3200_ReadCJCValue(comedi_device * dev, unsigned int * data)
| |
+----------------------------------------------------------------------------+
*/
-int i_APCI3200_ReadCJCCalOffset(comedi_device * dev, unsigned int * data)
+int i_APCI3200_ReadCJCCalOffset(struct comedi_device * dev, unsigned int * data)
{
UINT ui_EOC = 0;
INT ui_CommandRegister = 0;
@@ -2265,12 +2265,12 @@ int i_APCI3200_ReadCJCCalOffset(comedi_device * dev, unsigned int * data)
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3200_ReadCJCGainValue |
- | (comedi_device *dev,comedi_subdevice *s, |
+ | (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read CJC calibration gain value
+----------------------------------------------------------------------------+
- | Input Parameters : comedi_device *dev : Driver handle |
+ | Input Parameters : struct comedi_device *dev : Driver handle |
| UINT ui_NoOfChannels : No Of Channels To read |
| UINT *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
@@ -2283,7 +2283,7 @@ int i_APCI3200_ReadCJCCalOffset(comedi_device * dev, unsigned int * data)
| |
+----------------------------------------------------------------------------+
*/
-int i_APCI3200_ReadCJCCalGain(comedi_device * dev, unsigned int * data)
+int i_APCI3200_ReadCJCCalGain(struct comedi_device * dev, unsigned int * data)
{
UINT ui_EOC = 0;
INT ui_CommandRegister = 0;
@@ -2375,12 +2375,12 @@ int i_APCI3200_ReadCJCCalGain(comedi_device * dev, unsigned int * data)
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3200_InsnBits_AnalogInput_Test |
- | (comedi_device *dev,comedi_subdevice *s, |
+ | (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Tests the Selected Anlog Input Channel |
+----------------------------------------------------------------------------+
- | Input Parameters : comedi_device *dev : Driver handle |
+ | Input Parameters : struct comedi_device *dev : Driver handle |
| comedi_subdevice *s : Subdevice Pointer |
| comedi_insn *insn : Insn Structure Pointer |
| unsigned int *data : Data Pointer contains |
@@ -2404,7 +2404,7 @@ int i_APCI3200_ReadCJCCalGain(comedi_device * dev, unsigned int * data)
+----------------------------------------------------------------------------+
*/
-INT i_APCI3200_InsnBits_AnalogInput_Test(comedi_device * dev,
+INT i_APCI3200_InsnBits_AnalogInput_Test(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
UINT ui_Configuration = 0;
@@ -2510,12 +2510,12 @@ INT i_APCI3200_InsnBits_AnalogInput_Test(comedi_device * dev,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3200_InsnWriteReleaseAnalogInput |
- | (comedi_device *dev,comedi_subdevice *s, |
+ | (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Resets the channels |
+----------------------------------------------------------------------------+
- | Input Parameters : comedi_device *dev : Driver handle |
+ | Input Parameters : struct comedi_device *dev : Driver handle |
| comedi_subdevice *s : Subdevice Pointer |
| comedi_insn *insn : Insn Structure Pointer |
| unsigned int *data : Data Pointer
@@ -2529,7 +2529,7 @@ INT i_APCI3200_InsnBits_AnalogInput_Test(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-INT i_APCI3200_InsnWriteReleaseAnalogInput(comedi_device * dev,
+INT i_APCI3200_InsnWriteReleaseAnalogInput(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
i_APCI3200_Reset(dev);
@@ -2538,7 +2538,7 @@ INT i_APCI3200_InsnWriteReleaseAnalogInput(comedi_device * dev,
/*
+----------------------------------------------------------------------------+
- | Function name :int i_APCI3200_CommandTestAnalogInput(comedi_device *dev|
+ | Function name :int i_APCI3200_CommandTestAnalogInput(struct comedi_device *dev|
| ,comedi_subdevice *s,comedi_cmd *cmd) |
| |
+----------------------------------------------------------------------------+
@@ -2546,7 +2546,7 @@ INT i_APCI3200_InsnWriteReleaseAnalogInput(comedi_device * dev,
| acquisition |
| |
+----------------------------------------------------------------------------+
- | Input Parameters : comedi_device *dev |
+ | Input Parameters : struct comedi_device *dev |
| comedi_subdevice *s |
| comedi_cmd *cmd |
| |
@@ -2560,7 +2560,7 @@ INT i_APCI3200_InsnWriteReleaseAnalogInput(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-int i_APCI3200_CommandTestAnalogInput(comedi_device * dev, comedi_subdevice * s,
+int i_APCI3200_CommandTestAnalogInput(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd)
{
@@ -2748,14 +2748,14 @@ int i_APCI3200_CommandTestAnalogInput(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
- | Function name :int i_APCI3200_StopCyclicAcquisition(comedi_device *dev,|
+ | Function name :int i_APCI3200_StopCyclicAcquisition(struct comedi_device *dev,|
| comedi_subdevice *s)|
| |
+----------------------------------------------------------------------------+
| Task : Stop the acquisition |
| |
+----------------------------------------------------------------------------+
- | Input Parameters : comedi_device *dev |
+ | Input Parameters : struct comedi_device *dev |
| comedi_subdevice *s |
| |
+----------------------------------------------------------------------------+
@@ -2764,7 +2764,7 @@ int i_APCI3200_CommandTestAnalogInput(comedi_device * dev, comedi_subdevice * s,
+----------------------------------------------------------------------------+
*/
-int i_APCI3200_StopCyclicAcquisition(comedi_device * dev, comedi_subdevice * s)
+int i_APCI3200_StopCyclicAcquisition(struct comedi_device * dev, comedi_subdevice * s)
{
UINT ui_Configuration = 0;
//i_InterruptFlag=0;
@@ -2796,7 +2796,7 @@ int i_APCI3200_StopCyclicAcquisition(comedi_device * dev, comedi_subdevice * s)
/*
+----------------------------------------------------------------------------+
- | Function name : int i_APCI3200_CommandAnalogInput(comedi_device *dev, |
+ | Function name : int i_APCI3200_CommandAnalogInput(struct comedi_device *dev, |
| comedi_subdevice *s) |
| |
+----------------------------------------------------------------------------+
@@ -2804,7 +2804,7 @@ int i_APCI3200_StopCyclicAcquisition(comedi_device * dev, comedi_subdevice * s)
| Determines the mode 1 or 2. |
| |
+----------------------------------------------------------------------------+
- | Input Parameters : comedi_device *dev |
+ | Input Parameters : struct comedi_device *dev |
| comedi_subdevice *s |
| |
| |
@@ -2814,7 +2814,7 @@ int i_APCI3200_StopCyclicAcquisition(comedi_device * dev, comedi_subdevice * s)
+----------------------------------------------------------------------------+
*/
-int i_APCI3200_CommandAnalogInput(comedi_device * dev, comedi_subdevice * s)
+int i_APCI3200_CommandAnalogInput(struct comedi_device * dev, comedi_subdevice * s)
{
comedi_cmd *cmd = &s->async->cmd;
UINT ui_Configuration = 0;
@@ -2987,7 +2987,7 @@ int i_APCI3200_CommandAnalogInput(comedi_device * dev, comedi_subdevice * s)
/*
+----------------------------------------------------------------------------+
- | Function Name : int i_APCI3200_Reset(comedi_device *dev) |
+ | Function Name : int i_APCI3200_Reset(struct comedi_device *dev) |
| |
+----------------------------------------------------------------------------+
| Task :Resets the registers of the card |
@@ -3001,7 +3001,7 @@ int i_APCI3200_CommandAnalogInput(comedi_device * dev, comedi_subdevice * s)
+----------------------------------------------------------------------------+
*/
-int i_APCI3200_Reset(comedi_device * dev)
+int i_APCI3200_Reset(struct comedi_device * dev)
{
INT i_Temp;
DWORD dw_Dummy;
@@ -3059,7 +3059,7 @@ int i_APCI3200_Reset(comedi_device * dev)
*/
void v_APCI3200_Interrupt(int irq, void *d)
{
- comedi_device *dev = d;
+ struct comedi_device *dev = d;
UINT ui_StatusRegister = 0;
UINT ui_ChannelNumber = 0;
INT i_CalibrationFlag = 0;
@@ -3482,7 +3482,7 @@ void v_APCI3200_Interrupt(int irq, void *d)
/*
+----------------------------------------------------------------------------+
- | Function name :int i_APCI3200_InterruptHandleEos(comedi_device *dev) |
+ | Function name :int i_APCI3200_InterruptHandleEos(struct comedi_device *dev) |
| |
| |
+----------------------------------------------------------------------------+
@@ -3491,7 +3491,7 @@ void v_APCI3200_Interrupt(int irq, void *d)
| to Comedi buffer. |
| |
+----------------------------------------------------------------------------+
- | Input Parameters : comedi_device *dev |
+ | Input Parameters : struct comedi_device *dev |
| |
| |
+----------------------------------------------------------------------------+
@@ -3499,7 +3499,7 @@ void v_APCI3200_Interrupt(int irq, void *d)
| |
+----------------------------------------------------------------------------+
*/
-int i_APCI3200_InterruptHandleEos(comedi_device * dev)
+int i_APCI3200_InterruptHandleEos(struct comedi_device * dev)
{
UINT ui_StatusRegister = 0;
comedi_subdevice *s = dev->subdevices + 0;
diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.h b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.h
index 09445d5f673e..fbb658eff531 100644
--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.h
+++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.h
@@ -154,34 +154,34 @@ typedef struct {
//AI
-INT i_APCI3200_ConfigAnalogInput(comedi_device *dev, comedi_subdevice *s,
+INT i_APCI3200_ConfigAnalogInput(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI3200_ReadAnalogInput(comedi_device *dev, comedi_subdevice *s,
+INT i_APCI3200_ReadAnalogInput(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI3200_InsnWriteReleaseAnalogInput(comedi_device *dev,
+INT i_APCI3200_InsnWriteReleaseAnalogInput(struct comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI3200_InsnBits_AnalogInput_Test(comedi_device *dev,
+INT i_APCI3200_InsnBits_AnalogInput_Test(struct comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI3200_StopCyclicAcquisition(comedi_device *dev, comedi_subdevice *s);
-INT i_APCI3200_InterruptHandleEos(comedi_device *dev);
-INT i_APCI3200_CommandTestAnalogInput(comedi_device *dev, comedi_subdevice *s,
+INT i_APCI3200_StopCyclicAcquisition(struct comedi_device *dev, comedi_subdevice *s);
+INT i_APCI3200_InterruptHandleEos(struct comedi_device *dev);
+INT i_APCI3200_CommandTestAnalogInput(struct comedi_device *dev, comedi_subdevice *s,
comedi_cmd *cmd);
-INT i_APCI3200_CommandAnalogInput(comedi_device *dev, comedi_subdevice *s);
-INT i_APCI3200_ReadDigitalInput(comedi_device *dev, comedi_subdevice *s,
+INT i_APCI3200_CommandAnalogInput(struct comedi_device *dev, comedi_subdevice *s);
+INT i_APCI3200_ReadDigitalInput(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
//Interrupt
void v_APCI3200_Interrupt(int irq, void *d);
-int i_APCI3200_InterruptHandleEos(comedi_device *dev);
+int i_APCI3200_InterruptHandleEos(struct comedi_device *dev);
//Reset functions
-INT i_APCI3200_Reset(comedi_device *dev);
+INT i_APCI3200_Reset(struct comedi_device *dev);
-int i_APCI3200_ReadCJCCalOffset(comedi_device *dev, unsigned int *data);
-int i_APCI3200_ReadCJCValue(comedi_device *dev, unsigned int *data);
-int i_APCI3200_ReadCalibrationGainValue(comedi_device *dev, UINT *data);
-int i_APCI3200_ReadCalibrationOffsetValue(comedi_device *dev, UINT *data);
-int i_APCI3200_Read1AnalogInputChannel(comedi_device *dev,
+int i_APCI3200_ReadCJCCalOffset(struct comedi_device *dev, unsigned int *data);
+int i_APCI3200_ReadCJCValue(struct comedi_device *dev, unsigned int *data);
+int i_APCI3200_ReadCalibrationGainValue(struct comedi_device *dev, UINT *data);
+int i_APCI3200_ReadCalibrationOffsetValue(struct comedi_device *dev, UINT *data);
+int i_APCI3200_Read1AnalogInputChannel(struct comedi_device *dev,
comedi_subdevice *s, comedi_insn *insn,
unsigned int *data);
-int i_APCI3200_ReadCJCCalGain(comedi_device *dev, unsigned int *data);
+int i_APCI3200_ReadCJCCalGain(struct comedi_device *dev, unsigned int *data);
diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3501.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3501.c
index 8f5bc0132a62..352e630a603a 100644
--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3501.c
+++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3501.c
@@ -56,12 +56,12 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3501_ReadDigitalInput |
-| (comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read value of the selected channel or port |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| UINT ui_NoOfChannels : No Of Channels To read |
| UINT *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
@@ -73,7 +73,7 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
+----------------------------------------------------------------------------+
*/
-INT i_APCI3501_ReadDigitalInput(comedi_device * dev, comedi_subdevice * s,
+INT i_APCI3501_ReadDigitalInput(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_Temp;
@@ -99,12 +99,12 @@ INT i_APCI3501_ReadDigitalInput(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3501_ConfigDigitalOutput |
-| (comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Configures The Digital Output Subdevice. |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| UINT *data : Data Pointer contains |
| configuration parameters as below |
| |
@@ -121,7 +121,7 @@ INT i_APCI3501_ReadDigitalInput(comedi_device * dev, comedi_subdevice * s,
| |
+----------------------------------------------------------------------------+
*/
-int i_APCI3501_ConfigDigitalOutput(comedi_device * dev, comedi_subdevice * s,
+int i_APCI3501_ConfigDigitalOutput(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
@@ -142,12 +142,12 @@ int i_APCI3501_ConfigDigitalOutput(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3501_WriteDigitalOutput |
-| (comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : writes To the digital Output Subdevice |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| comedi_subdevice *s : Subdevice Pointer |
| comedi_insn *insn : Insn Structure Pointer |
| unsigned int *data : Data Pointer contains |
@@ -161,7 +161,7 @@ int i_APCI3501_ConfigDigitalOutput(comedi_device * dev, comedi_subdevice * s,
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI3501_WriteDigitalOutput(comedi_device * dev, comedi_subdevice * s,
+INT i_APCI3501_WriteDigitalOutput(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_Temp, ui_Temp1;
@@ -232,12 +232,12 @@ INT i_APCI3501_WriteDigitalOutput(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3501_ReadDigitalOutput |
-| (comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read value of the selected channel or port |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| UINT ui_NoOfChannels : No Of Channels To read |
| UINT *data : Data Pointer to read status |
+----------------------------------------------------------------------------+
@@ -248,7 +248,7 @@ INT i_APCI3501_WriteDigitalOutput(comedi_device * dev, comedi_subdevice * s,
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI3501_ReadDigitalOutput(comedi_device * dev, comedi_subdevice * s,
+INT i_APCI3501_ReadDigitalOutput(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
UINT ui_Temp;
@@ -275,12 +275,12 @@ INT i_APCI3501_ReadDigitalOutput(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3501_ConfigAnalogOutput |
-| (comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Configures The Analog Output Subdevice |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| comedi_subdevice *s : Subdevice Pointer |
| comedi_insn *insn : Insn Structure Pointer |
| unsigned int *data : Data Pointer contains |
@@ -298,7 +298,7 @@ INT i_APCI3501_ReadDigitalOutput(comedi_device * dev, comedi_subdevice * s,
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI3501_ConfigAnalogOutput(comedi_device * dev, comedi_subdevice * s,
+INT i_APCI3501_ConfigAnalogOutput(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
outl(data[0],
@@ -316,12 +316,12 @@ INT i_APCI3501_ConfigAnalogOutput(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3501_WriteAnalogOutput |
-| (comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Writes To the Selected Anlog Output Channel |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| comedi_subdevice *s : Subdevice Pointer |
| comedi_insn *insn : Insn Structure Pointer |
| unsigned int *data : Data Pointer contains |
@@ -336,7 +336,7 @@ INT i_APCI3501_ConfigAnalogOutput(comedi_device * dev, comedi_subdevice * s,
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI3501_WriteAnalogOutput(comedi_device * dev, comedi_subdevice * s,
+INT i_APCI3501_WriteAnalogOutput(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
ULONG ul_Command1 = 0, ul_Channel_no, ul_Polarity, ul_DAC_Ready = 0;;
@@ -386,12 +386,12 @@ INT i_APCI3501_WriteAnalogOutput(comedi_device * dev, comedi_subdevice * s,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3501_ConfigTimerCounterWatchdog |
-| (comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Configures The Timer , Counter or Watchdog |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| UINT *data : Data Pointer contains |
| configuration parameters as below |
| |
@@ -410,7 +410,7 @@ INT i_APCI3501_WriteAnalogOutput(comedi_device * dev, comedi_subdevice * s,
| |
+----------------------------------------------------------------------------+
*/
-INT i_APCI3501_ConfigTimerCounterWatchdog(comedi_device * dev,
+INT i_APCI3501_ConfigTimerCounterWatchdog(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
ULONG ul_Command1 = 0;
@@ -489,12 +489,12 @@ INT i_APCI3501_ConfigTimerCounterWatchdog(comedi_device * dev,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3501_StartStopWriteTimerCounterWatchdog |
-| (comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Start / Stop The Selected Timer , Counter or Watchdog |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| UINT *data : Data Pointer contains |
| configuration parameters as below |
| |
@@ -511,7 +511,7 @@ INT i_APCI3501_ConfigTimerCounterWatchdog(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-int i_APCI3501_StartStopWriteTimerCounterWatchdog(comedi_device * dev,
+int i_APCI3501_StartStopWriteTimerCounterWatchdog(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
ULONG ul_Command1 = 0;
@@ -592,12 +592,12 @@ int i_APCI3501_StartStopWriteTimerCounterWatchdog(comedi_device * dev,
/*
+----------------------------------------------------------------------------+
| Function Name : int i_APCI3501_ReadTimerCounterWatchdog |
-| (comedi_device *dev,comedi_subdevice *s, |
+| (struct comedi_device *dev,comedi_subdevice *s, |
| comedi_insn *insn,unsigned int *data) |
+----------------------------------------------------------------------------+
| Task : Read The Selected Timer , Counter or Watchdog |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev : Driver handle |
+| Input Parameters : struct comedi_device *dev : Driver handle |
| UINT *data : Data Pointer contains |
| configuration parameters as below |
| |
@@ -613,7 +613,7 @@ int i_APCI3501_StartStopWriteTimerCounterWatchdog(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-int i_APCI3501_ReadTimerCounterWatchdog(comedi_device * dev,
+int i_APCI3501_ReadTimerCounterWatchdog(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
@@ -640,7 +640,7 @@ int i_APCI3501_ReadTimerCounterWatchdog(comedi_device * dev,
/*
+----------------------------------------------------------------------------+
-| Function Name : int i_APCI3501_Reset(comedi_device *dev) |
+| Function Name : int i_APCI3501_Reset(struct comedi_device *dev) |
| |
+----------------------------------------------------------------------------+
| Task :Resets the registers of the card |
@@ -654,7 +654,7 @@ int i_APCI3501_ReadTimerCounterWatchdog(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-int i_APCI3501_Reset(comedi_device * dev)
+int i_APCI3501_Reset(struct comedi_device * dev)
{
int i_Count = 0, i_temp = 0;
ULONG ul_Command1 = 0, ul_Polarity, ul_DAC_Ready = 0;
@@ -708,7 +708,7 @@ int i_APCI3501_Reset(comedi_device * dev)
void v_APCI3501_Interrupt(int irq, void *d)
{
int i_temp;
- comedi_device *dev = d;
+ struct comedi_device *dev = d;
unsigned int ui_Timer_AOWatchdog;
unsigned long ul_Command1;
// Disable Interrupt
diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3501.h b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3501.h
index aeb7f032884f..a7dd01e5e57a 100644
--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3501.h
+++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3501.h
@@ -55,40 +55,40 @@ comedi_lrange range_apci3501_ao = { 2, {
// Hardware Layer functions for Apci3501
//AO
-INT i_APCI3501_ConfigAnalogOutput(comedi_device *dev, comedi_subdevice *s,
+INT i_APCI3501_ConfigAnalogOutput(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI3501_WriteAnalogOutput(comedi_device *dev, comedi_subdevice *s,
+INT i_APCI3501_WriteAnalogOutput(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
//DI
// for di read
-//INT i_APCI3501_ReadDigitalInput(comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,unsigned int *data);
+//INT i_APCI3501_ReadDigitalInput(struct comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,unsigned int *data);
-INT i_APCI3501_ReadDigitalInput(comedi_device *dev, comedi_subdevice *s,
+INT i_APCI3501_ReadDigitalInput(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
//DO
-int i_APCI3501_ConfigDigitalOutput(comedi_device *dev, comedi_subdevice *s,
+int i_APCI3501_ConfigDigitalOutput(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI3501_WriteDigitalOutput(comedi_device *dev, comedi_subdevice *s,
+INT i_APCI3501_WriteDigitalOutput(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-INT i_APCI3501_ReadDigitalOutput(comedi_device *dev, comedi_subdevice *s,
+INT i_APCI3501_ReadDigitalOutput(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
// TIMER
// timer value is passed as u seconds
-INT i_APCI3501_ConfigTimerCounterWatchdog(comedi_device *dev,
+INT i_APCI3501_ConfigTimerCounterWatchdog(struct comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-int i_APCI3501_StartStopWriteTimerCounterWatchdog(comedi_device *dev,
+int i_APCI3501_StartStopWriteTimerCounterWatchdog(struct comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn,
unsigned int *data);
-int i_APCI3501_ReadTimerCounterWatchdog(comedi_device *dev,
+int i_APCI3501_ReadTimerCounterWatchdog(struct comedi_device *dev,
comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
//Interrupt
void v_APCI3501_Interrupt(int irq, void *d);
//Reset functions
-int i_APCI3501_Reset(comedi_device *dev);
+int i_APCI3501_Reset(struct comedi_device *dev);
diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3xxx.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3xxx.c
index 7a78c99405b2..44ca298f75ba 100644
--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3xxx.c
+++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3xxx.c
@@ -55,7 +55,7 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
/*
+----------------------------------------------------------------------------+
| Function Name : INT i_APCI3XXX_TestConversionStarted |
-| (comedi_device *dev) |
+| (struct comedi_device *dev) |
+----------------------------------------------------------------------------+
| Task Test if any conversion started |
+----------------------------------------------------------------------------+
@@ -68,7 +68,7 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
+----------------------------------------------------------------------------+
*/
-int i_APCI3XXX_TestConversionStarted(comedi_device * dev)
+int i_APCI3XXX_TestConversionStarted(struct comedi_device * dev)
{
if ((readl((void *)(devpriv->dw_AiBase + 8)) & 0x80000UL) == 0x80000UL) {
return (1);
@@ -80,7 +80,7 @@ int i_APCI3XXX_TestConversionStarted(comedi_device * dev)
/*
+----------------------------------------------------------------------------+
| Function Name : INT i_APCI3XXX_AnalogInputConfigOperatingMode |
-| (comedi_device *dev, |
+| (struct comedi_device *dev, |
| comedi_subdevice *s, |
| comedi_insn *insn, |
| unsigned int *data) |
@@ -105,7 +105,7 @@ int i_APCI3XXX_TestConversionStarted(comedi_device * dev)
+----------------------------------------------------------------------------+
*/
-int i_APCI3XXX_AnalogInputConfigOperatingMode(comedi_device * dev,
+int i_APCI3XXX_AnalogInputConfigOperatingMode(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = insn->n;
@@ -274,7 +274,7 @@ int i_APCI3XXX_AnalogInputConfigOperatingMode(comedi_device * dev,
/*
+----------------------------------------------------------------------------+
| Function Name : INT i_APCI3XXX_InsnConfigAnalogInput |
-| (comedi_device *dev, |
+| (struct comedi_device *dev, |
| comedi_subdevice *s, |
| comedi_insn *insn, |
| unsigned int *data) |
@@ -295,7 +295,7 @@ int i_APCI3XXX_AnalogInputConfigOperatingMode(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-int i_APCI3XXX_InsnConfigAnalogInput(comedi_device * dev,
+int i_APCI3XXX_InsnConfigAnalogInput(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = insn->n;
@@ -332,7 +332,7 @@ int i_APCI3XXX_InsnConfigAnalogInput(comedi_device * dev,
/*
+----------------------------------------------------------------------------+
| Function Name : INT i_APCI3XXX_InsnReadAnalogInput |
-| (comedi_device *dev, |
+| (struct comedi_device *dev, |
| comedi_subdevice *s, |
| comedi_insn *insn, |
| unsigned int *data) |
@@ -355,7 +355,7 @@ int i_APCI3XXX_InsnConfigAnalogInput(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-int i_APCI3XXX_InsnReadAnalogInput(comedi_device * dev,
+int i_APCI3XXX_InsnReadAnalogInput(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = insn->n;
@@ -606,7 +606,7 @@ int i_APCI3XXX_InsnReadAnalogInput(comedi_device * dev,
void v_APCI3XXX_Interrupt(int irq, void *d)
{
- comedi_device *dev = d;
+ struct comedi_device *dev = d;
BYTE b_CopyCpt = 0;
DWORD dw_Status = 0;
@@ -663,7 +663,7 @@ void v_APCI3XXX_Interrupt(int irq, void *d)
/*
+----------------------------------------------------------------------------+
| Function Name : INT i_APCI3XXX_InsnWriteAnalogOutput |
-| (comedi_device *dev, |
+| (struct comedi_device *dev, |
| comedi_subdevice *s, |
| comedi_insn *insn, |
| unsigned int *data) |
@@ -684,7 +684,7 @@ void v_APCI3XXX_Interrupt(int irq, void *d)
+----------------------------------------------------------------------------+
*/
-int i_APCI3XXX_InsnWriteAnalogOutput(comedi_device * dev,
+int i_APCI3XXX_InsnWriteAnalogOutput(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
BYTE b_Range = (BYTE) CR_RANGE(insn->chanspec);
@@ -769,7 +769,7 @@ int i_APCI3XXX_InsnWriteAnalogOutput(comedi_device * dev,
/*
+----------------------------------------------------------------------------+
| Function Name : INT i_APCI3XXX_InsnConfigInitTTLIO |
-| (comedi_device *dev, |
+| (struct comedi_device *dev, |
| comedi_subdevice *s, |
| comedi_insn *insn, |
| unsigned int *data) |
@@ -791,7 +791,7 @@ int i_APCI3XXX_InsnWriteAnalogOutput(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-int i_APCI3XXX_InsnConfigInitTTLIO(comedi_device * dev,
+int i_APCI3XXX_InsnConfigInitTTLIO(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = insn->n;
@@ -900,7 +900,7 @@ int i_APCI3XXX_InsnConfigInitTTLIO(comedi_device * dev,
/*
+----------------------------------------------------------------------------+
| Function Name : INT i_APCI3XXX_InsnBitsTTLIO |
-| (comedi_device *dev, |
+| (struct comedi_device *dev, |
| comedi_subdevice *s, |
| comedi_insn *insn, |
| unsigned int *data) |
@@ -919,7 +919,7 @@ int i_APCI3XXX_InsnConfigInitTTLIO(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-int i_APCI3XXX_InsnBitsTTLIO(comedi_device * dev,
+int i_APCI3XXX_InsnBitsTTLIO(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = insn->n;
@@ -1057,7 +1057,7 @@ int i_APCI3XXX_InsnBitsTTLIO(comedi_device * dev,
/*
+----------------------------------------------------------------------------+
| Function Name : INT i_APCI3XXX_InsnReadTTLIO |
-| (comedi_device *dev, |
+| (struct comedi_device *dev, |
| comedi_subdevice *s, |
| comedi_insn *insn, |
| unsigned int *data) |
@@ -1074,7 +1074,7 @@ int i_APCI3XXX_InsnBitsTTLIO(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-int i_APCI3XXX_InsnReadTTLIO(comedi_device * dev,
+int i_APCI3XXX_InsnReadTTLIO(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
BYTE b_Channel = (BYTE) CR_CHAN(insn->chanspec);
@@ -1169,7 +1169,7 @@ int i_APCI3XXX_InsnReadTTLIO(comedi_device * dev,
/*
+----------------------------------------------------------------------------+
| Function Name : INT i_APCI3XXX_InsnWriteTTLIO |
-| (comedi_device *dev, |
+| (struct comedi_device *dev, |
| comedi_subdevice *s, |
| comedi_insn *insn, |
| unsigned int *data) |
@@ -1187,7 +1187,7 @@ int i_APCI3XXX_InsnReadTTLIO(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-int i_APCI3XXX_InsnWriteTTLIO(comedi_device * dev,
+int i_APCI3XXX_InsnWriteTTLIO(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = insn->n;
@@ -1281,7 +1281,7 @@ int i_APCI3XXX_InsnWriteTTLIO(comedi_device * dev,
/*
+----------------------------------------------------------------------------+
| Function name :int i_APCI3XXX_InsnReadDigitalInput |
-| (comedi_device *dev, |
+| (struct comedi_device *dev, |
| comedi_subdevice *s, |
| comedi_insn *insn, |
| unsigned int *data) |
@@ -1298,7 +1298,7 @@ int i_APCI3XXX_InsnWriteTTLIO(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-int i_APCI3XXX_InsnReadDigitalInput(comedi_device * dev,
+int i_APCI3XXX_InsnReadDigitalInput(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = insn->n;
@@ -1340,7 +1340,7 @@ int i_APCI3XXX_InsnReadDigitalInput(comedi_device * dev,
/*
+----------------------------------------------------------------------------+
| Function name :int i_APCI3XXX_InsnBitsDigitalInput |
-| (comedi_device *dev, |
+| (struct comedi_device *dev, |
| comedi_subdevice *s, |
| comedi_insn *insn, |
| unsigned int *data) |
@@ -1356,7 +1356,7 @@ int i_APCI3XXX_InsnReadDigitalInput(comedi_device * dev,
| -101 : Data size error |
+----------------------------------------------------------------------------+
*/
-int i_APCI3XXX_InsnBitsDigitalInput(comedi_device * dev,
+int i_APCI3XXX_InsnBitsDigitalInput(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = insn->n;
@@ -1391,7 +1391,7 @@ int i_APCI3XXX_InsnBitsDigitalInput(comedi_device * dev,
/*
+----------------------------------------------------------------------------+
| Function name :int i_APCI3XXX_InsnBitsDigitalOutput |
-| (comedi_device *dev, |
+| (struct comedi_device *dev, |
| comedi_subdevice *s, |
| comedi_insn *insn, |
| unsigned int *data) |
@@ -1409,7 +1409,7 @@ int i_APCI3XXX_InsnBitsDigitalInput(comedi_device * dev,
| -101 : Data size error |
+----------------------------------------------------------------------------+
*/
-int i_APCI3XXX_InsnBitsDigitalOutput(comedi_device * dev,
+int i_APCI3XXX_InsnBitsDigitalOutput(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = insn->n;
@@ -1487,7 +1487,7 @@ int i_APCI3XXX_InsnBitsDigitalOutput(comedi_device * dev,
/*
+----------------------------------------------------------------------------+
| Function name :int i_APCI3XXX_InsnWriteDigitalOutput |
-| (comedi_device *dev, |
+| (struct comedi_device *dev, |
| comedi_subdevice *s, |
| comedi_insn *insn, |
| unsigned int *data) |
@@ -1505,7 +1505,7 @@ int i_APCI3XXX_InsnBitsDigitalOutput(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-int i_APCI3XXX_InsnWriteDigitalOutput(comedi_device * dev,
+int i_APCI3XXX_InsnWriteDigitalOutput(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = insn->n;
@@ -1563,7 +1563,7 @@ int i_APCI3XXX_InsnWriteDigitalOutput(comedi_device * dev,
/*
+----------------------------------------------------------------------------+
| Function name :int i_APCI3XXX_InsnReadDigitalOutput |
-| (comedi_device *dev, |
+| (struct comedi_device *dev, |
| comedi_subdevice *s, |
| comedi_insn *insn, |
| unsigned int *data) |
@@ -1580,7 +1580,7 @@ int i_APCI3XXX_InsnWriteDigitalOutput(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-int i_APCI3XXX_InsnReadDigitalOutput(comedi_device * dev,
+int i_APCI3XXX_InsnReadDigitalOutput(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
INT i_ReturnValue = insn->n;
@@ -1627,10 +1627,10 @@ int i_APCI3XXX_InsnReadDigitalOutput(comedi_device * dev,
/*
+----------------------------------------------------------------------------+
-| Function Name : int i_APCI3XXX_Reset(comedi_device *dev) | +----------------------------------------------------------------------------+
+| Function Name : int i_APCI3XXX_Reset(struct comedi_device *dev) | +----------------------------------------------------------------------------+
| Task :resets all the registers |
+----------------------------------------------------------------------------+
-| Input Parameters : comedi_device *dev |
+| Input Parameters : struct comedi_device *dev |
+----------------------------------------------------------------------------+
| Output Parameters : - |
+----------------------------------------------------------------------------+
@@ -1638,7 +1638,7 @@ int i_APCI3XXX_InsnReadDigitalOutput(comedi_device * dev,
+----------------------------------------------------------------------------+
*/
-int i_APCI3XXX_Reset(comedi_device * dev)
+int i_APCI3XXX_Reset(struct comedi_device * dev)
{
unsigned char b_Cpt = 0;
diff --git a/drivers/staging/comedi/drivers/adl_pci6208.c b/drivers/staging/comedi/drivers/adl_pci6208.c
index 65fe959fc53b..20aa52943fad 100644
--- a/drivers/staging/comedi/drivers/adl_pci6208.c
+++ b/drivers/staging/comedi/drivers/adl_pci6208.c
@@ -106,8 +106,8 @@ typedef struct {
#define devpriv ((pci6208_private *)dev->private)
-static int pci6208_attach(comedi_device * dev, comedi_devconfig * it);
-static int pci6208_detach(comedi_device * dev);
+static int pci6208_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int pci6208_detach(struct comedi_device * dev);
#define pci6208_board_nbr \
(sizeof(pci6208_boards) / sizeof(pci6208_board))
@@ -121,19 +121,19 @@ static comedi_driver driver_pci6208 = {
COMEDI_PCI_INITCLEANUP(driver_pci6208, pci6208_pci_table);
-static int pci6208_find_device(comedi_device * dev, int bus, int slot);
+static int pci6208_find_device(struct comedi_device * dev, int bus, int slot);
static int
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,
+static int pci6208_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int pci6208_ao_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int pci6208_ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-//static int pci6208_dio_insn_bits(comedi_device *dev,comedi_subdevice *s,
+//static int pci6208_dio_insn_bits(struct comedi_device *dev,comedi_subdevice *s,
// comedi_insn *insn,unsigned int *data);
-//static int pci6208_dio_insn_config(comedi_device *dev,comedi_subdevice *s,
+//static int pci6208_dio_insn_config(struct comedi_device *dev,comedi_subdevice *s,
// comedi_insn *insn,unsigned int *data);
/*
@@ -142,7 +142,7 @@ static int pci6208_ao_rinsn(comedi_device * dev, comedi_subdevice * s,
* in the driver structure, dev->board_ptr contains that
* address.
*/
-static int pci6208_attach(comedi_device * dev, comedi_devconfig * it)
+static int pci6208_attach(struct comedi_device * dev, comedi_devconfig * it)
{
comedi_subdevice *s;
int retval;
@@ -205,7 +205,7 @@ static int pci6208_attach(comedi_device * dev, comedi_devconfig * it)
* allocated by _attach(). dev->private and dev->subdevices are
* deallocated automatically by the core.
*/
-static int pci6208_detach(comedi_device * dev)
+static int pci6208_detach(struct comedi_device * dev)
{
printk("comedi%d: pci6208: remove\n", dev->minor);
@@ -219,7 +219,7 @@ static int pci6208_detach(comedi_device * dev)
return 0;
}
-static int pci6208_ao_winsn(comedi_device * dev, comedi_subdevice * s,
+static int pci6208_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i = 0, Data_Read;
@@ -244,7 +244,7 @@ static int pci6208_ao_winsn(comedi_device * dev, comedi_subdevice * s,
/* AO subdevices should have a read insn as well as a write insn.
* Usually this means copying a value stored in devpriv. */
-static int pci6208_ao_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int pci6208_ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
@@ -261,7 +261,7 @@ static int pci6208_ao_rinsn(comedi_device * dev, comedi_subdevice * s,
* useful to applications if you implement the insn_bits interface.
* This allows packed reading/writing of the DIO channels. The
* comedi core can convert between insn_bits and insn_read/write */
-//static int pci6208_dio_insn_bits(comedi_device *dev,comedi_subdevice *s,
+//static int pci6208_dio_insn_bits(struct comedi_device *dev,comedi_subdevice *s,
// comedi_insn *insn,unsigned int *data)
//{
// if(insn->n!=2)return -EINVAL;
@@ -285,7 +285,7 @@ static int pci6208_ao_rinsn(comedi_device * dev, comedi_subdevice * s,
// return 2;
//}
-//static int pci6208_dio_insn_config(comedi_device *dev,comedi_subdevice *s,
+//static int pci6208_dio_insn_config(struct comedi_device *dev,comedi_subdevice *s,
// comedi_insn *insn,unsigned int *data)
//{
// int chan=CR_CHAN(insn->chanspec);
@@ -305,7 +305,7 @@ static int pci6208_ao_rinsn(comedi_device * dev, comedi_subdevice * s,
// return 1;
//}
-static int pci6208_find_device(comedi_device * dev, int bus, int slot)
+static int pci6208_find_device(struct comedi_device * dev, int bus, int slot)
{
struct pci_dev *pci_dev;
int i;
diff --git a/drivers/staging/comedi/drivers/adl_pci7296.c b/drivers/staging/comedi/drivers/adl_pci7296.c
index ddd3e2d8848a..9c9d3f47f503 100644
--- a/drivers/staging/comedi/drivers/adl_pci7296.c
+++ b/drivers/staging/comedi/drivers/adl_pci7296.c
@@ -63,8 +63,8 @@ typedef struct {
#define devpriv ((adl_pci7296_private *)dev->private)
-static int adl_pci7296_attach(comedi_device * dev, comedi_devconfig * it);
-static int adl_pci7296_detach(comedi_device * dev);
+static int adl_pci7296_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int adl_pci7296_detach(struct comedi_device * dev);
static comedi_driver driver_adl_pci7296 = {
driver_name:"adl_pci7296",
module:THIS_MODULE,
@@ -72,7 +72,7 @@ static comedi_driver driver_adl_pci7296 = {
detach:adl_pci7296_detach,
};
-static int adl_pci7296_attach(comedi_device * dev, comedi_devconfig * it)
+static int adl_pci7296_attach(struct comedi_device * dev, comedi_devconfig * it)
{
struct pci_dev *pcidev;
comedi_subdevice *s;
@@ -148,7 +148,7 @@ static int adl_pci7296_attach(comedi_device * dev, comedi_devconfig * it)
return -EIO;
}
-static int adl_pci7296_detach(comedi_device * dev)
+static int adl_pci7296_detach(struct comedi_device * dev)
{
printk("comedi%d: pci7432: remove\n", dev->minor);
diff --git a/drivers/staging/comedi/drivers/adl_pci7432.c b/drivers/staging/comedi/drivers/adl_pci7432.c
index 4e54d08d2e37..75208720b175 100644
--- a/drivers/staging/comedi/drivers/adl_pci7432.c
+++ b/drivers/staging/comedi/drivers/adl_pci7432.c
@@ -58,8 +58,8 @@ typedef struct {
#define devpriv ((adl_pci7432_private *)dev->private)
-static int adl_pci7432_attach(comedi_device * dev, comedi_devconfig * it);
-static int adl_pci7432_detach(comedi_device * dev);
+static int adl_pci7432_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int adl_pci7432_detach(struct comedi_device * dev);
static comedi_driver driver_adl_pci7432 = {
driver_name:"adl_pci7432",
module:THIS_MODULE,
@@ -69,15 +69,15 @@ static comedi_driver driver_adl_pci7432 = {
/* Digital IO */
-static int adl_pci7432_di_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int adl_pci7432_di_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int adl_pci7432_do_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int adl_pci7432_do_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
/* */
-static int adl_pci7432_attach(comedi_device * dev, comedi_devconfig * it)
+static int adl_pci7432_attach(struct comedi_device * dev, comedi_devconfig * it)
{
struct pci_dev *pcidev;
comedi_subdevice *s;
@@ -150,7 +150,7 @@ static int adl_pci7432_attach(comedi_device * dev, comedi_devconfig * it)
return -EIO;
}
-static int adl_pci7432_detach(comedi_device * dev)
+static int adl_pci7432_detach(struct comedi_device * dev)
{
printk("comedi%d: pci7432: remove\n", dev->minor);
@@ -164,7 +164,7 @@ static int adl_pci7432_detach(comedi_device * dev)
return 0;
}
-static int adl_pci7432_do_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int adl_pci7432_do_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
printk("comedi: pci7432_do_insn_bits called\n");
@@ -184,7 +184,7 @@ static int adl_pci7432_do_insn_bits(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int adl_pci7432_di_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int adl_pci7432_di_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
printk("comedi: pci7432_di_insn_bits called\n");
diff --git a/drivers/staging/comedi/drivers/adl_pci8164.c b/drivers/staging/comedi/drivers/adl_pci8164.c
index 9d5c9875a06b..4cb3dc2e13bd 100644
--- a/drivers/staging/comedi/drivers/adl_pci8164.c
+++ b/drivers/staging/comedi/drivers/adl_pci8164.c
@@ -70,8 +70,8 @@ typedef struct {
#define devpriv ((adl_pci8164_private *)dev->private)
-static int adl_pci8164_attach(comedi_device * dev, comedi_devconfig * it);
-static int adl_pci8164_detach(comedi_device * dev);
+static int adl_pci8164_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int adl_pci8164_detach(struct comedi_device * dev);
static comedi_driver driver_adl_pci8164 = {
driver_name:"adl_pci8164",
module:THIS_MODULE,
@@ -79,31 +79,31 @@ static comedi_driver driver_adl_pci8164 = {
detach:adl_pci8164_detach,
};
-static int adl_pci8164_insn_read_msts(comedi_device * dev, comedi_subdevice * s,
+static int adl_pci8164_insn_read_msts(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int adl_pci8164_insn_read_ssts(comedi_device * dev, comedi_subdevice * s,
+static int adl_pci8164_insn_read_ssts(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int adl_pci8164_insn_read_buf0(comedi_device * dev, comedi_subdevice * s,
+static int adl_pci8164_insn_read_buf0(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int adl_pci8164_insn_read_buf1(comedi_device * dev, comedi_subdevice * s,
+static int adl_pci8164_insn_read_buf1(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int adl_pci8164_insn_write_cmd(comedi_device * dev, comedi_subdevice * s,
+static int adl_pci8164_insn_write_cmd(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int adl_pci8164_insn_write_otp(comedi_device * dev, comedi_subdevice * s,
+static int adl_pci8164_insn_write_otp(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int adl_pci8164_insn_write_buf0(comedi_device * dev,
+static int adl_pci8164_insn_write_buf0(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
-static int adl_pci8164_insn_write_buf1(comedi_device * dev,
+static int adl_pci8164_insn_write_buf1(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
-static int adl_pci8164_attach(comedi_device * dev, comedi_devconfig * it)
+static int adl_pci8164_attach(struct comedi_device * dev, comedi_devconfig * it)
{
struct pci_dev *pcidev;
comedi_subdevice *s;
@@ -194,7 +194,7 @@ static int adl_pci8164_attach(comedi_device * dev, comedi_devconfig * it)
return -EIO;
}
-static int adl_pci8164_detach(comedi_device * dev)
+static int adl_pci8164_detach(struct comedi_device * dev)
{
printk("comedi%d: pci8164: remove\n", dev->minor);
@@ -208,7 +208,7 @@ static int adl_pci8164_detach(comedi_device * dev)
return 0;
}
-static int adl_pci8164_insn_read_msts(comedi_device * dev, comedi_subdevice * s,
+static int adl_pci8164_insn_read_msts(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int axis, axis_reg;
@@ -245,7 +245,7 @@ static int adl_pci8164_insn_read_msts(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int adl_pci8164_insn_read_ssts(comedi_device * dev, comedi_subdevice * s,
+static int adl_pci8164_insn_read_ssts(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int axis, axis_reg;
@@ -282,7 +282,7 @@ static int adl_pci8164_insn_read_ssts(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int adl_pci8164_insn_read_buf0(comedi_device * dev, comedi_subdevice * s,
+static int adl_pci8164_insn_read_buf0(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int axis, axis_reg;
@@ -319,7 +319,7 @@ static int adl_pci8164_insn_read_buf0(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int adl_pci8164_insn_read_buf1(comedi_device * dev, comedi_subdevice * s,
+static int adl_pci8164_insn_read_buf1(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int axis, axis_reg;
@@ -357,7 +357,7 @@ static int adl_pci8164_insn_read_buf1(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int adl_pci8164_insn_write_cmd(comedi_device * dev, comedi_subdevice * s,
+static int adl_pci8164_insn_write_cmd(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int axis, axis_reg;
@@ -395,7 +395,7 @@ static int adl_pci8164_insn_write_cmd(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int adl_pci8164_insn_write_otp(comedi_device * dev, comedi_subdevice * s,
+static int adl_pci8164_insn_write_otp(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int axis, axis_reg;
@@ -433,7 +433,7 @@ static int adl_pci8164_insn_write_otp(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int adl_pci8164_insn_write_buf0(comedi_device * dev,
+static int adl_pci8164_insn_write_buf0(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
int axis, axis_reg;
@@ -471,7 +471,7 @@ static int adl_pci8164_insn_write_buf0(comedi_device * dev,
return 2;
}
-static int adl_pci8164_insn_write_buf1(comedi_device * dev,
+static int adl_pci8164_insn_write_buf1(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
int axis, axis_reg;
diff --git a/drivers/staging/comedi/drivers/adl_pci9111.c b/drivers/staging/comedi/drivers/adl_pci9111.c
index 1b9e9740a4c7..53eb696c06ad 100644
--- a/drivers/staging/comedi/drivers/adl_pci9111.c
+++ b/drivers/staging/comedi/drivers/adl_pci9111.c
@@ -265,9 +265,9 @@ TODO:
// Function prototypes
//
-static int pci9111_attach(comedi_device * dev, comedi_devconfig * it);
-static int pci9111_detach(comedi_device * dev);
-static void pci9111_ai_munge(comedi_device * dev, comedi_subdevice * s,
+static int pci9111_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int pci9111_detach(struct comedi_device * dev);
+static void pci9111_ai_munge(struct comedi_device * dev, comedi_subdevice * s,
void *data, unsigned int num_bytes, unsigned int start_chan_index);
static const comedi_lrange pci9111_hr_ai_range = {
@@ -415,7 +415,7 @@ static void plx9050_interrupt_control(unsigned long io_base,
// 8254 timer
//
-static void pci9111_timer_set(comedi_device * dev)
+static void pci9111_timer_set(struct comedi_device * dev)
{
pci9111_8254_control_set(PCI9111_8254_COUNTER_0 |
PCI9111_8254_READ_LOAD_LSB_MSB |
@@ -441,7 +441,7 @@ typedef enum {
external
} pci9111_trigger_sources;
-static void pci9111_trigger_source_set(comedi_device * dev,
+static void pci9111_trigger_source_set(struct comedi_device * dev,
pci9111_trigger_sources source)
{
int flags;
@@ -465,7 +465,7 @@ static void pci9111_trigger_source_set(comedi_device * dev,
pci9111_trigger_and_autoscan_set(flags);
}
-static void pci9111_pretrigger_set(comedi_device * dev, bool pretrigger)
+static void pci9111_pretrigger_set(struct comedi_device * dev, bool pretrigger)
{
int flags;
@@ -477,7 +477,7 @@ static void pci9111_pretrigger_set(comedi_device * dev, bool pretrigger)
pci9111_trigger_and_autoscan_set(flags);
}
-static void pci9111_autoscan_set(comedi_device * dev, bool autoscan)
+static void pci9111_autoscan_set(struct comedi_device * dev, bool autoscan)
{
int flags;
@@ -499,7 +499,7 @@ typedef enum {
irq_on_external_trigger
} pci9111_ISC1_sources;
-static void pci9111_interrupt_source_set(comedi_device * dev,
+static void pci9111_interrupt_source_set(struct comedi_device * dev,
pci9111_ISC0_sources irq_0_source, pci9111_ISC1_sources irq_1_source)
{
int flags;
@@ -527,7 +527,7 @@ static void pci9111_interrupt_source_set(comedi_device * dev,
#undef AI_DO_CMD_DEBUG
-static int pci9111_ai_cancel(comedi_device * dev, comedi_subdevice * s)
+static int pci9111_ai_cancel(struct comedi_device * dev, comedi_subdevice * s)
{
// Disable interrupts
@@ -557,7 +557,7 @@ static int pci9111_ai_cancel(comedi_device * dev, comedi_subdevice * s)
if (!src || tmp != src) error++
static int
-pci9111_ai_do_cmd_test(comedi_device * dev,
+pci9111_ai_do_cmd_test(struct comedi_device * dev,
comedi_subdevice * s, comedi_cmd * cmd)
{
int tmp;
@@ -758,7 +758,7 @@ pci9111_ai_do_cmd_test(comedi_device * dev,
// Analog input command
//
-static int pci9111_ai_do_cmd(comedi_device * dev, comedi_subdevice * subdevice)
+static int pci9111_ai_do_cmd(struct comedi_device * dev, comedi_subdevice * subdevice)
{
comedi_cmd *async_cmd = &subdevice->async->cmd;
@@ -881,7 +881,7 @@ static int pci9111_ai_do_cmd(comedi_device * dev, comedi_subdevice * subdevice)
return 0;
}
-static void pci9111_ai_munge(comedi_device * dev, comedi_subdevice * s,
+static void pci9111_ai_munge(struct comedi_device * dev, comedi_subdevice * s,
void *data, unsigned int num_bytes, unsigned int start_chan_index)
{
unsigned int i, num_samples = num_bytes / sizeof(short);
@@ -911,7 +911,7 @@ static void pci9111_ai_munge(comedi_device * dev, comedi_subdevice * s,
static irqreturn_t pci9111_interrupt(int irq, void *p_device PT_REGS_ARG)
{
- comedi_device *dev = p_device;
+ struct comedi_device *dev = p_device;
comedi_subdevice *subdevice = dev->read_subdev;
comedi_async *async;
unsigned long irq_flags;
@@ -1071,7 +1071,7 @@ static irqreturn_t pci9111_interrupt(int irq, void *p_device PT_REGS_ARG)
#undef AI_INSN_DEBUG
-static int pci9111_ai_insn_read(comedi_device * dev,
+static int pci9111_ai_insn_read(struct comedi_device * dev,
comedi_subdevice * subdevice, comedi_insn * insn, unsigned int * data)
{
int resolution =
@@ -1131,7 +1131,7 @@ static int pci9111_ai_insn_read(comedi_device * dev,
//
static int
-pci9111_ao_insn_write(comedi_device * dev,
+pci9111_ao_insn_write(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
int i;
@@ -1148,7 +1148,7 @@ pci9111_ao_insn_write(comedi_device * dev,
// Analog output readback
//
-static int pci9111_ao_insn_read(comedi_device * dev,
+static int pci9111_ao_insn_read(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
int i;
@@ -1170,7 +1170,7 @@ static int pci9111_ao_insn_read(comedi_device * dev,
// Digital inputs
//
-static int pci9111_di_insn_bits(comedi_device * dev,
+static int pci9111_di_insn_bits(struct comedi_device * dev,
comedi_subdevice * subdevice, comedi_insn * insn, unsigned int * data)
{
unsigned int bits;
@@ -1185,7 +1185,7 @@ static int pci9111_di_insn_bits(comedi_device * dev,
// Digital outputs
//
-static int pci9111_do_insn_bits(comedi_device * dev,
+static int pci9111_do_insn_bits(struct comedi_device * dev,
comedi_subdevice * subdevice, comedi_insn * insn, unsigned int * data)
{
unsigned int bits;
@@ -1218,7 +1218,7 @@ static int pci9111_do_insn_bits(comedi_device * dev,
// Reset device
//
-static int pci9111_reset(comedi_device * dev)
+static int pci9111_reset(struct comedi_device * dev)
{
// Set trigger source to software
@@ -1246,7 +1246,7 @@ static int pci9111_reset(comedi_device * dev)
// - Declare device driver capability
//
-static int pci9111_attach(comedi_device * dev, comedi_devconfig * it)
+static int pci9111_attach(struct comedi_device * dev, comedi_devconfig * it)
{
comedi_subdevice *subdevice;
unsigned long io_base, io_range, lcr_io_base, lcr_io_range;
@@ -1420,7 +1420,7 @@ static int pci9111_attach(comedi_device * dev, comedi_devconfig * it)
// Detach
//
-static int pci9111_detach(comedi_device * dev)
+static int pci9111_detach(struct comedi_device * dev)
{
// Reset device
diff --git a/drivers/staging/comedi/drivers/adl_pci9118.c b/drivers/staging/comedi/drivers/adl_pci9118.c
index 9dc30b282973..c352e37d97ae 100644
--- a/drivers/staging/comedi/drivers/adl_pci9118.c
+++ b/drivers/staging/comedi/drivers/adl_pci9118.c
@@ -178,8 +178,8 @@ static const comedi_lrange range_pci9118hg = { 8, {
#define PCI9118_BIPOLAR_RANGES 4 /* used for test on mixture of BIP/UNI ranges */
-static int pci9118_attach(comedi_device * dev, comedi_devconfig * it);
-static int pci9118_detach(comedi_device * dev);
+static int pci9118_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int pci9118_detach(struct comedi_device * dev);
typedef struct {
const char *name; // board name
@@ -288,7 +288,7 @@ typedef struct {
unsigned char cnt0_users; // bit field of 8254 CNT0 users (0-unused, 1-AO, 2-DI, 3-DO)
unsigned char exttrg_users; // bit field of external trigger users (0-AI, 1-AO, 2-DI, 3-DO)
unsigned int cnt0_divisor; // actual CNT0 divisor
- void (*int_ai_func) (comedi_device *, comedi_subdevice *, unsigned short, unsigned int, unsigned short); // ptr to actual interrupt AI function
+ void (*int_ai_func) (struct comedi_device *, comedi_subdevice *, unsigned short, unsigned int, unsigned short); // ptr to actual interrupt AI function
unsigned char ai16bits; // =1 16 bit card
unsigned char usedma; // =1 use DMA transfer and not INT
unsigned char useeoshandle; // =1 change WAKE_EOS DMA transfer to fit on every second
@@ -308,18 +308,18 @@ typedef struct {
==============================================================================
*/
-static int check_channel_list(comedi_device * dev, comedi_subdevice * s,
+static int check_channel_list(struct comedi_device * dev, comedi_subdevice * s,
int n_chan, unsigned int *chanlist, int frontadd, int backadd);
-static int setup_channel_list(comedi_device * dev, comedi_subdevice * s,
+static int setup_channel_list(struct comedi_device * dev, comedi_subdevice * s,
int n_chan, unsigned int *chanlist, int rot, int frontadd, int backadd,
int usedma, char eoshandle);
-static void start_pacer(comedi_device * dev, int mode, unsigned int divisor1,
+static void start_pacer(struct comedi_device * dev, int mode, unsigned int divisor1,
unsigned int divisor2);
-static int pci9118_reset(comedi_device * dev);
-static int pci9118_exttrg_add(comedi_device * dev, unsigned char source);
-static int pci9118_exttrg_del(comedi_device * dev, unsigned char source);
-static int pci9118_ai_cancel(comedi_device * dev, comedi_subdevice * s);
-static void pci9118_calc_divisors(char mode, comedi_device * dev,
+static int pci9118_reset(struct comedi_device * dev);
+static int pci9118_exttrg_add(struct comedi_device * dev, unsigned char source);
+static int pci9118_exttrg_del(struct comedi_device * dev, unsigned char source);
+static int pci9118_ai_cancel(struct comedi_device * dev, comedi_subdevice * s);
+static void pci9118_calc_divisors(char mode, struct comedi_device * dev,
comedi_subdevice * s, unsigned int *tim1, unsigned int *tim2,
unsigned int flags, int chans, unsigned int *div1, unsigned int *div2,
char usessh, unsigned int chnsshfront);
@@ -327,7 +327,7 @@ static void pci9118_calc_divisors(char mode, comedi_device * dev,
/*
==============================================================================
*/
-static int pci9118_insn_read_ai(comedi_device * dev, comedi_subdevice * s,
+static int pci9118_insn_read_ai(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
@@ -377,7 +377,7 @@ static int pci9118_insn_read_ai(comedi_device * dev, comedi_subdevice * s,
/*
==============================================================================
*/
-static int pci9118_insn_write_ao(comedi_device * dev, comedi_subdevice * s,
+static int pci9118_insn_write_ao(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n, chanreg, ch;
@@ -400,7 +400,7 @@ static int pci9118_insn_write_ao(comedi_device * dev, comedi_subdevice * s,
/*
==============================================================================
*/
-static int pci9118_insn_read_ao(comedi_device * dev, comedi_subdevice * s,
+static int pci9118_insn_read_ao(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n, chan;
@@ -415,7 +415,7 @@ static int pci9118_insn_read_ao(comedi_device * dev, comedi_subdevice * s,
/*
==============================================================================
*/
-static int pci9118_insn_bits_di(comedi_device * dev, comedi_subdevice * s,
+static int pci9118_insn_bits_di(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
data[1] = inl(dev->iobase + PCI9118_DI) & 0xf;
@@ -426,7 +426,7 @@ static int pci9118_insn_bits_di(comedi_device * dev, comedi_subdevice * s,
/*
==============================================================================
*/
-static int pci9118_insn_bits_do(comedi_device * dev, comedi_subdevice * s,
+static int pci9118_insn_bits_do(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (data[0]) {
@@ -442,7 +442,7 @@ static int pci9118_insn_bits_do(comedi_device * dev, comedi_subdevice * s,
/*
==============================================================================
*/
-static void interrupt_pci9118_ai_mode4_switch(comedi_device * dev)
+static void interrupt_pci9118_ai_mode4_switch(struct comedi_device * dev)
{
devpriv->AdFunctionReg =
AdFunction_PDTrg | AdFunction_PETrg | AdFunction_AM;
@@ -456,7 +456,7 @@ static void interrupt_pci9118_ai_mode4_switch(comedi_device * dev)
outl(devpriv->AdFunctionReg, dev->iobase + PCI9118_ADFUNC);
}
-static unsigned int defragment_dma_buffer(comedi_device * dev,
+static unsigned int defragment_dma_buffer(struct comedi_device * dev,
comedi_subdevice * s, short * dma_buffer, unsigned int num_samples)
{
unsigned int i = 0, j = 0;
@@ -480,7 +480,7 @@ static unsigned int defragment_dma_buffer(comedi_device * dev,
/*
==============================================================================
*/
-static unsigned int move_block_from_dma(comedi_device * dev,
+static unsigned int move_block_from_dma(struct comedi_device * dev,
comedi_subdevice * s, short * dma_buffer, unsigned int num_samples)
{
unsigned int num_bytes;
@@ -501,7 +501,7 @@ static unsigned int move_block_from_dma(comedi_device * dev,
/*
==============================================================================
*/
-static char pci9118_decode_error_status(comedi_device * dev,
+static char pci9118_decode_error_status(struct comedi_device * dev,
comedi_subdevice * s, unsigned char m)
{
if (m & 0x100) {
@@ -531,7 +531,7 @@ static char pci9118_decode_error_status(comedi_device * dev,
return 0;
}
-static void pci9118_ai_munge(comedi_device * dev, comedi_subdevice * s,
+static void pci9118_ai_munge(struct comedi_device * dev, comedi_subdevice * s,
void *data, unsigned int num_bytes, unsigned int start_chan_index)
{
unsigned int i, num_samples = num_bytes / sizeof(short);
@@ -551,7 +551,7 @@ static void pci9118_ai_munge(comedi_device * dev, comedi_subdevice * s,
/*
==============================================================================
*/
-static void interrupt_pci9118_ai_onesample(comedi_device * dev,
+static void interrupt_pci9118_ai_onesample(struct comedi_device * dev,
comedi_subdevice * s, unsigned short int_adstat, unsigned int int_amcc,
unsigned short int_daq)
{
@@ -598,7 +598,7 @@ static void interrupt_pci9118_ai_onesample(comedi_device * dev,
/*
==============================================================================
*/
-static void interrupt_pci9118_ai_dma(comedi_device * dev, comedi_subdevice * s,
+static void interrupt_pci9118_ai_dma(struct comedi_device * dev, comedi_subdevice * s,
unsigned short int_adstat, unsigned int int_amcc,
unsigned short int_daq)
{
@@ -676,7 +676,7 @@ static void interrupt_pci9118_ai_dma(comedi_device * dev, comedi_subdevice * s,
*/
static irqreturn_t interrupt_pci9118(int irq, void *d PT_REGS_ARG)
{
- comedi_device *dev = d;
+ struct comedi_device *dev = d;
unsigned int int_daq = 0, int_amcc, int_adstat;
if (!dev->attached)
@@ -727,7 +727,7 @@ static irqreturn_t interrupt_pci9118(int irq, void *d PT_REGS_ARG)
/*
==============================================================================
*/
-static int pci9118_ai_inttrig(comedi_device * dev, comedi_subdevice * s,
+static int pci9118_ai_inttrig(struct comedi_device * dev, comedi_subdevice * s,
unsigned int trignum)
{
if (trignum != devpriv->ai_inttrig_start)
@@ -751,7 +751,7 @@ static int pci9118_ai_inttrig(comedi_device * dev, comedi_subdevice * s,
/*
==============================================================================
*/
-static int pci9118_ai_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int pci9118_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
@@ -1009,7 +1009,7 @@ static int pci9118_ai_cmdtest(comedi_device * dev, comedi_subdevice * s,
/*
==============================================================================
*/
-static int Compute_and_setup_dma(comedi_device * dev)
+static int Compute_and_setup_dma(struct comedi_device * dev)
{
unsigned int dmalen0, dmalen1, i;
@@ -1163,7 +1163,7 @@ static int Compute_and_setup_dma(comedi_device * dev)
/*
==============================================================================
*/
-static int pci9118_ai_docmd_sampl(comedi_device * dev, comedi_subdevice * s)
+static int pci9118_ai_docmd_sampl(struct comedi_device * dev, comedi_subdevice * s)
{
DPRINTK("adl_pci9118 EDBG: BGN: pci9118_ai_docmd_sampl(%d,) [%d]\n",
dev->minor, devpriv->ai_do);
@@ -1216,7 +1216,7 @@ static int pci9118_ai_docmd_sampl(comedi_device * dev, comedi_subdevice * s)
/*
==============================================================================
*/
-static int pci9118_ai_docmd_dma(comedi_device * dev, comedi_subdevice * s)
+static int pci9118_ai_docmd_dma(struct comedi_device * dev, comedi_subdevice * s)
{
DPRINTK("adl_pci9118 EDBG: BGN: pci9118_ai_docmd_dma(%d,) [%d,%d]\n",
dev->minor, devpriv->ai_do, devpriv->usedma);
@@ -1287,7 +1287,7 @@ static int pci9118_ai_docmd_dma(comedi_device * dev, comedi_subdevice * s)
/*
==============================================================================
*/
-static int pci9118_ai_cmd(comedi_device * dev, comedi_subdevice * s)
+static int pci9118_ai_cmd(struct comedi_device * dev, comedi_subdevice * s)
{
comedi_cmd *cmd = &s->async->cmd;
unsigned int addchans = 0;
@@ -1486,7 +1486,7 @@ static int pci9118_ai_cmd(comedi_device * dev, comedi_subdevice * s)
/*
==============================================================================
*/
-static int check_channel_list(comedi_device * dev, comedi_subdevice * s,
+static int check_channel_list(struct comedi_device * dev, comedi_subdevice * s,
int n_chan, unsigned int *chanlist, int frontadd, int backadd)
{
unsigned int i, differencial = 0, bipolar = 0;
@@ -1537,7 +1537,7 @@ static int check_channel_list(comedi_device * dev, comedi_subdevice * s,
/*
==============================================================================
*/
-static int setup_channel_list(comedi_device * dev, comedi_subdevice * s,
+static int setup_channel_list(struct comedi_device * dev, comedi_subdevice * s,
int n_chan, unsigned int *chanlist, int rot, int frontadd, int backadd,
int usedma, char useeos)
{
@@ -1651,7 +1651,7 @@ static int setup_channel_list(comedi_device * dev, comedi_subdevice * s,
==============================================================================
calculate 8254 divisors if they are used for dual timing
*/
-static void pci9118_calc_divisors(char mode, comedi_device * dev,
+static void pci9118_calc_divisors(char mode, struct comedi_device * dev,
comedi_subdevice * s, unsigned int *tim1, unsigned int *tim2,
unsigned int flags, int chans, unsigned int *div1, unsigned int *div2,
char usessh, unsigned int chnsshfront)
@@ -1710,7 +1710,7 @@ static void pci9118_calc_divisors(char mode, comedi_device * dev,
/*
==============================================================================
*/
-static void start_pacer(comedi_device * dev, int mode, unsigned int divisor1,
+static void start_pacer(struct comedi_device * dev, int mode, unsigned int divisor1,
unsigned int divisor2)
{
outl(0x74, dev->iobase + PCI9118_CNTCTRL);
@@ -1729,7 +1729,7 @@ static void start_pacer(comedi_device * dev, int mode, unsigned int divisor1,
/*
==============================================================================
*/
-static int pci9118_exttrg_add(comedi_device * dev, unsigned char source)
+static int pci9118_exttrg_add(struct comedi_device * dev, unsigned char source)
{
if (source > 3)
return -1; // incorrect source
@@ -1743,7 +1743,7 @@ static int pci9118_exttrg_add(comedi_device * dev, unsigned char source)
/*
==============================================================================
*/
-static int pci9118_exttrg_del(comedi_device * dev, unsigned char source)
+static int pci9118_exttrg_del(struct comedi_device * dev, unsigned char source)
{
if (source > 3)
return -1; // incorrect source
@@ -1760,7 +1760,7 @@ static int pci9118_exttrg_del(comedi_device * dev, unsigned char source)
/*
==============================================================================
*/
-static int pci9118_ai_cancel(comedi_device * dev, comedi_subdevice * s)
+static int pci9118_ai_cancel(struct comedi_device * dev, comedi_subdevice * s)
{
if (devpriv->usedma)
outl(inl(devpriv->iobase_a + AMCC_OP_REG_MCSR) & (~EN_A2P_TRANSFERS), devpriv->iobase_a + AMCC_OP_REG_MCSR); // stop DMA
@@ -1795,7 +1795,7 @@ static int pci9118_ai_cancel(comedi_device * dev, comedi_subdevice * s)
/*
==============================================================================
*/
-static int pci9118_reset(comedi_device * dev)
+static int pci9118_reset(struct comedi_device * dev)
{
devpriv->IntControlReg = 0;
devpriv->exttrg_users = 0;
@@ -1835,7 +1835,7 @@ static int pci9118_reset(comedi_device * dev)
/*
==============================================================================
*/
-static int pci9118_attach(comedi_device * dev, comedi_devconfig * it)
+static int pci9118_attach(struct comedi_device * dev, comedi_devconfig * it)
{
comedi_subdevice *s;
int ret, pages, i;
@@ -2071,7 +2071,7 @@ static int pci9118_attach(comedi_device * dev, comedi_devconfig * it)
/*
==============================================================================
*/
-static int pci9118_detach(comedi_device * dev)
+static int pci9118_detach(struct comedi_device * dev)
{
if (dev->private) {
if (devpriv->valid)
diff --git a/drivers/staging/comedi/drivers/adq12b.c b/drivers/staging/comedi/drivers/adq12b.c
index f32e55921b5f..295b667a381a 100644
--- a/drivers/staging/comedi/drivers/adq12b.c
+++ b/drivers/staging/comedi/drivers/adq12b.c
@@ -162,8 +162,8 @@ typedef struct{
* the board, and also about the kernel module that contains
* the device code.
*/
-static int adq12b_attach(comedi_device *dev,comedi_devconfig *it);
-static int adq12b_detach(comedi_device *dev);
+static int adq12b_attach(struct comedi_device *dev,comedi_devconfig *it);
+static int adq12b_detach(struct comedi_device *dev);
static comedi_driver driver_adq12b={
driver_name: "adq12b",
module: THIS_MODULE,
@@ -174,9 +174,9 @@ static comedi_driver driver_adq12b={
num_names: sizeof(adq12b_boards) / sizeof(adq12b_board),
};
-static int adq12b_ai_rinsn(comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,unsigned int *data);
-static int adq12b_di_insn_bits(comedi_device *dev,comedi_subdevice *s, comedi_insn *insn,unsigned int *data);
-static int adq12b_do_insn_bits(comedi_device *dev,comedi_subdevice *s, comedi_insn *insn,unsigned int *data);
+static int adq12b_ai_rinsn(struct comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,unsigned int *data);
+static int adq12b_di_insn_bits(struct comedi_device *dev,comedi_subdevice *s, comedi_insn *insn,unsigned int *data);
+static int adq12b_do_insn_bits(struct comedi_device *dev,comedi_subdevice *s, comedi_insn *insn,unsigned int *data);
/*
* Attach is called by the Comedi core to configure the driver
@@ -184,7 +184,7 @@ static int adq12b_do_insn_bits(comedi_device *dev,comedi_subdevice *s, comedi_in
* in the driver structure, dev->board_ptr contains that
* address.
*/
-static int adq12b_attach(comedi_device *dev,comedi_devconfig *it)
+static int adq12b_attach(struct comedi_device *dev,comedi_devconfig *it)
{
comedi_subdevice *s;
unsigned long iobase;
@@ -297,7 +297,7 @@ static int adq12b_attach(comedi_device *dev,comedi_devconfig *it)
* allocated by _attach(). dev->private and dev->subdevices are
* deallocated automatically by the core.
*/
-static int adq12b_detach(comedi_device *dev)
+static int adq12b_detach(struct comedi_device *dev)
{
if (dev->iobase)
release_region(dev->iobase, ADQ12B_SIZE);
@@ -314,7 +314,7 @@ static int adq12b_detach(comedi_device *dev)
* mode.
*/
-static int adq12b_ai_rinsn(comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,unsigned int *data)
+static int adq12b_ai_rinsn(struct comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,unsigned int *data)
{
int n, i;
int range, channel;
@@ -357,7 +357,7 @@ static int adq12b_ai_rinsn(comedi_device *dev,comedi_subdevice *s,comedi_insn *i
}
-static int adq12b_di_insn_bits(comedi_device *dev,comedi_subdevice *s, comedi_insn *insn,unsigned int *data)
+static int adq12b_di_insn_bits(struct comedi_device *dev,comedi_subdevice *s, comedi_insn *insn,unsigned int *data)
{
/* only bits 0-4 have information about digital inputs */
@@ -367,7 +367,7 @@ static int adq12b_di_insn_bits(comedi_device *dev,comedi_subdevice *s, comedi_i
}
-static int adq12b_do_insn_bits(comedi_device *dev,comedi_subdevice *s, comedi_insn *insn,unsigned int *data)
+static int adq12b_do_insn_bits(struct comedi_device *dev,comedi_subdevice *s, comedi_insn *insn,unsigned int *data)
{
int channel;
diff --git a/drivers/staging/comedi/drivers/adv_pci1710.c b/drivers/staging/comedi/drivers/adv_pci1710.c
index e482e602ba9e..75d915310e01 100644
--- a/drivers/staging/comedi/drivers/adv_pci1710.c
+++ b/drivers/staging/comedi/drivers/adv_pci1710.c
@@ -182,8 +182,8 @@ static const comedi_lrange range_pci171x_da = { 2, {
}
};
-static int pci1710_attach(comedi_device * dev, comedi_devconfig * it);
-static int pci1710_detach(comedi_device * dev);
+static int pci1710_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int pci1710_detach(struct comedi_device * dev);
typedef struct {
const char *name; // board name
@@ -304,14 +304,14 @@ typedef struct {
==============================================================================
*/
-static int check_channel_list(comedi_device * dev, comedi_subdevice * s,
+static int check_channel_list(struct comedi_device * dev, comedi_subdevice * s,
unsigned int *chanlist, unsigned int n_chan);
-static void setup_channel_list(comedi_device * dev, comedi_subdevice * s,
+static void setup_channel_list(struct comedi_device * dev, comedi_subdevice * s,
unsigned int *chanlist, unsigned int n_chan, unsigned int seglen);
-static void start_pacer(comedi_device * dev, int mode, unsigned int divisor1,
+static void start_pacer(struct comedi_device * dev, int mode, unsigned int divisor1,
unsigned int divisor2);
-static int pci1710_reset(comedi_device * dev);
-static int pci171x_ai_cancel(comedi_device * dev, comedi_subdevice * s);
+static int pci1710_reset(struct comedi_device * dev);
+static int pci171x_ai_cancel(struct comedi_device * dev, comedi_subdevice * s);
static const unsigned int muxonechan[] = { 0x0000, 0x0101, 0x0202, 0x0303, 0x0404, 0x0505, 0x0606, 0x0707, // used for gain list programming
0x0808, 0x0909, 0x0a0a, 0x0b0b, 0x0c0c, 0x0d0d, 0x0e0e, 0x0f0f,
@@ -322,7 +322,7 @@ static const unsigned int muxonechan[] = { 0x0000, 0x0101, 0x0202, 0x0303, 0x040
/*
==============================================================================
*/
-static int pci171x_insn_read_ai(comedi_device * dev, comedi_subdevice * s,
+static int pci171x_insn_read_ai(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n, timeout;
@@ -390,7 +390,7 @@ static int pci171x_insn_read_ai(comedi_device * dev, comedi_subdevice * s,
/*
==============================================================================
*/
-static int pci171x_insn_write_ao(comedi_device * dev, comedi_subdevice * s,
+static int pci171x_insn_write_ao(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n, chan, range, ofs;
@@ -421,7 +421,7 @@ static int pci171x_insn_write_ao(comedi_device * dev, comedi_subdevice * s,
/*
==============================================================================
*/
-static int pci171x_insn_read_ao(comedi_device * dev, comedi_subdevice * s,
+static int pci171x_insn_read_ao(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n, chan;
@@ -436,7 +436,7 @@ static int pci171x_insn_read_ao(comedi_device * dev, comedi_subdevice * s,
/*
==============================================================================
*/
-static int pci171x_insn_bits_di(comedi_device * dev, comedi_subdevice * s,
+static int pci171x_insn_bits_di(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
data[1] = inw(dev->iobase + PCI171x_DI);
@@ -447,7 +447,7 @@ static int pci171x_insn_bits_di(comedi_device * dev, comedi_subdevice * s,
/*
==============================================================================
*/
-static int pci171x_insn_bits_do(comedi_device * dev, comedi_subdevice * s,
+static int pci171x_insn_bits_do(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (data[0]) {
@@ -463,7 +463,7 @@ static int pci171x_insn_bits_do(comedi_device * dev, comedi_subdevice * s,
/*
==============================================================================
*/
-static int pci171x_insn_counter_read(comedi_device * dev, comedi_subdevice * s,
+static int pci171x_insn_counter_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int msb, lsb, ccntrl;
@@ -485,7 +485,7 @@ static int pci171x_insn_counter_read(comedi_device * dev, comedi_subdevice * s,
/*
==============================================================================
*/
-static int pci171x_insn_counter_write(comedi_device * dev, comedi_subdevice * s,
+static int pci171x_insn_counter_write(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
uint msb, lsb, ccntrl, status;
@@ -512,7 +512,7 @@ static int pci171x_insn_counter_write(comedi_device * dev, comedi_subdevice * s,
/*
==============================================================================
*/
-static int pci171x_insn_counter_config(comedi_device * dev,
+static int pci171x_insn_counter_config(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
#ifdef unused
@@ -548,7 +548,7 @@ static int pci171x_insn_counter_config(comedi_device * dev,
/*
==============================================================================
*/
-static int pci1720_insn_write_ao(comedi_device * dev, comedi_subdevice * s,
+static int pci1720_insn_write_ao(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n, rangereg, chan;
@@ -576,7 +576,7 @@ static int pci1720_insn_write_ao(comedi_device * dev, comedi_subdevice * s,
*/
static void interrupt_pci1710_every_sample(void *d)
{
- comedi_device *dev = d;
+ struct comedi_device *dev = d;
comedi_subdevice *s = dev->subdevices + 0;
int m;
#ifdef PCI171x_PARANOIDCHECK
@@ -659,7 +659,7 @@ static void interrupt_pci1710_every_sample(void *d)
/*
==============================================================================
*/
-static int move_block_from_fifo(comedi_device * dev, comedi_subdevice * s,
+static int move_block_from_fifo(struct comedi_device * dev, comedi_subdevice * s,
int n, int turn)
{
int i, j;
@@ -707,7 +707,7 @@ static int move_block_from_fifo(comedi_device * dev, comedi_subdevice * s,
*/
static void interrupt_pci1710_half_fifo(void *d)
{
- comedi_device *dev = d;
+ struct comedi_device *dev = d;
comedi_subdevice *s = dev->subdevices + 0;
int m, samplesinbuf;
@@ -762,7 +762,7 @@ static void interrupt_pci1710_half_fifo(void *d)
*/
static irqreturn_t interrupt_service_pci1710(int irq, void *d PT_REGS_ARG)
{
- comedi_device *dev = d;
+ struct comedi_device *dev = d;
DPRINTK("adv_pci1710 EDBG: BGN: interrupt_service_pci1710(%d,...)\n",
irq);
@@ -801,7 +801,7 @@ static irqreturn_t interrupt_service_pci1710(int irq, void *d PT_REGS_ARG)
/*
==============================================================================
*/
-static int pci171x_ai_docmd_and_mode(int mode, comedi_device * dev,
+static int pci171x_ai_docmd_and_mode(int mode, struct comedi_device * dev,
comedi_subdevice * s)
{
unsigned int divisor1, divisor2;
@@ -900,7 +900,7 @@ static void pci171x_cmdtest_out(int e, comedi_cmd * cmd)
/*
==============================================================================
*/
-static int pci171x_ai_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int pci171x_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
@@ -1065,7 +1065,7 @@ static int pci171x_ai_cmdtest(comedi_device * dev, comedi_subdevice * s,
/*
==============================================================================
*/
-static int pci171x_ai_cmd(comedi_device * dev, comedi_subdevice * s)
+static int pci171x_ai_cmd(struct comedi_device * dev, comedi_subdevice * s)
{
comedi_cmd *cmd = &s->async->cmd;
@@ -1104,7 +1104,7 @@ static int pci171x_ai_cmd(comedi_device * dev, comedi_subdevice * s)
If it's ok, then program scan/gain logic.
This works for all cards.
*/
-static int check_channel_list(comedi_device * dev, comedi_subdevice * s,
+static int check_channel_list(struct comedi_device * dev, comedi_subdevice * s,
unsigned int *chanlist, unsigned int n_chan)
{
unsigned int chansegment[32];
@@ -1163,7 +1163,7 @@ static int check_channel_list(comedi_device * dev, comedi_subdevice * s,
return seglen;
}
-static void setup_channel_list(comedi_device * dev, comedi_subdevice * s,
+static void setup_channel_list(struct comedi_device * dev, comedi_subdevice * s,
unsigned int *chanlist, unsigned int n_chan, unsigned int seglen)
{
unsigned int i, range, chanprog;
@@ -1200,7 +1200,7 @@ static void setup_channel_list(comedi_device * dev, comedi_subdevice * s,
/*
==============================================================================
*/
-static void start_pacer(comedi_device * dev, int mode, unsigned int divisor1,
+static void start_pacer(struct comedi_device * dev, int mode, unsigned int divisor1,
unsigned int divisor2)
{
DPRINTK("adv_pci1710 EDBG: BGN: start_pacer(%d,%u,%u)\n", mode,
@@ -1220,7 +1220,7 @@ static void start_pacer(comedi_device * dev, int mode, unsigned int divisor1,
/*
==============================================================================
*/
-static int pci171x_ai_cancel(comedi_device * dev, comedi_subdevice * s)
+static int pci171x_ai_cancel(struct comedi_device * dev, comedi_subdevice * s)
{
DPRINTK("adv_pci1710 EDBG: BGN: pci171x_ai_cancel(...)\n");
@@ -1249,7 +1249,7 @@ static int pci171x_ai_cancel(comedi_device * dev, comedi_subdevice * s)
/*
==============================================================================
*/
-static int pci171x_reset(comedi_device * dev)
+static int pci171x_reset(struct comedi_device * dev)
{
DPRINTK("adv_pci1710 EDBG: BGN: pci171x_reset(...)\n");
outw(0x30, dev->iobase + PCI171x_CNTCTRL);
@@ -1279,7 +1279,7 @@ static int pci171x_reset(comedi_device * dev)
/*
==============================================================================
*/
-static int pci1720_reset(comedi_device * dev)
+static int pci1720_reset(struct comedi_device * dev)
{
DPRINTK("adv_pci1710 EDBG: BGN: pci1720_reset(...)\n");
outb(Syncont_SC0, dev->iobase + PCI1720_SYNCONT); // set synchronous output mode
@@ -1301,7 +1301,7 @@ static int pci1720_reset(comedi_device * dev)
/*
==============================================================================
*/
-static int pci1710_reset(comedi_device * dev)
+static int pci1710_reset(struct comedi_device * dev)
{
DPRINTK("adv_pci1710 EDBG: BGN: pci1710_reset(...)\n");
switch (this_board->cardtype) {
@@ -1316,7 +1316,7 @@ static int pci1710_reset(comedi_device * dev)
/*
==============================================================================
*/
-static int pci1710_attach(comedi_device * dev, comedi_devconfig * it)
+static int pci1710_attach(struct comedi_device * dev, comedi_devconfig * it)
{
comedi_subdevice *s;
int ret, subdev, n_subdevices;
@@ -1540,7 +1540,7 @@ static int pci1710_attach(comedi_device * dev, comedi_devconfig * it)
/*
==============================================================================
*/
-static int pci1710_detach(comedi_device * dev)
+static int pci1710_detach(struct comedi_device * dev)
{
if (dev->private) {
diff --git a/drivers/staging/comedi/drivers/adv_pci1723.c b/drivers/staging/comedi/drivers/adv_pci1723.c
index 46b70942ac85..e69c2e358139 100644
--- a/drivers/staging/comedi/drivers/adv_pci1723.c
+++ b/drivers/staging/comedi/drivers/adv_pci1723.c
@@ -143,8 +143,8 @@ MODULE_DEVICE_TABLE(pci, pci1723_pci_table);
* the board, and also about the kernel module that contains
* the device code.
*/
-static int pci1723_attach(comedi_device * dev, comedi_devconfig * it);
-static int pci1723_detach(comedi_device * dev);
+static int pci1723_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int pci1723_detach(struct comedi_device * dev);
#define n_boardtypes (sizeof(boardtypes)/sizeof(boardtype))
@@ -175,7 +175,7 @@ typedef struct {
/*
* the pci1723 card reset;
*/
-static int pci1723_reset(comedi_device * dev)
+static int pci1723_reset(struct comedi_device * dev)
{
int i;
DPRINTK("adv_pci1723 EDBG: BGN: pci1723_reset(...)\n");
@@ -202,7 +202,7 @@ static int pci1723_reset(comedi_device * dev)
return 0;
}
-static int pci1723_insn_read_ao(comedi_device * dev, comedi_subdevice * s,
+static int pci1723_insn_read_ao(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n, chan;
@@ -218,7 +218,7 @@ static int pci1723_insn_read_ao(comedi_device * dev, comedi_subdevice * s,
/*
analog data output;
*/
-static int pci1723_ao_write_winsn(comedi_device * dev, comedi_subdevice * s,
+static int pci1723_ao_write_winsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n, chan;
@@ -238,7 +238,7 @@ static int pci1723_ao_write_winsn(comedi_device * dev, comedi_subdevice * s,
/*
digital i/o config/query
*/
-static int pci1723_dio_insn_config(comedi_device * dev, comedi_subdevice * s,
+static int pci1723_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int mask;
@@ -278,7 +278,7 @@ static int pci1723_dio_insn_config(comedi_device * dev, comedi_subdevice * s,
/*
digital i/o bits read/write
*/
-static int pci1723_dio_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int pci1723_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (data[0]) {
@@ -294,7 +294,7 @@ static int pci1723_dio_insn_bits(comedi_device * dev, comedi_subdevice * s,
* Attach is called by the Comedi core to configure the driver
* for a pci1723 board.
*/
-static int pci1723_attach(comedi_device * dev, comedi_devconfig * it)
+static int pci1723_attach(struct comedi_device * dev, comedi_devconfig * it)
{
comedi_subdevice *s;
int ret, subdev, n_subdevices;
@@ -439,7 +439,7 @@ static int pci1723_attach(comedi_device * dev, comedi_devconfig * it)
* allocated by _attach(). dev->private and dev->subdevices are
* deallocated automatically by the core.
*/
-static int pci1723_detach(comedi_device * dev)
+static int pci1723_detach(struct comedi_device * dev)
{
printk("comedi%d: pci1723: remove\n", dev->minor);
diff --git a/drivers/staging/comedi/drivers/adv_pci_dio.c b/drivers/staging/comedi/drivers/adv_pci_dio.c
index 25ddbc86fb33..18e778e398bf 100644
--- a/drivers/staging/comedi/drivers/adv_pci_dio.c
+++ b/drivers/staging/comedi/drivers/adv_pci_dio.c
@@ -183,8 +183,8 @@ typedef enum {
#define OMBCMD_RETRY 0x03 /* 3 times try request before error */
-static int pci_dio_attach(comedi_device * dev, comedi_devconfig * it);
-static int pci_dio_detach(comedi_device * dev);
+static int pci_dio_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int pci_dio_detach(struct comedi_device * dev);
typedef struct {
int chans; // num of chans
@@ -357,7 +357,7 @@ static pci_dio_private *pci_priv = NULL; /* list of allocated cards */
/*
==============================================================================
*/
-static int pci_dio_insn_bits_di_b(comedi_device * dev, comedi_subdevice * s,
+static int pci_dio_insn_bits_di_b(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
const diosubd_data *d = (const diosubd_data *)s->private;
@@ -374,7 +374,7 @@ static int pci_dio_insn_bits_di_b(comedi_device * dev, comedi_subdevice * s,
/*
==============================================================================
*/
-static int pci_dio_insn_bits_di_w(comedi_device * dev, comedi_subdevice * s,
+static int pci_dio_insn_bits_di_w(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
const diosubd_data *d = (const diosubd_data *)s->private;
@@ -390,7 +390,7 @@ static int pci_dio_insn_bits_di_w(comedi_device * dev, comedi_subdevice * s,
/*
==============================================================================
*/
-static int pci_dio_insn_bits_do_b(comedi_device * dev, comedi_subdevice * s,
+static int pci_dio_insn_bits_do_b(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
const diosubd_data *d = (const diosubd_data *)s->private;
@@ -411,7 +411,7 @@ static int pci_dio_insn_bits_do_b(comedi_device * dev, comedi_subdevice * s,
/*
==============================================================================
*/
-static int pci_dio_insn_bits_do_w(comedi_device * dev, comedi_subdevice * s,
+static int pci_dio_insn_bits_do_w(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
const diosubd_data *d = (const diosubd_data *)s->private;
@@ -432,7 +432,7 @@ static int pci_dio_insn_bits_do_w(comedi_device * dev, comedi_subdevice * s,
/*
==============================================================================
*/
-static int pci1760_unchecked_mbxrequest(comedi_device * dev,
+static int pci1760_unchecked_mbxrequest(struct comedi_device * dev,
unsigned char *omb, unsigned char *imb, int repeats)
{
int cnt, tout, ok = 0;
@@ -460,7 +460,7 @@ static int pci1760_unchecked_mbxrequest(comedi_device * dev,
return -ETIME;
}
-static int pci1760_clear_imb2(comedi_device * dev)
+static int pci1760_clear_imb2(struct comedi_device * dev)
{
unsigned char omb[4] = { 0x0, 0x0, CMD_ClearIMB2, 0x0 };
unsigned char imb[4];
@@ -470,7 +470,7 @@ static int pci1760_clear_imb2(comedi_device * dev)
return pci1760_unchecked_mbxrequest(dev, omb, imb, OMBCMD_RETRY);
}
-static int pci1760_mbxrequest(comedi_device * dev,
+static int pci1760_mbxrequest(struct comedi_device * dev,
unsigned char *omb, unsigned char *imb)
{
if (omb[2] == CMD_ClearIMB2) {
@@ -490,7 +490,7 @@ static int pci1760_mbxrequest(comedi_device * dev,
/*
==============================================================================
*/
-static int pci1760_insn_bits_di(comedi_device * dev, comedi_subdevice * s,
+static int pci1760_insn_bits_di(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
data[1] = inb(dev->iobase + IMB3);
@@ -501,7 +501,7 @@ static int pci1760_insn_bits_di(comedi_device * dev, comedi_subdevice * s,
/*
==============================================================================
*/
-static int pci1760_insn_bits_do(comedi_device * dev, comedi_subdevice * s,
+static int pci1760_insn_bits_do(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int ret;
@@ -528,7 +528,7 @@ static int pci1760_insn_bits_do(comedi_device * dev, comedi_subdevice * s,
/*
==============================================================================
*/
-static int pci1760_insn_cnt_read(comedi_device * dev, comedi_subdevice * s,
+static int pci1760_insn_cnt_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int ret, n;
@@ -552,7 +552,7 @@ static int pci1760_insn_cnt_read(comedi_device * dev, comedi_subdevice * s,
/*
==============================================================================
*/
-static int pci1760_insn_cnt_write(comedi_device * dev, comedi_subdevice * s,
+static int pci1760_insn_cnt_write(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int ret;
@@ -590,7 +590,7 @@ static int pci1760_insn_cnt_write(comedi_device * dev, comedi_subdevice * s,
/*
==============================================================================
*/
-static int pci1760_reset(comedi_device * dev)
+static int pci1760_reset(struct comedi_device * dev)
{
int i;
unsigned char omb[4] = { 0x00, 0x00, 0x00, 0x00 };
@@ -667,7 +667,7 @@ static int pci1760_reset(comedi_device * dev)
/*
==============================================================================
*/
-static int pci_dio_reset(comedi_device * dev)
+static int pci_dio_reset(struct comedi_device * dev)
{
DPRINTK("adv_pci_dio EDBG: BGN: pci171x_reset(...)\n");
@@ -750,7 +750,7 @@ static int pci_dio_reset(comedi_device * dev)
/*
==============================================================================
*/
-static int pci1760_attach(comedi_device * dev, comedi_devconfig * it)
+static int pci1760_attach(struct comedi_device * dev, comedi_devconfig * it)
{
comedi_subdevice *s;
int subdev = 0;
@@ -802,7 +802,7 @@ static int pci1760_attach(comedi_device * dev, comedi_devconfig * it)
/*
==============================================================================
*/
-static int pci_dio_add_di(comedi_device * dev, comedi_subdevice * s,
+static int pci_dio_add_di(struct comedi_device * dev, comedi_subdevice * s,
const diosubd_data * d, int subdev)
{
s->type = COMEDI_SUBD_DI;
@@ -829,7 +829,7 @@ static int pci_dio_add_di(comedi_device * dev, comedi_subdevice * s,
/*
==============================================================================
*/
-static int pci_dio_add_do(comedi_device * dev, comedi_subdevice * s,
+static int pci_dio_add_do(struct comedi_device * dev, comedi_subdevice * s,
const diosubd_data * d, int subdev)
{
s->type = COMEDI_SUBD_DO;
@@ -857,7 +857,7 @@ static int pci_dio_add_do(comedi_device * dev, comedi_subdevice * s,
/*
==============================================================================
*/
-static int CheckAndAllocCard(comedi_device * dev, comedi_devconfig * it,
+static int CheckAndAllocCard(struct comedi_device * dev, comedi_devconfig * it,
struct pci_dev *pcidev)
{
pci_dio_private *pr, *prev;
@@ -883,7 +883,7 @@ static int CheckAndAllocCard(comedi_device * dev, comedi_devconfig * it,
/*
==============================================================================
*/
-static int pci_dio_attach(comedi_device * dev, comedi_devconfig * it)
+static int pci_dio_attach(struct comedi_device * dev, comedi_devconfig * it)
{
comedi_subdevice *s;
int ret, subdev, n_subdevices, i, j;
@@ -1011,7 +1011,7 @@ static int pci_dio_attach(comedi_device * dev, comedi_devconfig * it)
/*
==============================================================================
*/
-static int pci_dio_detach(comedi_device * dev)
+static int pci_dio_detach(struct comedi_device * dev)
{
int i, j;
comedi_subdevice *s;
diff --git a/drivers/staging/comedi/drivers/aio_aio12_8.c b/drivers/staging/comedi/drivers/aio_aio12_8.c
index 3a326f6e3205..37d13d68089e 100644
--- a/drivers/staging/comedi/drivers/aio_aio12_8.c
+++ b/drivers/staging/comedi/drivers/aio_aio12_8.c
@@ -88,7 +88,7 @@ typedef struct {
#define devpriv ((aio12_8_private *) dev->private)
-static int aio_aio12_8_ai_read(comedi_device * dev, comedi_subdevice * s,
+static int aio_aio12_8_ai_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n;
@@ -122,7 +122,7 @@ static int aio_aio12_8_ai_read(comedi_device * dev, comedi_subdevice * s,
return n;
}
-static int aio_aio12_8_ao_read(comedi_device * dev, comedi_subdevice * s,
+static int aio_aio12_8_ao_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
@@ -133,7 +133,7 @@ static int aio_aio12_8_ao_read(comedi_device * dev, comedi_subdevice * s,
return insn->n;
}
-static int aio_aio12_8_ao_write(comedi_device * dev, comedi_subdevice * s,
+static int aio_aio12_8_ao_write(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
@@ -161,7 +161,7 @@ static const comedi_lrange range_aio_aio12_8 = {
}
};
-static int aio_aio12_8_attach(comedi_device * dev, comedi_devconfig * it)
+static int aio_aio12_8_attach(struct comedi_device * dev, comedi_devconfig * it)
{
int iobase;
comedi_subdevice *s;
@@ -205,7 +205,7 @@ static int aio_aio12_8_attach(comedi_device * dev, comedi_devconfig * it)
return 0;
}
-static int aio_aio12_8_detach(comedi_device * dev)
+static int aio_aio12_8_detach(struct comedi_device * dev)
{
subdev_8255_cleanup(dev, &dev->subdevices[2]);
if (dev->iobase)
diff --git a/drivers/staging/comedi/drivers/aio_iiro_16.c b/drivers/staging/comedi/drivers/aio_iiro_16.c
index 2da86744bc00..88f8e188e0c9 100644
--- a/drivers/staging/comedi/drivers/aio_iiro_16.c
+++ b/drivers/staging/comedi/drivers/aio_iiro_16.c
@@ -67,9 +67,9 @@ typedef struct {
#define devpriv ((aio_iiro_16_private *) dev->private)
-static int aio_iiro_16_attach(comedi_device * dev, comedi_devconfig * it);
+static int aio_iiro_16_attach(struct comedi_device * dev, comedi_devconfig * it);
-static int aio_iiro_16_detach(comedi_device * dev);
+static int aio_iiro_16_detach(struct comedi_device * dev);
static comedi_driver driver_aio_iiro_16 = {
driver_name:"aio_iiro_16",
@@ -81,13 +81,13 @@ static comedi_driver driver_aio_iiro_16 = {
num_names:sizeof(aio_iiro_16_boards) / sizeof(aio_iiro_16_board),
};
-static int aio_iiro_16_dio_insn_bits_read(comedi_device * dev,
+static int aio_iiro_16_dio_insn_bits_read(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
-static int aio_iiro_16_dio_insn_bits_write(comedi_device * dev,
+static int aio_iiro_16_dio_insn_bits_write(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
-static int aio_iiro_16_attach(comedi_device * dev, comedi_devconfig * it)
+static int aio_iiro_16_attach(struct comedi_device * dev, comedi_devconfig * it)
{
int iobase;
comedi_subdevice *s;
@@ -132,7 +132,7 @@ static int aio_iiro_16_attach(comedi_device * dev, comedi_devconfig * it)
return 1;
}
-static int aio_iiro_16_detach(comedi_device * dev)
+static int aio_iiro_16_detach(struct comedi_device * dev)
{
printk("comedi%d: aio_iiro_16: remove\n", dev->minor);
@@ -142,7 +142,7 @@ static int aio_iiro_16_detach(comedi_device * dev)
return 0;
}
-static int aio_iiro_16_dio_insn_bits_write(comedi_device * dev,
+static int aio_iiro_16_dio_insn_bits_write(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
@@ -161,7 +161,7 @@ static int aio_iiro_16_dio_insn_bits_write(comedi_device * dev,
return 2;
}
-static int aio_iiro_16_dio_insn_bits_read(comedi_device * dev,
+static int aio_iiro_16_dio_insn_bits_read(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
diff --git a/drivers/staging/comedi/drivers/amplc_dio200.c b/drivers/staging/comedi/drivers/amplc_dio200.c
index 8c8e58f71ec6..642071a92971 100644
--- a/drivers/staging/comedi/drivers/amplc_dio200.c
+++ b/drivers/staging/comedi/drivers/amplc_dio200.c
@@ -436,7 +436,7 @@ MODULE_DEVICE_TABLE(pci, dio200_pci_table);
/* this structure is for data unique to this hardware driver. If
several hardware drivers keep similar information in this structure,
- feel free to suggest moving the variable to the comedi_device struct. */
+ feel free to suggest moving the variable to the struct comedi_device struct. */
typedef struct {
#ifdef CONFIG_COMEDI_PCI
struct pci_dev *pci_dev; /* PCI device */
@@ -473,8 +473,8 @@ typedef struct {
* the board, and also about the kernel module that contains
* the device code.
*/
-static int dio200_attach(comedi_device * dev, comedi_devconfig * it);
-static int dio200_detach(comedi_device * dev);
+static int dio200_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int dio200_detach(struct comedi_device * dev);
static comedi_driver driver_amplc_dio200 = {
driver_name:DIO200_DRIVER_NAME,
module:THIS_MODULE,
@@ -497,7 +497,7 @@ COMEDI_INITCLEANUP(driver_amplc_dio200);
*/
#ifdef CONFIG_COMEDI_PCI
static int
-dio200_find_pci(comedi_device * dev, int bus, int slot,
+dio200_find_pci(struct comedi_device * dev, int bus, int slot,
struct pci_dev **pci_dev_p)
{
struct pci_dev *pci_dev = NULL;
@@ -572,7 +572,7 @@ dio200_request_region(unsigned minor, unsigned long from, unsigned long extent)
* 'insn_bits' function for an 'INTERRUPT' subdevice.
*/
static int
-dio200_subdev_intr_insn_bits(comedi_device * dev, comedi_subdevice * s,
+dio200_subdev_intr_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
dio200_subdev_intr *subpriv = s->private;
@@ -591,7 +591,7 @@ dio200_subdev_intr_insn_bits(comedi_device * dev, comedi_subdevice * s,
/*
* Called to stop acquisition for an 'INTERRUPT' subdevice.
*/
-static void dio200_stop_intr(comedi_device * dev, comedi_subdevice * s)
+static void dio200_stop_intr(struct comedi_device * dev, comedi_subdevice * s)
{
dio200_subdev_intr *subpriv = s->private;
@@ -605,7 +605,7 @@ static void dio200_stop_intr(comedi_device * dev, comedi_subdevice * s)
/*
* Called to start acquisition for an 'INTERRUPT' subdevice.
*/
-static int dio200_start_intr(comedi_device * dev, comedi_subdevice * s)
+static int dio200_start_intr(struct comedi_device * dev, comedi_subdevice * s)
{
unsigned int n;
unsigned isn_bits;
@@ -641,7 +641,7 @@ static int dio200_start_intr(comedi_device * dev, comedi_subdevice * s)
* Internal trigger function to start acquisition for an 'INTERRUPT' subdevice.
*/
static int
-dio200_inttrig_start_intr(comedi_device * dev, comedi_subdevice * s,
+dio200_inttrig_start_intr(struct comedi_device * dev, comedi_subdevice * s,
unsigned int trignum)
{
dio200_subdev_intr *subpriv;
@@ -671,7 +671,7 @@ dio200_inttrig_start_intr(comedi_device * dev, comedi_subdevice * s,
* This is called from the interrupt service routine to handle a read
* scan on an 'INTERRUPT' subdevice.
*/
-static int dio200_handle_read_intr(comedi_device * dev, comedi_subdevice * s)
+static int dio200_handle_read_intr(struct comedi_device * dev, comedi_subdevice * s)
{
dio200_subdev_intr *subpriv = s->private;
unsigned triggered;
@@ -783,7 +783,7 @@ static int dio200_handle_read_intr(comedi_device * dev, comedi_subdevice * s)
/*
* 'cancel' function for an 'INTERRUPT' subdevice.
*/
-static int dio200_subdev_intr_cancel(comedi_device * dev, comedi_subdevice * s)
+static int dio200_subdev_intr_cancel(struct comedi_device * dev, comedi_subdevice * s)
{
dio200_subdev_intr *subpriv = s->private;
unsigned long flags;
@@ -801,7 +801,7 @@ static int dio200_subdev_intr_cancel(comedi_device * dev, comedi_subdevice * s)
* 'do_cmdtest' function for an 'INTERRUPT' subdevice.
*/
static int
-dio200_subdev_intr_cmdtest(comedi_device * dev, comedi_subdevice * s,
+dio200_subdev_intr_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
@@ -907,7 +907,7 @@ dio200_subdev_intr_cmdtest(comedi_device * dev, comedi_subdevice * s,
/*
* 'do_cmd' function for an 'INTERRUPT' subdevice.
*/
-static int dio200_subdev_intr_cmd(comedi_device * dev, comedi_subdevice * s)
+static int dio200_subdev_intr_cmd(struct comedi_device * dev, comedi_subdevice * s)
{
comedi_cmd *cmd = &s->async->cmd;
dio200_subdev_intr *subpriv = s->private;
@@ -953,7 +953,7 @@ static int dio200_subdev_intr_cmd(comedi_device * dev, comedi_subdevice * s)
* This function initializes an 'INTERRUPT' subdevice.
*/
static int
-dio200_subdev_intr_init(comedi_device * dev, comedi_subdevice * s,
+dio200_subdev_intr_init(struct comedi_device * dev, comedi_subdevice * s,
unsigned long iobase, unsigned valid_isns, int has_int_sce)
{
dio200_subdev_intr *subpriv;
@@ -998,7 +998,7 @@ dio200_subdev_intr_init(comedi_device * dev, comedi_subdevice * s,
* This function cleans up an 'INTERRUPT' subdevice.
*/
static void
-dio200_subdev_intr_cleanup(comedi_device * dev, comedi_subdevice * s)
+dio200_subdev_intr_cleanup(struct comedi_device * dev, comedi_subdevice * s)
{
dio200_subdev_intr *subpriv = s->private;
@@ -1012,7 +1012,7 @@ dio200_subdev_intr_cleanup(comedi_device * dev, comedi_subdevice * s)
*/
static irqreturn_t dio200_interrupt(int irq, void *d PT_REGS_ARG)
{
- comedi_device *dev = d;
+ struct comedi_device *dev = d;
int handled;
if (!dev->attached) {
@@ -1033,7 +1033,7 @@ static irqreturn_t dio200_interrupt(int irq, void *d PT_REGS_ARG)
* Handle 'insn_read' for an '8254' counter subdevice.
*/
static int
-dio200_subdev_8254_read(comedi_device * dev, comedi_subdevice * s,
+dio200_subdev_8254_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
dio200_subdev_8254 *subpriv = s->private;
@@ -1048,7 +1048,7 @@ dio200_subdev_8254_read(comedi_device * dev, comedi_subdevice * s,
* Handle 'insn_write' for an '8254' counter subdevice.
*/
static int
-dio200_subdev_8254_write(comedi_device * dev, comedi_subdevice * s,
+dio200_subdev_8254_write(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
dio200_subdev_8254 *subpriv = s->private;
@@ -1142,7 +1142,7 @@ dio200_get_clock_src(dio200_subdev_8254 * subpriv, unsigned int counter_number,
* Handle 'insn_config' for an '8254' counter subdevice.
*/
static int
-dio200_subdev_8254_config(comedi_device * dev, comedi_subdevice * s,
+dio200_subdev_8254_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
dio200_subdev_8254 *subpriv = s->private;
@@ -1194,7 +1194,7 @@ dio200_subdev_8254_config(comedi_device * dev, comedi_subdevice * s,
* offset is the offset to the 8254 chip.
*/
static int
-dio200_subdev_8254_init(comedi_device * dev, comedi_subdevice * s,
+dio200_subdev_8254_init(struct comedi_device * dev, comedi_subdevice * s,
unsigned long iobase, unsigned offset, int has_clk_gat_sce)
{
dio200_subdev_8254 *subpriv;
@@ -1247,7 +1247,7 @@ dio200_subdev_8254_init(comedi_device * dev, comedi_subdevice * s,
* This function cleans up an '8254' counter subdevice.
*/
static void
-dio200_subdev_8254_cleanup(comedi_device * dev, comedi_subdevice * s)
+dio200_subdev_8254_cleanup(struct comedi_device * dev, comedi_subdevice * s)
{
dio200_subdev_intr *subpriv = s->private;
@@ -1262,7 +1262,7 @@ dio200_subdev_8254_cleanup(comedi_device * dev, comedi_subdevice * s)
* in the driver structure, dev->board_ptr contains that
* address.
*/
-static int dio200_attach(comedi_device * dev, comedi_devconfig * it)
+static int dio200_attach(struct comedi_device * dev, comedi_devconfig * it)
{
comedi_subdevice *s;
unsigned long iobase = 0;
@@ -1429,7 +1429,7 @@ static int dio200_attach(comedi_device * dev, comedi_devconfig * it)
* allocated by _attach(). dev->private and dev->subdevices are
* deallocated automatically by the core.
*/
-static int dio200_detach(comedi_device * dev)
+static int dio200_detach(struct comedi_device * dev)
{
const dio200_layout *layout;
unsigned n;
diff --git a/drivers/staging/comedi/drivers/amplc_pc236.c b/drivers/staging/comedi/drivers/amplc_pc236.c
index 8d3fb69176ca..adbd79421d4d 100644
--- a/drivers/staging/comedi/drivers/amplc_pc236.c
+++ b/drivers/staging/comedi/drivers/amplc_pc236.c
@@ -147,7 +147,7 @@ MODULE_DEVICE_TABLE(pci, pc236_pci_table);
/* this structure is for data unique to this hardware driver. If
several hardware drivers keep similar information in this structure,
- feel free to suggest moving the variable to the comedi_device struct. */
+ feel free to suggest moving the variable to the struct comedi_device struct. */
typedef struct {
#ifdef CONFIG_COMEDI_PCI
/* PCI device */
@@ -165,8 +165,8 @@ typedef struct {
* the board, and also about the kernel module that contains
* the device code.
*/
-static int pc236_attach(comedi_device * dev, comedi_devconfig * it);
-static int pc236_detach(comedi_device * dev);
+static int pc236_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int pc236_detach(struct comedi_device * dev);
static comedi_driver driver_amplc_pc236 = {
driver_name:PC236_DRIVER_NAME,
module:THIS_MODULE,
@@ -185,15 +185,15 @@ COMEDI_INITCLEANUP(driver_amplc_pc236);
static int pc236_request_region(unsigned minor, unsigned long from,
unsigned long extent);
-static void pc236_intr_disable(comedi_device * dev);
-static void pc236_intr_enable(comedi_device * dev);
-static int pc236_intr_check(comedi_device * dev);
-static int pc236_intr_insn(comedi_device * dev, comedi_subdevice * s,
+static void pc236_intr_disable(struct comedi_device * dev);
+static void pc236_intr_enable(struct comedi_device * dev);
+static int pc236_intr_check(struct comedi_device * dev);
+static int pc236_intr_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int pc236_intr_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int pc236_intr_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd);
-static int pc236_intr_cmd(comedi_device * dev, comedi_subdevice * s);
-static int pc236_intr_cancel(comedi_device * dev, comedi_subdevice * s);
+static int pc236_intr_cmd(struct comedi_device * dev, comedi_subdevice * s);
+static int pc236_intr_cancel(struct comedi_device * dev, comedi_subdevice * s);
static irqreturn_t pc236_interrupt(int irq, void *d PT_REGS_ARG);
/*
@@ -202,7 +202,7 @@ static irqreturn_t pc236_interrupt(int irq, void *d PT_REGS_ARG);
*/
#ifdef CONFIG_COMEDI_PCI
static int
-pc236_find_pci(comedi_device * dev, int bus, int slot,
+pc236_find_pci(struct comedi_device * dev, int bus, int slot,
struct pci_dev **pci_dev_p)
{
struct pci_dev *pci_dev = NULL;
@@ -264,7 +264,7 @@ pc236_find_pci(comedi_device * dev, int bus, int slot,
* in the driver structure, dev->board_ptr contains that
* address.
*/
-static int pc236_attach(comedi_device * dev, comedi_devconfig * it)
+static int pc236_attach(struct comedi_device * dev, comedi_devconfig * it)
{
comedi_subdevice *s;
unsigned long iobase = 0;
@@ -405,7 +405,7 @@ static int pc236_attach(comedi_device * dev, comedi_devconfig * it)
* allocated by _attach(). dev->private and dev->subdevices are
* deallocated automatically by the core.
*/
-static int pc236_detach(comedi_device * dev)
+static int pc236_detach(struct comedi_device * dev)
{
printk(KERN_DEBUG "comedi%d: %s: detach\n", dev->minor,
PC236_DRIVER_NAME);
@@ -459,7 +459,7 @@ static int pc236_request_region(unsigned minor, unsigned long from,
* configured on subdevice 1) and to physically disable the interrupt
* (not possible on the PC36AT, except by removing the IRQ jumper!).
*/
-static void pc236_intr_disable(comedi_device * dev)
+static void pc236_intr_disable(struct comedi_device * dev)
{
unsigned long flags;
@@ -477,7 +477,7 @@ static void pc236_intr_disable(comedi_device * dev)
* configured on subdevice 1) and to physically enable the interrupt
* (not possible on the PC36AT, except by (re)connecting the IRQ jumper!).
*/
-static void pc236_intr_enable(comedi_device * dev)
+static void pc236_intr_enable(struct comedi_device * dev)
{
unsigned long flags;
@@ -497,7 +497,7 @@ static void pc236_intr_enable(comedi_device * dev)
* interrupt.
* Returns 0 if the interrupt should be ignored.
*/
-static int pc236_intr_check(comedi_device * dev)
+static int pc236_intr_check(struct comedi_device * dev)
{
int retval = 0;
unsigned long flags;
@@ -528,7 +528,7 @@ static int pc236_intr_check(comedi_device * dev)
* Input from subdevice 1.
* Copied from the comedi_parport driver.
*/
-static int pc236_intr_insn(comedi_device * dev, comedi_subdevice * s,
+static int pc236_intr_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
data[1] = 0;
@@ -539,7 +539,7 @@ static int pc236_intr_insn(comedi_device * dev, comedi_subdevice * s,
* Subdevice 1 command test.
* Copied from the comedi_parport driver.
*/
-static int pc236_intr_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int pc236_intr_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
@@ -617,7 +617,7 @@ static int pc236_intr_cmdtest(comedi_device * dev, comedi_subdevice * s,
/*
* Subdevice 1 command.
*/
-static int pc236_intr_cmd(comedi_device * dev, comedi_subdevice * s)
+static int pc236_intr_cmd(struct comedi_device * dev, comedi_subdevice * s)
{
pc236_intr_enable(dev);
@@ -627,7 +627,7 @@ static int pc236_intr_cmd(comedi_device * dev, comedi_subdevice * s)
/*
* Subdevice 1 cancel command.
*/
-static int pc236_intr_cancel(comedi_device * dev, comedi_subdevice * s)
+static int pc236_intr_cancel(struct comedi_device * dev, comedi_subdevice * s)
{
pc236_intr_disable(dev);
@@ -640,7 +640,7 @@ static int pc236_intr_cancel(comedi_device * dev, comedi_subdevice * s)
*/
static irqreturn_t pc236_interrupt(int irq, void *d PT_REGS_ARG)
{
- comedi_device *dev = d;
+ struct comedi_device *dev = d;
comedi_subdevice *s = dev->subdevices + 1;
int handled;
diff --git a/drivers/staging/comedi/drivers/amplc_pc263.c b/drivers/staging/comedi/drivers/amplc_pc263.c
index 4c23b018ce5e..5f4c7e28102b 100644
--- a/drivers/staging/comedi/drivers/amplc_pc263.c
+++ b/drivers/staging/comedi/drivers/amplc_pc263.c
@@ -116,7 +116,7 @@ MODULE_DEVICE_TABLE(pci, pc263_pci_table);
/* this structure is for data unique to this hardware driver. If
several hardware drivers keep similar information in this structure,
- feel free to suggest moving the variable to the comedi_device struct. */
+ feel free to suggest moving the variable to the struct comedi_device struct. */
#ifdef CONFIG_COMEDI_PCI
typedef struct {
/* PCI device. */
@@ -132,8 +132,8 @@ typedef struct {
* the board, and also about the kernel module that contains
* the device code.
*/
-static int pc263_attach(comedi_device * dev, comedi_devconfig * it);
-static int pc263_detach(comedi_device * dev);
+static int pc263_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int pc263_detach(struct comedi_device * dev);
static comedi_driver driver_amplc_pc263 = {
driver_name:PC263_DRIVER_NAME,
module:THIS_MODULE,
@@ -146,9 +146,9 @@ static comedi_driver driver_amplc_pc263 = {
static int pc263_request_region(unsigned minor, unsigned long from,
unsigned long extent);
-static int pc263_dio_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int pc263_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int pc263_dio_insn_config(comedi_device * dev, comedi_subdevice * s,
+static int pc263_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
/*
@@ -157,7 +157,7 @@ static int pc263_dio_insn_config(comedi_device * dev, comedi_subdevice * s,
*/
#ifdef CONFIG_COMEDI_PCI
static int
-pc263_find_pci(comedi_device * dev, int bus, int slot,
+pc263_find_pci(struct comedi_device * dev, int bus, int slot,
struct pci_dev **pci_dev_p)
{
struct pci_dev *pci_dev = NULL;
@@ -219,7 +219,7 @@ pc263_find_pci(comedi_device * dev, int bus, int slot,
* in the driver structure, dev->board_ptr contains that
* address.
*/
-static int pc263_attach(comedi_device * dev, comedi_devconfig * it)
+static int pc263_attach(struct comedi_device * dev, comedi_devconfig * it)
{
comedi_subdevice *s;
unsigned long iobase = 0;
@@ -337,7 +337,7 @@ static int pc263_attach(comedi_device * dev, comedi_devconfig * it)
* allocated by _attach(). dev->private and dev->subdevices are
* deallocated automatically by the core.
*/
-static int pc263_detach(comedi_device * dev)
+static int pc263_detach(struct comedi_device * dev)
{
printk(KERN_DEBUG "comedi%d: %s: detach\n", dev->minor,
PC263_DRIVER_NAME);
@@ -387,7 +387,7 @@ static int pc263_request_region(unsigned minor, unsigned long from,
* useful to applications if you implement the insn_bits interface.
* This allows packed reading/writing of the DIO channels. The
* comedi core can convert between insn_bits and insn_read/write */
-static int pc263_dio_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int pc263_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
@@ -412,7 +412,7 @@ static int pc263_dio_insn_bits(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int pc263_dio_insn_config(comedi_device * dev, comedi_subdevice * s,
+static int pc263_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 1)
diff --git a/drivers/staging/comedi/drivers/amplc_pci224.c b/drivers/staging/comedi/drivers/amplc_pci224.c
index b936ccf9bb4d..afb110a868e2 100644
--- a/drivers/staging/comedi/drivers/amplc_pci224.c
+++ b/drivers/staging/comedi/drivers/amplc_pci224.c
@@ -397,7 +397,7 @@ MODULE_DEVICE_TABLE(pci, pci224_pci_table);
/* this structure is for data unique to this hardware driver. If
several hardware drivers keep similar information in this structure,
- feel free to suggest moving the variable to the comedi_device struct. */
+ feel free to suggest moving the variable to the struct comedi_device struct. */
typedef struct {
struct pci_dev *pci_dev; /* PCI device */
const unsigned short *hwrange;
@@ -426,8 +426,8 @@ typedef struct {
* the board, and also about the kernel module that contains
* the device code.
*/
-static int pci224_attach(comedi_device * dev, comedi_devconfig * it);
-static int pci224_detach(comedi_device * dev);
+static int pci224_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int pci224_detach(struct comedi_device * dev);
static comedi_driver driver_amplc_pci224 = {
driver_name:DRIVER_NAME,
module:THIS_MODULE,
@@ -444,7 +444,7 @@ COMEDI_PCI_INITCLEANUP(driver_amplc_pci224, pci224_pci_table);
* Called from the 'insn_write' function to perform a single write.
*/
static void
-pci224_ao_set_data(comedi_device * dev, int chan, int range, unsigned int data)
+pci224_ao_set_data(struct comedi_device * dev, int chan, int range, unsigned int data)
{
unsigned short mangled;
@@ -477,7 +477,7 @@ pci224_ao_set_data(comedi_device * dev, int chan, int range, unsigned int data)
* 'insn_write' function for AO subdevice.
*/
static int
-pci224_ao_insn_write(comedi_device * dev, comedi_subdevice * s,
+pci224_ao_insn_write(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
@@ -504,7 +504,7 @@ pci224_ao_insn_write(comedi_device * dev, comedi_subdevice * s,
* command.
*/
static int
-pci224_ao_insn_read(comedi_device * dev, comedi_subdevice * s,
+pci224_ao_insn_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
@@ -532,7 +532,7 @@ pci224_cascade_ns_to_timer(int osc_base, unsigned int *d1, unsigned int *d2,
/*
* Kills a command running on the AO subdevice.
*/
-static void pci224_ao_stop(comedi_device * dev, comedi_subdevice * s)
+static void pci224_ao_stop(struct comedi_device * dev, comedi_subdevice * s)
{
unsigned long flags;
@@ -572,7 +572,7 @@ static void pci224_ao_stop(comedi_device * dev, comedi_subdevice * s)
/*
* Handles start of acquisition for the AO subdevice.
*/
-static void pci224_ao_start(comedi_device * dev, comedi_subdevice * s)
+static void pci224_ao_start(struct comedi_device * dev, comedi_subdevice * s)
{
comedi_cmd *cmd = &s->async->cmd;
unsigned long flags;
@@ -599,7 +599,7 @@ static void pci224_ao_start(comedi_device * dev, comedi_subdevice * s)
/*
* Handles interrupts from the DAC FIFO.
*/
-static void pci224_ao_handle_fifo(comedi_device * dev, comedi_subdevice * s)
+static void pci224_ao_handle_fifo(struct comedi_device * dev, comedi_subdevice * s)
{
comedi_cmd *cmd = &s->async->cmd;
unsigned int num_scans;
@@ -728,7 +728,7 @@ static void pci224_ao_handle_fifo(comedi_device * dev, comedi_subdevice * s)
* Internal trigger function to start acquisition on AO subdevice.
*/
static int
-pci224_ao_inttrig_start(comedi_device * dev, comedi_subdevice * s,
+pci224_ao_inttrig_start(struct comedi_device * dev, comedi_subdevice * s,
unsigned int trignum)
{
if (trignum != 0)
@@ -748,7 +748,7 @@ pci224_ao_inttrig_start(comedi_device * dev, comedi_subdevice * s,
* 'do_cmdtest' function for AO subdevice.
*/
static int
-pci224_ao_cmdtest(comedi_device * dev, comedi_subdevice * s, comedi_cmd * cmd)
+pci224_ao_cmdtest(struct comedi_device * dev, comedi_subdevice * s, comedi_cmd * cmd)
{
int err = 0;
unsigned int tmp;
@@ -1015,7 +1015,7 @@ pci224_ao_cmdtest(comedi_device * dev, comedi_subdevice * s, comedi_cmd * cmd)
/*
* 'do_cmd' function for AO subdevice.
*/
-static int pci224_ao_cmd(comedi_device * dev, comedi_subdevice * s)
+static int pci224_ao_cmd(struct comedi_device * dev, comedi_subdevice * s)
{
comedi_cmd *cmd = &s->async->cmd;
int range;
@@ -1172,7 +1172,7 @@ static int pci224_ao_cmd(comedi_device * dev, comedi_subdevice * s)
/*
* 'cancel' function for AO subdevice.
*/
-static int pci224_ao_cancel(comedi_device * dev, comedi_subdevice * s)
+static int pci224_ao_cancel(struct comedi_device * dev, comedi_subdevice * s)
{
pci224_ao_stop(dev, s);
return 0;
@@ -1182,7 +1182,7 @@ static int pci224_ao_cancel(comedi_device * dev, comedi_subdevice * s)
* 'munge' data for AO command.
*/
static void
-pci224_ao_munge(comedi_device * dev, comedi_subdevice * s, void *data,
+pci224_ao_munge(struct comedi_device * dev, comedi_subdevice * s, void *data,
unsigned int num_bytes, unsigned int chan_index)
{
comedi_async *async = s->async;
@@ -1214,7 +1214,7 @@ pci224_ao_munge(comedi_device * dev, comedi_subdevice * s, void *data,
*/
static irqreturn_t pci224_interrupt(int irq, void *d PT_REGS_ARG)
{
- comedi_device *dev = d;
+ struct comedi_device *dev = d;
comedi_subdevice *s = &dev->subdevices[0];
comedi_cmd *cmd;
unsigned char intstat, valid_intstat;
@@ -1264,7 +1264,7 @@ static irqreturn_t pci224_interrupt(int irq, void *d PT_REGS_ARG)
* bus and slot.
*/
static int
-pci224_find_pci(comedi_device * dev, int bus, int slot,
+pci224_find_pci(struct comedi_device * dev, int bus, int slot,
struct pci_dev **pci_dev_p)
{
struct pci_dev *pci_dev = NULL;
@@ -1323,7 +1323,7 @@ pci224_find_pci(comedi_device * dev, int bus, int slot,
* in the driver structure, dev->board_ptr contains that
* address.
*/
-static int pci224_attach(comedi_device * dev, comedi_devconfig * it)
+static int pci224_attach(struct comedi_device * dev, comedi_devconfig * it)
{
comedi_subdevice *s;
struct pci_dev *pci_dev;
@@ -1503,7 +1503,7 @@ static int pci224_attach(comedi_device * dev, comedi_devconfig * it)
* allocated by _attach(). dev->private and dev->subdevices are
* deallocated automatically by the core.
*/
-static int pci224_detach(comedi_device * dev)
+static int pci224_detach(struct comedi_device * dev)
{
printk(KERN_DEBUG "comedi%d: %s: detach\n", dev->minor, DRIVER_NAME);
diff --git a/drivers/staging/comedi/drivers/amplc_pci230.c b/drivers/staging/comedi/drivers/amplc_pci230.c
index 4463e9803e08..c66a840085f7 100644
--- a/drivers/staging/comedi/drivers/amplc_pci230.c
+++ b/drivers/staging/comedi/drivers/amplc_pci230.c
@@ -515,7 +515,7 @@ MODULE_DEVICE_TABLE(pci, pci230_pci_table);
/* this structure is for data unique to this hardware driver. If
several hardware drivers keep similar information in this structure,
- feel free to suggest moving the variable to the comedi_device struct. */
+ feel free to suggest moving the variable to the struct comedi_device struct. */
struct pci230_private {
struct pci_dev *pci_dev;
spinlock_t isr_spinlock; /* Interrupt spin lock */
@@ -601,8 +601,8 @@ static const unsigned char pci230_ao_bipolar[2] = { 0, 1 };
* the board, and also about the kernel module that contains
* the device code.
*/
-static int pci230_attach(comedi_device * dev, comedi_devconfig * it);
-static int pci230_detach(comedi_device * dev);
+static int pci230_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int pci230_detach(struct comedi_device * dev);
static comedi_driver driver_amplc_pci230 = {
driver_name:"amplc_pci230",
module:THIS_MODULE,
@@ -615,32 +615,32 @@ static comedi_driver driver_amplc_pci230 = {
COMEDI_PCI_INITCLEANUP(driver_amplc_pci230, pci230_pci_table);
-static int pci230_ai_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int pci230_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int pci230_ao_winsn(comedi_device * dev, comedi_subdevice * s,
+static int pci230_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int pci230_ao_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int pci230_ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static void pci230_ct_setup_ns_mode(comedi_device * dev, unsigned int ct,
+static void pci230_ct_setup_ns_mode(struct comedi_device * dev, unsigned int ct,
unsigned int mode, uint64_t ns, unsigned int round);
static void pci230_ns_to_single_timer(unsigned int *ns, unsigned int round);
-static void pci230_cancel_ct(comedi_device * dev, unsigned int ct);
+static void pci230_cancel_ct(struct comedi_device * dev, unsigned int ct);
static irqreturn_t pci230_interrupt(int irq, void *d PT_REGS_ARG);
-static int pci230_ao_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int pci230_ao_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd);
-static int pci230_ao_cmd(comedi_device * dev, comedi_subdevice * s);
-static int pci230_ao_cancel(comedi_device * dev, comedi_subdevice * s);
-static void pci230_ao_stop(comedi_device * dev, comedi_subdevice * s);
-static void pci230_handle_ao_nofifo(comedi_device * dev, comedi_subdevice * s);
-static int pci230_handle_ao_fifo(comedi_device * dev, comedi_subdevice * s);
-static int pci230_ai_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int pci230_ao_cmd(struct comedi_device * dev, comedi_subdevice * s);
+static int pci230_ao_cancel(struct comedi_device * dev, comedi_subdevice * s);
+static void pci230_ao_stop(struct comedi_device * dev, comedi_subdevice * s);
+static void pci230_handle_ao_nofifo(struct comedi_device * dev, comedi_subdevice * s);
+static int pci230_handle_ao_fifo(struct comedi_device * dev, comedi_subdevice * s);
+static int pci230_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd);
-static int pci230_ai_cmd(comedi_device * dev, comedi_subdevice * s);
-static int pci230_ai_cancel(comedi_device * dev, comedi_subdevice * s);
-static void pci230_ai_stop(comedi_device * dev, comedi_subdevice * s);
-static void pci230_handle_ai(comedi_device * dev, comedi_subdevice * s);
+static int pci230_ai_cmd(struct comedi_device * dev, comedi_subdevice * s);
+static int pci230_ai_cancel(struct comedi_device * dev, comedi_subdevice * s);
+static void pci230_ai_stop(struct comedi_device * dev, comedi_subdevice * s);
+static void pci230_handle_ai(struct comedi_device * dev, comedi_subdevice * s);
-static short pci230_ai_read(comedi_device * dev)
+static short pci230_ai_read(struct comedi_device * dev)
{
/* Read sample. */
short data = (short) inw(dev->iobase + PCI230_ADCDATA);
@@ -658,7 +658,7 @@ static short pci230_ai_read(comedi_device * dev)
return data;
}
-static inline unsigned short pci230_ao_mangle_datum(comedi_device * dev,
+static inline unsigned short pci230_ao_mangle_datum(struct comedi_device * dev,
short datum)
{
/* If a bipolar range was specified, mangle it (straight binary->twos
@@ -674,7 +674,7 @@ static inline unsigned short pci230_ao_mangle_datum(comedi_device * dev,
return (unsigned short)datum;
}
-static inline void pci230_ao_write_nofifo(comedi_device * dev, short datum,
+static inline void pci230_ao_write_nofifo(struct comedi_device * dev, short datum,
unsigned int chan)
{
/* Store unmangled datum to be read back later. */
@@ -685,7 +685,7 @@ static inline void pci230_ao_write_nofifo(comedi_device * dev, short datum,
? PCI230_DACOUT1 : PCI230_DACOUT2));
}
-static inline void pci230_ao_write_fifo(comedi_device * dev, short datum,
+static inline void pci230_ao_write_fifo(struct comedi_device * dev, short datum,
unsigned int chan)
{
/* Store unmangled datum to be read back later. */
@@ -702,7 +702,7 @@ static inline void pci230_ao_write_fifo(comedi_device * dev, short datum,
* in the driver structure, dev->board_ptr contains that
* address.
*/
-static int pci230_attach(comedi_device * dev, comedi_devconfig * it)
+static int pci230_attach(struct comedi_device * dev, comedi_devconfig * it)
{
comedi_subdevice *s;
unsigned long iobase1, iobase2;
@@ -959,7 +959,7 @@ static int pci230_attach(comedi_device * dev, comedi_devconfig * it)
* allocated by _attach(). dev->private and dev->subdevices are
* deallocated automatically by the core.
*/
-static int pci230_detach(comedi_device * dev)
+static int pci230_detach(struct comedi_device * dev)
{
printk("comedi%d: amplc_pci230: remove\n", dev->minor);
@@ -982,7 +982,7 @@ static int pci230_detach(comedi_device * dev)
return 0;
}
-static int get_resources(comedi_device * dev, unsigned int res_mask,
+static int get_resources(struct comedi_device * dev, unsigned int res_mask,
unsigned char owner)
{
int ok;
@@ -1018,13 +1018,13 @@ static int get_resources(comedi_device * dev, unsigned int res_mask,
return ok;
}
-static inline int get_one_resource(comedi_device * dev, unsigned int resource,
+static inline int get_one_resource(struct comedi_device * dev, unsigned int resource,
unsigned char owner)
{
return get_resources(dev, (1U << resource), owner);
}
-static void put_resources(comedi_device * dev, unsigned int res_mask,
+static void put_resources(struct comedi_device * dev, unsigned int res_mask,
unsigned char owner)
{
unsigned int i;
@@ -1044,13 +1044,13 @@ static void put_resources(comedi_device * dev, unsigned int res_mask,
comedi_spin_unlock_irqrestore(&devpriv->res_spinlock, irqflags);
}
-static inline void put_one_resource(comedi_device * dev, unsigned int resource,
+static inline void put_one_resource(struct comedi_device * dev, unsigned int resource,
unsigned char owner)
{
put_resources(dev, (1U << resource), owner);
}
-static inline void put_all_resources(comedi_device * dev, unsigned char owner)
+static inline void put_all_resources(struct comedi_device * dev, unsigned char owner)
{
put_resources(dev, (1U << NUM_RESOURCES) - 1, owner);
}
@@ -1058,7 +1058,7 @@ static inline void put_all_resources(comedi_device * dev, unsigned char owner)
/*
* COMEDI_SUBD_AI instruction;
*/
-static int pci230_ai_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int pci230_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int n, i;
@@ -1163,7 +1163,7 @@ static int pci230_ai_rinsn(comedi_device * dev, comedi_subdevice * s,
/*
* COMEDI_SUBD_AO instructions;
*/
-static int pci230_ao_winsn(comedi_device * dev, comedi_subdevice * s,
+static int pci230_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
@@ -1191,7 +1191,7 @@ static int pci230_ao_winsn(comedi_device * dev, comedi_subdevice * s,
/* AO subdevices should have a read insn as well as a write insn.
* Usually this means copying a value stored in devpriv. */
-static int pci230_ao_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int pci230_ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
@@ -1203,7 +1203,7 @@ static int pci230_ao_rinsn(comedi_device * dev, comedi_subdevice * s,
return i;
}
-static int pci230_ao_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int pci230_ao_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
@@ -1416,7 +1416,7 @@ static int pci230_ao_cmdtest(comedi_device * dev, comedi_subdevice * s,
return 0;
}
-static int pci230_ao_inttrig_scan_begin(comedi_device * dev,
+static int pci230_ao_inttrig_scan_begin(struct comedi_device * dev,
comedi_subdevice * s, unsigned int trig_num)
{
unsigned long irqflags;
@@ -1448,7 +1448,7 @@ static int pci230_ao_inttrig_scan_begin(comedi_device * dev,
return 1;
}
-static void pci230_ao_start(comedi_device * dev, comedi_subdevice * s)
+static void pci230_ao_start(struct comedi_device * dev, comedi_subdevice * s)
{
comedi_async *async = s->async;
comedi_cmd *cmd = &async->cmd;
@@ -1536,7 +1536,7 @@ static void pci230_ao_start(comedi_device * dev, comedi_subdevice * s)
}
}
-static int pci230_ao_inttrig_start(comedi_device * dev, comedi_subdevice * s,
+static int pci230_ao_inttrig_start(struct comedi_device * dev, comedi_subdevice * s,
unsigned int trig_num)
{
if (trig_num != 0)
@@ -1548,7 +1548,7 @@ static int pci230_ao_inttrig_start(comedi_device * dev, comedi_subdevice * s,
return 1;
}
-static int pci230_ao_cmd(comedi_device * dev, comedi_subdevice * s)
+static int pci230_ao_cmd(struct comedi_device * dev, comedi_subdevice * s)
{
unsigned short daccon;
unsigned int range;
@@ -1648,7 +1648,7 @@ static int pci230_ai_check_scan_period(comedi_cmd * cmd)
return !err;
}
-static int pci230_ai_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int pci230_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
@@ -2034,7 +2034,7 @@ static int pci230_ai_cmdtest(comedi_device * dev, comedi_subdevice * s,
return 0;
}
-static void pci230_ai_update_fifo_trigger_level(comedi_device * dev,
+static void pci230_ai_update_fifo_trigger_level(struct comedi_device * dev,
comedi_subdevice * s)
{
comedi_cmd *cmd = &s->async->cmd;
@@ -2078,7 +2078,7 @@ static void pci230_ai_update_fifo_trigger_level(comedi_device * dev,
}
}
-static int pci230_ai_inttrig_convert(comedi_device * dev, comedi_subdevice * s,
+static int pci230_ai_inttrig_convert(struct comedi_device * dev, comedi_subdevice * s,
unsigned int trig_num)
{
unsigned long irqflags;
@@ -2121,7 +2121,7 @@ static int pci230_ai_inttrig_convert(comedi_device * dev, comedi_subdevice * s,
return 1;
}
-static int pci230_ai_inttrig_scan_begin(comedi_device * dev,
+static int pci230_ai_inttrig_scan_begin(struct comedi_device * dev,
comedi_subdevice * s, unsigned int trig_num)
{
unsigned long irqflags;
@@ -2143,7 +2143,7 @@ static int pci230_ai_inttrig_scan_begin(comedi_device * dev,
return 1;
}
-static void pci230_ai_start(comedi_device * dev, comedi_subdevice * s)
+static void pci230_ai_start(struct comedi_device * dev, comedi_subdevice * s)
{
unsigned long irqflags;
unsigned short conv;
@@ -2280,7 +2280,7 @@ static void pci230_ai_start(comedi_device * dev, comedi_subdevice * s)
}
}
-static int pci230_ai_inttrig_start(comedi_device * dev, comedi_subdevice * s,
+static int pci230_ai_inttrig_start(struct comedi_device * dev, comedi_subdevice * s,
unsigned int trig_num)
{
if (trig_num != 0)
@@ -2292,7 +2292,7 @@ static int pci230_ai_inttrig_start(comedi_device * dev, comedi_subdevice * s,
return 1;
}
-static int pci230_ai_cmd(comedi_device * dev, comedi_subdevice * s)
+static int pci230_ai_cmd(struct comedi_device * dev, comedi_subdevice * s)
{
unsigned int i, chan, range, diff;
unsigned int res_mask;
@@ -2532,7 +2532,7 @@ static void pci230_ns_to_single_timer(unsigned int *ns, unsigned int round)
return;
}
-static void pci230_ct_setup_ns_mode(comedi_device * dev, unsigned int ct,
+static void pci230_ct_setup_ns_mode(struct comedi_device * dev, unsigned int ct,
unsigned int mode, uint64_t ns, unsigned int round)
{
unsigned int clk_src;
@@ -2551,7 +2551,7 @@ static void pci230_ct_setup_ns_mode(comedi_device * dev, unsigned int ct,
i8254_write(devpriv->iobase1 + PCI230_Z2_CT_BASE, 0, ct, count);
}
-static void pci230_cancel_ct(comedi_device * dev, unsigned int ct)
+static void pci230_cancel_ct(struct comedi_device * dev, unsigned int ct)
{
i8254_set_mode(devpriv->iobase1 + PCI230_Z2_CT_BASE, 0, ct,
I8254_MODE1);
@@ -2562,7 +2562,7 @@ static void pci230_cancel_ct(comedi_device * dev, unsigned int ct)
static irqreturn_t pci230_interrupt(int irq, void *d PT_REGS_ARG)
{
unsigned char status_int, valid_status_int;
- comedi_device *dev = (comedi_device *) d;
+ struct comedi_device *dev = (struct comedi_device *) d;
comedi_subdevice *s;
unsigned long irqflags;
@@ -2622,7 +2622,7 @@ static irqreturn_t pci230_interrupt(int irq, void *d PT_REGS_ARG)
return IRQ_HANDLED;
}
-static void pci230_handle_ao_nofifo(comedi_device * dev, comedi_subdevice * s)
+static void pci230_handle_ao_nofifo(struct comedi_device * dev, comedi_subdevice * s)
{
short data;
int i, ret;
@@ -2659,7 +2659,7 @@ static void pci230_handle_ao_nofifo(comedi_device * dev, comedi_subdevice * s)
/* Loads DAC FIFO (if using it) from buffer. */
/* Returns 0 if AO finished due to completion or error, 1 if still going. */
-static int pci230_handle_ao_fifo(comedi_device * dev, comedi_subdevice * s)
+static int pci230_handle_ao_fifo(struct comedi_device * dev, comedi_subdevice * s)
{
comedi_async *async = s->async;
comedi_cmd *cmd = &async->cmd;
@@ -2762,7 +2762,7 @@ static int pci230_handle_ao_fifo(comedi_device * dev, comedi_subdevice * s)
return running;
}
-static void pci230_handle_ai(comedi_device * dev, comedi_subdevice * s)
+static void pci230_handle_ai(struct comedi_device * dev, comedi_subdevice * s)
{
unsigned int events = 0;
unsigned int status_fifo;
@@ -2861,7 +2861,7 @@ static void pci230_handle_ai(comedi_device * dev, comedi_subdevice * s)
}
}
-static void pci230_ao_stop(comedi_device * dev, comedi_subdevice * s)
+static void pci230_ao_stop(struct comedi_device * dev, comedi_subdevice * s)
{
unsigned long irqflags;
unsigned char intsrc;
@@ -2916,13 +2916,13 @@ static void pci230_ao_stop(comedi_device * dev, comedi_subdevice * s)
put_all_resources(dev, OWNER_AOCMD);
}
-static int pci230_ao_cancel(comedi_device * dev, comedi_subdevice * s)
+static int pci230_ao_cancel(struct comedi_device * dev, comedi_subdevice * s)
{
pci230_ao_stop(dev, s);
return 0;
}
-static void pci230_ai_stop(comedi_device * dev, comedi_subdevice * s)
+static void pci230_ai_stop(struct comedi_device * dev, comedi_subdevice * s)
{
unsigned long irqflags;
comedi_cmd *cmd;
@@ -2970,7 +2970,7 @@ static void pci230_ai_stop(comedi_device * dev, comedi_subdevice * s)
put_all_resources(dev, OWNER_AICMD);
}
-static int pci230_ai_cancel(comedi_device * dev, comedi_subdevice * s)
+static int pci230_ai_cancel(struct comedi_device * dev, comedi_subdevice * s)
{
pci230_ai_stop(dev, s);
return 0;
diff --git a/drivers/staging/comedi/drivers/c6xdigio.c b/drivers/staging/comedi/drivers/c6xdigio.c
index 5837770ac5b2..bf8562b3023f 100644
--- a/drivers/staging/comedi/drivers/c6xdigio.c
+++ b/drivers/staging/comedi/drivers/c6xdigio.c
@@ -97,8 +97,8 @@ union encvaluetype {
#define C6XDIGIO_TIME_OUT 20
-static int c6xdigio_attach(comedi_device * dev, comedi_devconfig * it);
-static int c6xdigio_detach(comedi_device * dev);
+static int c6xdigio_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int c6xdigio_detach(struct comedi_device * dev);
comedi_driver driver_c6xdigio = {
driver_name:"c6xdigio",
module:THIS_MODULE,
@@ -338,14 +338,14 @@ static void C6X_encResetAll(unsigned long baseAddr)
}
}
-static int c6xdigio_pwmo_insn_read(comedi_device * dev,
+static int c6xdigio_pwmo_insn_read(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
printk("c6xdigio_pwmo_insn_read %x\n", insn->n);
return insn->n;
}
-static int c6xdigio_pwmo_insn_write(comedi_device * dev,
+static int c6xdigio_pwmo_insn_write(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
int i;
@@ -359,7 +359,7 @@ static int c6xdigio_pwmo_insn_write(comedi_device * dev,
return i;
}
-//static int c6xdigio_ei_init_insn_read(comedi_device *dev,
+//static int c6xdigio_ei_init_insn_read(struct comedi_device *dev,
// comedi_subdevice *s,
// comedi_insn *insn,
// unsigned int *data)
@@ -368,7 +368,7 @@ static int c6xdigio_pwmo_insn_write(comedi_device * dev,
// return insn->n;
//}
-//static int c6xdigio_ei_init_insn_write(comedi_device *dev,
+//static int c6xdigio_ei_init_insn_write(struct comedi_device *dev,
// comedi_subdevice *s,
// comedi_insn *insn,
// unsigned int *data)
@@ -381,7 +381,7 @@ static int c6xdigio_pwmo_insn_write(comedi_device * dev,
// return insn->n;
//}
-static int c6xdigio_ei_insn_read(comedi_device * dev,
+static int c6xdigio_ei_insn_read(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
// printk("c6xdigio_ei__insn_read %x\n", insn->n);
@@ -395,7 +395,7 @@ static int c6xdigio_ei_insn_read(comedi_device * dev,
return n;
}
-static void board_init(comedi_device * dev)
+static void board_init(struct comedi_device * dev)
{
//printk("Inside board_init\n");
@@ -405,7 +405,7 @@ static void board_init(comedi_device * dev)
}
-//static void board_halt(comedi_device *dev) {
+//static void board_halt(struct comedi_device *dev) {
// C6X_pwmInit(dev->iobase);
//}
@@ -428,7 +428,7 @@ static struct pnp_driver c6xdigio_pnp_driver = {
.id_table = c6xdigio_pnp_tbl,
};
-static int c6xdigio_attach(comedi_device * dev, comedi_devconfig * it)
+static int c6xdigio_attach(struct comedi_device * dev, comedi_devconfig * it)
{
int result = 0;
unsigned long iobase;
@@ -497,7 +497,7 @@ static int c6xdigio_attach(comedi_device * dev, comedi_devconfig * it)
return 0;
}
-static int c6xdigio_detach(comedi_device * dev)
+static int c6xdigio_detach(struct comedi_device * dev)
{
// board_halt(dev); // may not need this
diff --git a/drivers/staging/comedi/drivers/cb_das16_cs.c b/drivers/staging/comedi/drivers/cb_das16_cs.c
index 827954971c1a..b45a1771bd0d 100644
--- a/drivers/staging/comedi/drivers/cb_das16_cs.c
+++ b/drivers/staging/comedi/drivers/cb_das16_cs.c
@@ -89,8 +89,8 @@ typedef struct {
} das16cs_private;
#define devpriv ((das16cs_private *)dev->private)
-static int das16cs_attach(comedi_device * dev, comedi_devconfig * it);
-static int das16cs_detach(comedi_device * dev);
+static int das16cs_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int das16cs_detach(struct comedi_device * dev);
static comedi_driver driver_das16cs = {
driver_name:"cb_das16_cs",
module:THIS_MODULE,
@@ -109,25 +109,25 @@ static const comedi_lrange das16cs_ai_range = { 4, {
};
static irqreturn_t das16cs_interrupt(int irq, void *d PT_REGS_ARG);
-static int das16cs_ai_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int das16cs_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int das16cs_ai_cmd(comedi_device * dev, comedi_subdevice * s);
-static int das16cs_ai_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int das16cs_ai_cmd(struct comedi_device * dev, comedi_subdevice * s);
+static int das16cs_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd);
-static int das16cs_ao_winsn(comedi_device * dev, comedi_subdevice * s,
+static int das16cs_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int das16cs_ao_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int das16cs_ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int das16cs_dio_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int das16cs_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int das16cs_dio_insn_config(comedi_device * dev, comedi_subdevice * s,
+static int das16cs_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int das16cs_timer_insn_read(comedi_device * dev, comedi_subdevice * s,
+static int das16cs_timer_insn_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int das16cs_timer_insn_config(comedi_device * dev, comedi_subdevice * s,
+static int das16cs_timer_insn_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int get_prodid(comedi_device * dev, struct pcmcia_device *link)
+static int get_prodid(struct comedi_device * dev, struct pcmcia_device *link)
{
tuple_t tuple;
u_short buf[128];
@@ -146,7 +146,7 @@ static int get_prodid(comedi_device * dev, struct pcmcia_device *link)
return prodid;
}
-static const das16cs_board *das16cs_probe(comedi_device * dev,
+static const das16cs_board *das16cs_probe(struct comedi_device * dev,
struct pcmcia_device *link)
{
int id;
@@ -165,7 +165,7 @@ static const das16cs_board *das16cs_probe(comedi_device * dev,
return NULL;
}
-static int das16cs_attach(comedi_device * dev, comedi_devconfig * it)
+static int das16cs_attach(struct comedi_device * dev, comedi_devconfig * it)
{
struct pcmcia_device *link;
comedi_subdevice *s;
@@ -265,7 +265,7 @@ static int das16cs_attach(comedi_device * dev, comedi_devconfig * it)
return 1;
}
-static int das16cs_detach(comedi_device * dev)
+static int das16cs_detach(struct comedi_device * dev)
{
printk("comedi%d: das16cs: remove\n", dev->minor);
@@ -278,7 +278,7 @@ static int das16cs_detach(comedi_device * dev)
static irqreturn_t das16cs_interrupt(int irq, void *d PT_REGS_ARG)
{
- //comedi_device *dev = d;
+ //struct comedi_device *dev = d;
return IRQ_HANDLED;
}
@@ -286,7 +286,7 @@ static irqreturn_t das16cs_interrupt(int irq, void *d PT_REGS_ARG)
* "instructions" read/write data in "one-shot" or "software-triggered"
* mode.
*/
-static int das16cs_ai_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int das16cs_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
@@ -328,12 +328,12 @@ static int das16cs_ai_rinsn(comedi_device * dev, comedi_subdevice * s,
return i;
}
-static int das16cs_ai_cmd(comedi_device * dev, comedi_subdevice * s)
+static int das16cs_ai_cmd(struct comedi_device * dev, comedi_subdevice * s)
{
return -EINVAL;
}
-static int das16cs_ai_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int das16cs_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
@@ -489,7 +489,7 @@ static int das16cs_ai_cmdtest(comedi_device * dev, comedi_subdevice * s,
return 0;
}
-static int das16cs_ao_winsn(comedi_device * dev, comedi_subdevice * s,
+static int das16cs_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
@@ -535,7 +535,7 @@ static int das16cs_ao_winsn(comedi_device * dev, comedi_subdevice * s,
/* AO subdevices should have a read insn as well as a write insn.
* Usually this means copying a value stored in devpriv. */
-static int das16cs_ao_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int das16cs_ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
@@ -552,7 +552,7 @@ static int das16cs_ao_rinsn(comedi_device * dev, comedi_subdevice * s,
* useful to applications if you implement the insn_bits interface.
* This allows packed reading/writing of the DIO channels. The
* comedi core can convert between insn_bits and insn_read/write */
-static int das16cs_dio_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int das16cs_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
@@ -572,7 +572,7 @@ static int das16cs_dio_insn_bits(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int das16cs_dio_insn_config(comedi_device * dev, comedi_subdevice * s,
+static int das16cs_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int chan = CR_CHAN(insn->chanspec);
@@ -610,13 +610,13 @@ static int das16cs_dio_insn_config(comedi_device * dev, comedi_subdevice * s,
return insn->n;
}
-static int das16cs_timer_insn_read(comedi_device * dev, comedi_subdevice * s,
+static int das16cs_timer_insn_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
return -EINVAL;
}
-static int das16cs_timer_insn_config(comedi_device * dev, comedi_subdevice * s,
+static int das16cs_timer_insn_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
return -EINVAL;
diff --git a/drivers/staging/comedi/drivers/cb_pcidas.c b/drivers/staging/comedi/drivers/cb_pcidas.c
index c98fb6de3d41..7a3564e51244 100644
--- a/drivers/staging/comedi/drivers/cb_pcidas.c
+++ b/drivers/staging/comedi/drivers/cb_pcidas.c
@@ -398,7 +398,7 @@ MODULE_DEVICE_TABLE(pci, cb_pcidas_pci_table);
/* this structure is for data unique to this hardware driver. If
several hardware drivers keep similar information in this structure,
- feel free to suggest moving the variable to the comedi_device struct. */
+ feel free to suggest moving the variable to the struct comedi_device struct. */
typedef struct {
/* would be useful for a PCI device */
struct pci_dev *pci_dev;
@@ -440,8 +440,8 @@ typedef struct {
* the board, and also about the kernel module that contains
* the device code.
*/
-static int cb_pcidas_attach(comedi_device * dev, comedi_devconfig * it);
-static int cb_pcidas_detach(comedi_device * dev);
+static int cb_pcidas_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int cb_pcidas_detach(struct comedi_device * dev);
static comedi_driver driver_cb_pcidas = {
driver_name:"cb_pcidas",
module:THIS_MODULE,
@@ -449,56 +449,56 @@ static comedi_driver driver_cb_pcidas = {
detach:cb_pcidas_detach,
};
-static int cb_pcidas_ai_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int cb_pcidas_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int ai_config_insn(comedi_device * dev, comedi_subdevice * s,
+static int ai_config_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int cb_pcidas_ao_nofifo_winsn(comedi_device * dev, comedi_subdevice * s,
+static int cb_pcidas_ao_nofifo_winsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int cb_pcidas_ao_fifo_winsn(comedi_device * dev, comedi_subdevice * s,
+static int cb_pcidas_ao_fifo_winsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int cb_pcidas_ao_readback_insn(comedi_device * dev, comedi_subdevice * s,
+static int cb_pcidas_ao_readback_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int cb_pcidas_ai_cmd(comedi_device * dev, comedi_subdevice * s);
-static int cb_pcidas_ai_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int cb_pcidas_ai_cmd(struct comedi_device * dev, comedi_subdevice * s);
+static int cb_pcidas_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd);
-static int cb_pcidas_ao_cmd(comedi_device * dev, comedi_subdevice * s);
-static int cb_pcidas_ao_inttrig(comedi_device * dev, comedi_subdevice * subdev,
+static int cb_pcidas_ao_cmd(struct comedi_device * dev, comedi_subdevice * s);
+static int cb_pcidas_ao_inttrig(struct comedi_device * dev, comedi_subdevice * subdev,
unsigned int trig_num);
-static int cb_pcidas_ao_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int cb_pcidas_ao_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd);
static irqreturn_t cb_pcidas_interrupt(int irq, void *d PT_REGS_ARG);
-static void handle_ao_interrupt(comedi_device * dev, unsigned int status);
-static int cb_pcidas_cancel(comedi_device * dev, comedi_subdevice * s);
-static int cb_pcidas_ao_cancel(comedi_device * dev, comedi_subdevice * s);
-static void cb_pcidas_load_counters(comedi_device * dev, unsigned int *ns,
+static void handle_ao_interrupt(struct comedi_device * dev, unsigned int status);
+static int cb_pcidas_cancel(struct comedi_device * dev, comedi_subdevice * s);
+static int cb_pcidas_ao_cancel(struct comedi_device * dev, comedi_subdevice * s);
+static void cb_pcidas_load_counters(struct comedi_device * dev, unsigned int *ns,
int round_flags);
-static int eeprom_read_insn(comedi_device * dev, comedi_subdevice * s,
+static int eeprom_read_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int caldac_read_insn(comedi_device * dev, comedi_subdevice * s,
+static int caldac_read_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int caldac_write_insn(comedi_device * dev, comedi_subdevice * s,
+static int caldac_write_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int trimpot_read_insn(comedi_device * dev, comedi_subdevice * s,
+static int trimpot_read_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int cb_pcidas_trimpot_write(comedi_device * dev, unsigned int channel,
+static int cb_pcidas_trimpot_write(struct comedi_device * dev, unsigned int channel,
unsigned int value);
-static int trimpot_write_insn(comedi_device * dev, comedi_subdevice * s,
+static int trimpot_write_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int dac08_read_insn(comedi_device * dev, comedi_subdevice * s,
+static int dac08_read_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int dac08_write(comedi_device * dev, unsigned int value);
-static int dac08_write_insn(comedi_device * dev, comedi_subdevice * s,
+static int dac08_write(struct comedi_device * dev, unsigned int value);
+static int dac08_write_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int caldac_8800_write(comedi_device * dev, unsigned int address,
+static int caldac_8800_write(struct comedi_device * dev, unsigned int address,
uint8_t value);
-static int trimpot_7376_write(comedi_device * dev, uint8_t value);
-static int trimpot_8402_write(comedi_device * dev, unsigned int channel,
+static int trimpot_7376_write(struct comedi_device * dev, uint8_t value);
+static int trimpot_8402_write(struct comedi_device * dev, unsigned int channel,
uint8_t value);
-static int nvram_read(comedi_device * dev, unsigned int address,
+static int nvram_read(struct comedi_device * dev, unsigned int address,
uint8_t * data);
-static inline unsigned int cal_enable_bits(comedi_device * dev)
+static inline unsigned int cal_enable_bits(struct comedi_device * dev)
{
return CAL_EN_BIT | CAL_SRC_BITS(devpriv->calibration_source);
}
@@ -507,7 +507,7 @@ static inline unsigned int cal_enable_bits(comedi_device * dev)
* Attach is called by the Comedi core to configure the driver
* for a particular board.
*/
-static int cb_pcidas_attach(comedi_device * dev, comedi_devconfig * it)
+static int cb_pcidas_attach(struct comedi_device * dev, comedi_devconfig * it)
{
comedi_subdevice *s;
struct pci_dev *pcidev;
@@ -718,7 +718,7 @@ static int cb_pcidas_attach(comedi_device * dev, comedi_devconfig * it)
* allocated by _attach(). dev->private and dev->subdevices are
* deallocated automatically by the core.
*/
-static int cb_pcidas_detach(comedi_device * dev)
+static int cb_pcidas_detach(struct comedi_device * dev)
{
printk("comedi%d: cb_pcidas: remove\n", dev->minor);
@@ -752,7 +752,7 @@ static int cb_pcidas_detach(comedi_device * dev)
* "instructions" read/write data in "one-shot" or "software-triggered"
* mode.
*/
-static int cb_pcidas_ai_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int cb_pcidas_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n, i;
@@ -804,7 +804,7 @@ static int cb_pcidas_ai_rinsn(comedi_device * dev, comedi_subdevice * s,
return n;
}
-static int ai_config_calibration_source(comedi_device * dev, unsigned int * data)
+static int ai_config_calibration_source(struct comedi_device * dev, unsigned int * data)
{
static const int num_calibration_sources = 8;
unsigned int source = data[1];
@@ -819,7 +819,7 @@ static int ai_config_calibration_source(comedi_device * dev, unsigned int * data
return 2;
}
-static int ai_config_insn(comedi_device * dev, comedi_subdevice * s,
+static int ai_config_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int id = data[0];
@@ -836,7 +836,7 @@ static int ai_config_insn(comedi_device * dev, comedi_subdevice * s,
}
// analog output insn for pcidas-1000 and 1200 series
-static int cb_pcidas_ao_nofifo_winsn(comedi_device * dev, comedi_subdevice * s,
+static int cb_pcidas_ao_nofifo_winsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int channel;
@@ -861,7 +861,7 @@ static int cb_pcidas_ao_nofifo_winsn(comedi_device * dev, comedi_subdevice * s,
}
// analog output insn for pcidas-1602 series
-static int cb_pcidas_ao_fifo_winsn(comedi_device * dev, comedi_subdevice * s,
+static int cb_pcidas_ao_fifo_winsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int channel;
@@ -892,7 +892,7 @@ static int cb_pcidas_ao_fifo_winsn(comedi_device * dev, comedi_subdevice * s,
// analog output readback insn
// XXX loses track of analog output value back after an analog ouput command is executed
-static int cb_pcidas_ao_readback_insn(comedi_device * dev, comedi_subdevice * s,
+static int cb_pcidas_ao_readback_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
data[0] = devpriv->ao_value[CR_CHAN(insn->chanspec)];
@@ -900,7 +900,7 @@ static int cb_pcidas_ao_readback_insn(comedi_device * dev, comedi_subdevice * s,
return 1;
}
-static int eeprom_read_insn(comedi_device * dev, comedi_subdevice * s,
+static int eeprom_read_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
uint8_t nvram_data;
@@ -915,7 +915,7 @@ static int eeprom_read_insn(comedi_device * dev, comedi_subdevice * s,
return 1;
}
-static int caldac_write_insn(comedi_device * dev, comedi_subdevice * s,
+static int caldac_write_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
const unsigned int channel = CR_CHAN(insn->chanspec);
@@ -923,7 +923,7 @@ static int caldac_write_insn(comedi_device * dev, comedi_subdevice * s,
return caldac_8800_write(dev, channel, data[0]);
}
-static int caldac_read_insn(comedi_device * dev, comedi_subdevice * s,
+static int caldac_read_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
data[0] = devpriv->caldac_value[CR_CHAN(insn->chanspec)];
@@ -932,7 +932,7 @@ static int caldac_read_insn(comedi_device * dev, comedi_subdevice * s,
}
/* 1602/16 pregain offset */
-static int dac08_write(comedi_device * dev, unsigned int value)
+static int dac08_write(struct comedi_device * dev, unsigned int value)
{
if (devpriv->dac08_value == value)
return 1;
@@ -952,13 +952,13 @@ static int dac08_write(comedi_device * dev, unsigned int value)
return 1;
}
-static int dac08_write_insn(comedi_device * dev, comedi_subdevice * s,
+static int dac08_write_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
return dac08_write(dev, data[0]);
}
-static int dac08_read_insn(comedi_device * dev, comedi_subdevice * s,
+static int dac08_read_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
data[0] = devpriv->dac08_value;
@@ -966,7 +966,7 @@ static int dac08_read_insn(comedi_device * dev, comedi_subdevice * s,
return 1;
}
-static int cb_pcidas_trimpot_write(comedi_device * dev,
+static int cb_pcidas_trimpot_write(struct comedi_device * dev,
unsigned int channel, unsigned int value)
{
if (devpriv->trimpot_value[channel] == value)
@@ -989,7 +989,7 @@ static int cb_pcidas_trimpot_write(comedi_device * dev,
return 1;
}
-static int trimpot_write_insn(comedi_device * dev, comedi_subdevice * s,
+static int trimpot_write_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int channel = CR_CHAN(insn->chanspec);
@@ -997,7 +997,7 @@ static int trimpot_write_insn(comedi_device * dev, comedi_subdevice * s,
return cb_pcidas_trimpot_write(dev, channel, data[0]);
}
-static int trimpot_read_insn(comedi_device * dev, comedi_subdevice * s,
+static int trimpot_read_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int channel = CR_CHAN(insn->chanspec);
@@ -1007,7 +1007,7 @@ static int trimpot_read_insn(comedi_device * dev, comedi_subdevice * s,
return 1;
}
-static int cb_pcidas_ai_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int cb_pcidas_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
@@ -1162,7 +1162,7 @@ static int cb_pcidas_ai_cmdtest(comedi_device * dev, comedi_subdevice * s,
return 0;
}
-static int cb_pcidas_ai_cmd(comedi_device * dev, comedi_subdevice * s)
+static int cb_pcidas_ai_cmd(struct comedi_device * dev, comedi_subdevice * s)
{
comedi_async *async = s->async;
comedi_cmd *cmd = &async->cmd;
@@ -1249,7 +1249,7 @@ static int cb_pcidas_ai_cmd(comedi_device * dev, comedi_subdevice * s)
return 0;
}
-static int cb_pcidas_ao_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int cb_pcidas_ao_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
@@ -1362,7 +1362,7 @@ static int cb_pcidas_ao_cmdtest(comedi_device * dev, comedi_subdevice * s,
return 0;
}
-static int cb_pcidas_ao_cmd(comedi_device * dev, comedi_subdevice * s)
+static int cb_pcidas_ao_cmd(struct comedi_device * dev, comedi_subdevice * s)
{
comedi_async *async = s->async;
comedi_cmd *cmd = &async->cmd;
@@ -1425,7 +1425,7 @@ static int cb_pcidas_ao_cmd(comedi_device * dev, comedi_subdevice * s)
return 0;
}
-static int cb_pcidas_ao_inttrig(comedi_device * dev, comedi_subdevice * s,
+static int cb_pcidas_ao_inttrig(struct comedi_device * dev, comedi_subdevice * s,
unsigned int trig_num)
{
unsigned int num_bytes, num_points = thisboard->fifo_size;
@@ -1476,7 +1476,7 @@ static int cb_pcidas_ao_inttrig(comedi_device * dev, comedi_subdevice * s,
static irqreturn_t cb_pcidas_interrupt(int irq, void *d PT_REGS_ARG)
{
- comedi_device *dev = (comedi_device *) d;
+ struct comedi_device *dev = (struct comedi_device *) d;
comedi_subdevice *s = dev->read_subdev;
comedi_async *async;
int status, s5933_status;
@@ -1586,7 +1586,7 @@ static irqreturn_t cb_pcidas_interrupt(int irq, void *d PT_REGS_ARG)
return IRQ_HANDLED;
}
-static void handle_ao_interrupt(comedi_device * dev, unsigned int status)
+static void handle_ao_interrupt(struct comedi_device * dev, unsigned int status)
{
comedi_subdevice *s = dev->write_subdev;
comedi_async *async = s->async;
@@ -1643,7 +1643,7 @@ static void handle_ao_interrupt(comedi_device * dev, unsigned int status)
}
// cancel analog input command
-static int cb_pcidas_cancel(comedi_device * dev, comedi_subdevice * s)
+static int cb_pcidas_cancel(struct comedi_device * dev, comedi_subdevice * s)
{
unsigned long flags;
@@ -1662,7 +1662,7 @@ static int cb_pcidas_cancel(comedi_device * dev, comedi_subdevice * s)
}
// cancel analog output command
-static int cb_pcidas_ao_cancel(comedi_device * dev, comedi_subdevice * s)
+static int cb_pcidas_ao_cancel(struct comedi_device * dev, comedi_subdevice * s)
{
unsigned long flags;
@@ -1679,7 +1679,7 @@ static int cb_pcidas_ao_cancel(comedi_device * dev, comedi_subdevice * s)
return 0;
}
-static void cb_pcidas_load_counters(comedi_device * dev, unsigned int *ns,
+static void cb_pcidas_load_counters(struct comedi_device * dev, unsigned int *ns,
int rounding_flags)
{
i8253_cascade_ns_to_timer_2div(TIMER_BASE, &(devpriv->divisor1),
@@ -1692,7 +1692,7 @@ static void cb_pcidas_load_counters(comedi_device * dev, unsigned int *ns,
devpriv->divisor2, 2);
}
-static void write_calibration_bitstream(comedi_device * dev,
+static void write_calibration_bitstream(struct comedi_device * dev,
unsigned int register_bits, unsigned int bitstream,
unsigned int bitstream_length)
{
@@ -1709,7 +1709,7 @@ static void write_calibration_bitstream(comedi_device * dev,
}
}
-static int caldac_8800_write(comedi_device * dev, unsigned int address,
+static int caldac_8800_write(struct comedi_device * dev, unsigned int address,
uint8_t value)
{
static const int num_caldac_channels = 8;
@@ -1739,7 +1739,7 @@ static int caldac_8800_write(comedi_device * dev, unsigned int address,
return 1;
}
-static int trimpot_7376_write(comedi_device * dev, uint8_t value)
+static int trimpot_7376_write(struct comedi_device * dev, uint8_t value)
{
static const int bitstream_length = 7;
unsigned int bitstream = value & 0x7f;
@@ -1762,7 +1762,7 @@ static int trimpot_7376_write(comedi_device * dev, uint8_t value)
/* For 1602/16 only
* ch 0 : adc gain
* ch 1 : adc postgain offset */
-static int trimpot_8402_write(comedi_device * dev, unsigned int channel,
+static int trimpot_8402_write(struct comedi_device * dev, unsigned int channel,
uint8_t value)
{
static const int bitstream_length = 10;
@@ -1798,7 +1798,7 @@ static int wait_for_nvram_ready(unsigned long s5933_base_addr)
return -1;
}
-static int nvram_read(comedi_device * dev, unsigned int address, uint8_t * data)
+static int nvram_read(struct comedi_device * dev, unsigned int address, uint8_t * data)
{
unsigned long iobase = devpriv->s5933_config;
diff --git a/drivers/staging/comedi/drivers/cb_pcidas64.c b/drivers/staging/comedi/drivers/cb_pcidas64.c
index 4b1afce04d92..4095381f201e 100644
--- a/drivers/staging/comedi/drivers/cb_pcidas64.c
+++ b/drivers/staging/comedi/drivers/cb_pcidas64.c
@@ -1044,12 +1044,12 @@ static DEFINE_PCI_DEVICE_TABLE(pcidas64_pci_table) = {
MODULE_DEVICE_TABLE(pci, pcidas64_pci_table);
-static inline pcidas64_board *board(const comedi_device * dev)
+static inline pcidas64_board *board(const struct comedi_device * dev)
{
return (pcidas64_board *) dev->board_ptr;
}
-static inline unsigned short se_diff_bit_6xxx(comedi_device * dev,
+static inline unsigned short se_diff_bit_6xxx(struct comedi_device * dev,
int use_differential)
{
if ((board(dev)->layout == LAYOUT_64XX && !use_differential) ||
@@ -1114,7 +1114,7 @@ typedef struct {
/* inline function that makes it easier to
* access the private structure.
*/
-static inline pcidas64_private *priv(comedi_device * dev)
+static inline pcidas64_private *priv(struct comedi_device * dev)
{
return dev->private;
}
@@ -1125,8 +1125,8 @@ static inline pcidas64_private *priv(comedi_device * dev)
* the board, and also about the kernel module that contains
* the device code.
*/
-static int attach(comedi_device * dev, comedi_devconfig * it);
-static int detach(comedi_device * dev);
+static int attach(struct comedi_device * dev, comedi_devconfig * it);
+static int detach(struct comedi_device * dev);
static comedi_driver driver_cb_pcidas = {
driver_name:"cb_pcidas64",
module:THIS_MODULE,
@@ -1134,73 +1134,73 @@ static comedi_driver driver_cb_pcidas = {
detach:detach,
};
-static int ai_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int ai_config_insn(comedi_device * dev, comedi_subdevice * s,
+static int ai_config_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int ao_winsn(comedi_device * dev, comedi_subdevice * s,
+static int ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int ao_readback_insn(comedi_device * dev, comedi_subdevice * s,
+static int ao_readback_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int ai_cmd(comedi_device * dev, comedi_subdevice * s);
-static int ai_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int ai_cmd(struct comedi_device * dev, comedi_subdevice * s);
+static int ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd);
-static int ao_cmd(comedi_device * dev, comedi_subdevice * s);
-static int ao_inttrig(comedi_device * dev, comedi_subdevice * subdev,
+static int ao_cmd(struct comedi_device * dev, comedi_subdevice * s);
+static int ao_inttrig(struct comedi_device * dev, comedi_subdevice * subdev,
unsigned int trig_num);
-static int ao_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int ao_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd);
static irqreturn_t handle_interrupt(int irq, void *d PT_REGS_ARG);
-static int ai_cancel(comedi_device * dev, comedi_subdevice * s);
-static int ao_cancel(comedi_device * dev, comedi_subdevice * s);
+static int ai_cancel(struct comedi_device * dev, comedi_subdevice * s);
+static int ao_cancel(struct comedi_device * dev, comedi_subdevice * s);
static int dio_callback(int dir, int port, int data, unsigned long arg);
static int dio_callback_4020(int dir, int port, int data, unsigned long arg);
-static int di_rbits(comedi_device * dev, comedi_subdevice * s,
+static int di_rbits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int do_wbits(comedi_device * dev, comedi_subdevice * s,
+static int do_wbits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int dio_60xx_config_insn(comedi_device * dev, comedi_subdevice * s,
+static int dio_60xx_config_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int dio_60xx_wbits(comedi_device * dev, comedi_subdevice * s,
+static int dio_60xx_wbits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int calib_read_insn(comedi_device * dev, comedi_subdevice * s,
+static int calib_read_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int calib_write_insn(comedi_device * dev, comedi_subdevice * s,
+static int calib_write_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int ad8402_read_insn(comedi_device * dev, comedi_subdevice * s,
+static int ad8402_read_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static void ad8402_write(comedi_device * dev, unsigned int channel,
+static void ad8402_write(struct comedi_device * dev, unsigned int channel,
unsigned int value);
-static int ad8402_write_insn(comedi_device * dev, comedi_subdevice * s,
+static int ad8402_write_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int eeprom_read_insn(comedi_device * dev, comedi_subdevice * s,
+static int eeprom_read_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static void check_adc_timing(comedi_device * dev, comedi_cmd * cmd);
+static void check_adc_timing(struct comedi_device * dev, comedi_cmd * cmd);
static unsigned int get_divisor(unsigned int ns, unsigned int flags);
-static void i2c_write(comedi_device * dev, unsigned int address,
+static void i2c_write(struct comedi_device * dev, unsigned int address,
const uint8_t * data, unsigned int length);
-static void caldac_write(comedi_device * dev, unsigned int channel,
+static void caldac_write(struct comedi_device * dev, unsigned int channel,
unsigned int value);
-static int caldac_8800_write(comedi_device * dev, unsigned int address,
+static int caldac_8800_write(struct comedi_device * dev, unsigned int address,
uint8_t value);
-//static int dac_1590_write(comedi_device *dev, unsigned int dac_a, unsigned int dac_b);
-static int caldac_i2c_write(comedi_device * dev, unsigned int caldac_channel,
+//static int dac_1590_write(struct comedi_device *dev, unsigned int dac_a, unsigned int dac_b);
+static int caldac_i2c_write(struct comedi_device * dev, unsigned int caldac_channel,
unsigned int value);
-static void abort_dma(comedi_device * dev, unsigned int channel);
-static void disable_plx_interrupts(comedi_device * dev);
-static int set_ai_fifo_size(comedi_device * dev, unsigned int num_samples);
-static unsigned int ai_fifo_size(comedi_device * dev);
-static int set_ai_fifo_segment_length(comedi_device * dev,
+static void abort_dma(struct comedi_device * dev, unsigned int channel);
+static void disable_plx_interrupts(struct comedi_device * dev);
+static int set_ai_fifo_size(struct comedi_device * dev, unsigned int num_samples);
+static unsigned int ai_fifo_size(struct comedi_device * dev);
+static int set_ai_fifo_segment_length(struct comedi_device * dev,
unsigned int num_entries);
-static void disable_ai_pacing(comedi_device * dev);
-static void disable_ai_interrupts(comedi_device * dev);
-static void enable_ai_interrupts(comedi_device * dev, const comedi_cmd * cmd);
+static void disable_ai_pacing(struct comedi_device * dev);
+static void disable_ai_interrupts(struct comedi_device * dev);
+static void enable_ai_interrupts(struct comedi_device * dev, const comedi_cmd * cmd);
static unsigned int get_ao_divisor(unsigned int ns, unsigned int flags);
-static void load_ao_dma(comedi_device * dev, const comedi_cmd * cmd);
+static void load_ao_dma(struct comedi_device * dev, const comedi_cmd * cmd);
COMEDI_PCI_INITCLEANUP(driver_cb_pcidas, pcidas64_pci_table);
-static unsigned int ai_range_bits_6xxx(const comedi_device * dev,
+static unsigned int ai_range_bits_6xxx(const struct comedi_device * dev,
unsigned int range_index)
{
const comedi_krange *range =
@@ -1244,7 +1244,7 @@ static unsigned int ai_range_bits_6xxx(const comedi_device * dev,
return bits;
}
-static unsigned int hw_revision(const comedi_device * dev,
+static unsigned int hw_revision(const struct comedi_device * dev,
uint16_t hw_status_bits)
{
if (board(dev)->layout == LAYOUT_4020)
@@ -1253,7 +1253,7 @@ static unsigned int hw_revision(const comedi_device * dev,
return (hw_status_bits >> 12) & 0xf;
}
-static void set_dac_range_bits(comedi_device * dev, volatile uint16_t * bits,
+static void set_dac_range_bits(struct comedi_device * dev, volatile uint16_t * bits,
unsigned int channel, unsigned int range)
{
unsigned int code = board(dev)->ao_range_code[range];
@@ -1273,7 +1273,7 @@ static inline int ao_cmd_is_supported(const pcidas64_board * board)
}
// initialize plx9080 chip
-static void init_plx9080(comedi_device * dev)
+static void init_plx9080(struct comedi_device * dev)
{
uint32_t bits;
void *plx_iobase = priv(dev)->plx9080_iobase;
@@ -1363,7 +1363,7 @@ static void init_plx9080(comedi_device * dev)
/* Allocate and initialize the subdevice structures.
*/
-static int setup_subdevices(comedi_device * dev)
+static int setup_subdevices(struct comedi_device * dev)
{
comedi_subdevice *s;
void *dio_8255_iobase;
@@ -1526,14 +1526,14 @@ static int setup_subdevices(comedi_device * dev)
return 0;
}
-static void disable_plx_interrupts(comedi_device * dev)
+static void disable_plx_interrupts(struct comedi_device * dev)
{
priv(dev)->plx_intcsr_bits = 0;
writel(priv(dev)->plx_intcsr_bits,
priv(dev)->plx9080_iobase + PLX_INTRCS_REG);
}
-static void init_stc_registers(comedi_device * dev)
+static void init_stc_registers(struct comedi_device * dev)
{
uint16_t bits;
unsigned long flags;
@@ -1575,7 +1575,7 @@ static void init_stc_registers(comedi_device * dev)
disable_ai_pacing(dev);
};
-int alloc_and_init_dma_members(comedi_device * dev)
+int alloc_and_init_dma_members(struct comedi_device * dev)
{
int i;
@@ -1661,7 +1661,7 @@ int alloc_and_init_dma_members(comedi_device * dev)
return 0;
}
-static inline void warn_external_queue(comedi_device * dev)
+static inline void warn_external_queue(struct comedi_device * dev)
{
comedi_error(dev,
"AO command and AI external channel queue cannot be used simultaneously.");
@@ -1673,7 +1673,7 @@ static inline void warn_external_queue(comedi_device * dev)
* Attach is called by the Comedi core to configure the driver
* for a particular board.
*/
-static int attach(comedi_device * dev, comedi_devconfig * it)
+static int attach(struct comedi_device * dev, comedi_devconfig * it)
{
struct pci_dev *pcidev;
int index;
@@ -1821,7 +1821,7 @@ static int attach(comedi_device * dev, comedi_devconfig * it)
* allocated by _attach(). dev->private and dev->subdevices are
* deallocated automatically by the core.
*/
-static int detach(comedi_device * dev)
+static int detach(struct comedi_device * dev)
{
unsigned int i;
@@ -1881,7 +1881,7 @@ static int detach(comedi_device * dev)
return 0;
}
-static int ai_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int bits = 0, n, i;
@@ -2018,7 +2018,7 @@ static int ai_rinsn(comedi_device * dev, comedi_subdevice * s,
return n;
}
-static int ai_config_calibration_source(comedi_device * dev, unsigned int * data)
+static int ai_config_calibration_source(struct comedi_device * dev, unsigned int * data)
{
unsigned int source = data[1];
int num_calibration_sources;
@@ -2038,7 +2038,7 @@ static int ai_config_calibration_source(comedi_device * dev, unsigned int * data
return 2;
}
-static int ai_config_block_size(comedi_device * dev, unsigned int * data)
+static int ai_config_block_size(struct comedi_device * dev, unsigned int * data)
{
int fifo_size;
const hw_fifo_info_t *const fifo = board(dev)->ai_fifo;
@@ -2065,7 +2065,7 @@ static int ai_config_block_size(comedi_device * dev, unsigned int * data)
return 2;
}
-static int ai_config_master_clock_4020(comedi_device * dev, unsigned int * data)
+static int ai_config_master_clock_4020(struct comedi_device * dev, unsigned int * data)
{
unsigned int divisor = data[4];
int retval = 0;
@@ -2091,7 +2091,7 @@ static int ai_config_master_clock_4020(comedi_device * dev, unsigned int * data)
}
// XXX could add support for 60xx series
-static int ai_config_master_clock(comedi_device * dev, unsigned int * data)
+static int ai_config_master_clock(struct comedi_device * dev, unsigned int * data)
{
switch (board(dev)->layout) {
@@ -2106,7 +2106,7 @@ static int ai_config_master_clock(comedi_device * dev, unsigned int * data)
return -EINVAL;
}
-static int ai_config_insn(comedi_device * dev, comedi_subdevice * s,
+static int ai_config_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int id = data[0];
@@ -2128,7 +2128,7 @@ static int ai_config_insn(comedi_device * dev, comedi_subdevice * s,
return -EINVAL;
}
-static int ai_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
@@ -2324,7 +2324,7 @@ static int use_hw_sample_counter(comedi_cmd * cmd)
return 0;
}
-static void setup_sample_counters(comedi_device * dev, comedi_cmd * cmd)
+static void setup_sample_counters(struct comedi_device * dev, comedi_cmd * cmd)
{
if (cmd->stop_src == TRIG_COUNT) {
// set software count
@@ -2341,7 +2341,7 @@ static void setup_sample_counters(comedi_device * dev, comedi_cmd * cmd)
}
}
-static inline unsigned int dma_transfer_size(comedi_device * dev)
+static inline unsigned int dma_transfer_size(struct comedi_device * dev)
{
unsigned int num_samples;
@@ -2354,7 +2354,7 @@ static inline unsigned int dma_transfer_size(comedi_device * dev)
return num_samples;
}
-static void disable_ai_pacing(comedi_device * dev)
+static void disable_ai_pacing(struct comedi_device * dev)
{
unsigned long flags;
@@ -2371,7 +2371,7 @@ static void disable_ai_pacing(comedi_device * dev)
priv(dev)->main_iobase + ADC_CONTROL0_REG);
}
-static void disable_ai_interrupts(comedi_device * dev)
+static void disable_ai_interrupts(struct comedi_device * dev)
{
unsigned long flags;
@@ -2387,7 +2387,7 @@ static void disable_ai_interrupts(comedi_device * dev)
DEBUG_PRINT("intr enable bits 0x%x\n", priv(dev)->intr_enable_bits);
}
-static void enable_ai_interrupts(comedi_device * dev, const comedi_cmd * cmd)
+static void enable_ai_interrupts(struct comedi_device * dev, const comedi_cmd * cmd)
{
uint32_t bits;
unsigned long flags;
@@ -2408,14 +2408,14 @@ static void enable_ai_interrupts(comedi_device * dev, const comedi_cmd * cmd)
comedi_spin_unlock_irqrestore(&dev->spinlock, flags);
}
-static uint32_t ai_convert_counter_6xxx(const comedi_device * dev,
+static uint32_t ai_convert_counter_6xxx(const struct comedi_device * dev,
const comedi_cmd * cmd)
{
// supposed to load counter with desired divisor minus 3
return cmd->convert_arg / TIMER_BASE - 3;
}
-static uint32_t ai_scan_counter_6xxx(comedi_device * dev, comedi_cmd * cmd)
+static uint32_t ai_scan_counter_6xxx(struct comedi_device * dev, comedi_cmd * cmd)
{
uint32_t count;
// figure out how long we need to delay at end of scan
@@ -2435,7 +2435,7 @@ static uint32_t ai_scan_counter_6xxx(comedi_device * dev, comedi_cmd * cmd)
return count - 3;
}
-static uint32_t ai_convert_counter_4020(comedi_device * dev, comedi_cmd * cmd)
+static uint32_t ai_convert_counter_4020(struct comedi_device * dev, comedi_cmd * cmd)
{
unsigned int divisor;
@@ -2456,7 +2456,7 @@ static uint32_t ai_convert_counter_4020(comedi_device * dev, comedi_cmd * cmd)
return divisor - 2;
}
-static void select_master_clock_4020(comedi_device * dev,
+static void select_master_clock_4020(struct comedi_device * dev,
const comedi_cmd * cmd)
{
// select internal/external master clock
@@ -2475,7 +2475,7 @@ static void select_master_clock_4020(comedi_device * dev,
priv(dev)->main_iobase + HW_CONFIG_REG);
}
-static void select_master_clock(comedi_device * dev, const comedi_cmd * cmd)
+static void select_master_clock(struct comedi_device * dev, const comedi_cmd * cmd)
{
switch (board(dev)->layout) {
case LAYOUT_4020:
@@ -2486,7 +2486,7 @@ static void select_master_clock(comedi_device * dev, const comedi_cmd * cmd)
}
}
-static inline void dma_start_sync(comedi_device * dev, unsigned int channel)
+static inline void dma_start_sync(struct comedi_device * dev, unsigned int channel)
{
unsigned long flags;
@@ -2503,7 +2503,7 @@ static inline void dma_start_sync(comedi_device * dev, unsigned int channel)
comedi_spin_unlock_irqrestore(&dev->spinlock, flags);
}
-static void set_ai_pacing(comedi_device * dev, comedi_cmd * cmd)
+static void set_ai_pacing(struct comedi_device * dev, comedi_cmd * cmd)
{
uint32_t convert_counter = 0, scan_counter = 0;
@@ -2550,7 +2550,7 @@ static int use_internal_queue_6xxx(const comedi_cmd * cmd)
return 1;
}
-static int setup_channel_queue(comedi_device * dev, const comedi_cmd * cmd)
+static int setup_channel_queue(struct comedi_device * dev, const comedi_cmd * cmd)
{
unsigned short bits;
int i;
@@ -2652,7 +2652,7 @@ static int setup_channel_queue(comedi_device * dev, const comedi_cmd * cmd)
return 0;
}
-static inline void load_first_dma_descriptor(comedi_device * dev,
+static inline void load_first_dma_descriptor(struct comedi_device * dev,
unsigned int dma_channel, unsigned int descriptor_bits)
{
/* The transfer size, pci address, and local address registers
@@ -2679,7 +2679,7 @@ static inline void load_first_dma_descriptor(comedi_device * dev,
}
}
-static int ai_cmd(comedi_device * dev, comedi_subdevice * s)
+static int ai_cmd(struct comedi_device * dev, comedi_subdevice * s)
{
comedi_async *async = s->async;
comedi_cmd *cmd = &async->cmd;
@@ -2797,7 +2797,7 @@ static int ai_cmd(comedi_device * dev, comedi_subdevice * s)
}
// read num_samples from 16 bit wide ai fifo
-static void pio_drain_ai_fifo_16(comedi_device * dev)
+static void pio_drain_ai_fifo_16(struct comedi_device * dev)
{
comedi_subdevice *s = dev->read_subdev;
comedi_async *async = s->async;
@@ -2864,7 +2864,7 @@ static void pio_drain_ai_fifo_16(comedi_device * dev)
* dma transfers (it only supports the use of pio for draining the last remaining
* points from the fifo when a data aquisition operation has completed).
*/
-static void pio_drain_ai_fifo_32(comedi_device * dev)
+static void pio_drain_ai_fifo_32(struct comedi_device * dev)
{
comedi_subdevice *s = dev->read_subdev;
comedi_async *async = s->async;
@@ -2898,7 +2898,7 @@ static void pio_drain_ai_fifo_32(comedi_device * dev)
}
// empty fifo
-static void pio_drain_ai_fifo(comedi_device * dev)
+static void pio_drain_ai_fifo(struct comedi_device * dev)
{
if (board(dev)->layout == LAYOUT_4020) {
pio_drain_ai_fifo_32(dev);
@@ -2906,7 +2906,7 @@ static void pio_drain_ai_fifo(comedi_device * dev)
pio_drain_ai_fifo_16(dev);
}
-static void drain_dma_buffers(comedi_device * dev, unsigned int channel)
+static void drain_dma_buffers(struct comedi_device * dev, unsigned int channel)
{
comedi_async *async = dev->read_subdev->async;
uint32_t next_transfer_addr;
@@ -2952,7 +2952,7 @@ static void drain_dma_buffers(comedi_device * dev, unsigned int channel)
* unused buffer) */
}
-void handle_ai_interrupt(comedi_device * dev, unsigned short status,
+void handle_ai_interrupt(struct comedi_device * dev, unsigned short status,
unsigned int plx_status)
{
comedi_subdevice *s = dev->read_subdev;
@@ -3006,7 +3006,7 @@ void handle_ai_interrupt(comedi_device * dev, unsigned short status,
cfc_handle_events(dev, s);
}
-static inline unsigned int prev_ao_dma_index(comedi_device * dev)
+static inline unsigned int prev_ao_dma_index(struct comedi_device * dev)
{
unsigned int buffer_index;
@@ -3017,7 +3017,7 @@ static inline unsigned int prev_ao_dma_index(comedi_device * dev)
return buffer_index;
}
-static int last_ao_dma_load_completed(comedi_device * dev)
+static int last_ao_dma_load_completed(struct comedi_device * dev)
{
unsigned int buffer_index;
unsigned int transfer_address;
@@ -3036,7 +3036,7 @@ static int last_ao_dma_load_completed(comedi_device * dev)
return 1;
}
-static int ao_stopped_by_error(comedi_device * dev, const comedi_cmd * cmd)
+static int ao_stopped_by_error(struct comedi_device * dev, const comedi_cmd * cmd)
{
if (cmd->stop_src == TRIG_NONE)
return 1;
@@ -3049,7 +3049,7 @@ static int ao_stopped_by_error(comedi_device * dev, const comedi_cmd * cmd)
return 0;
}
-static inline int ao_dma_needs_restart(comedi_device * dev,
+static inline int ao_dma_needs_restart(struct comedi_device * dev,
unsigned short dma_status)
{
if ((dma_status & PLX_DMA_DONE_BIT) == 0 ||
@@ -3061,7 +3061,7 @@ static inline int ao_dma_needs_restart(comedi_device * dev,
return 1;
}
-static void restart_ao_dma(comedi_device * dev)
+static void restart_ao_dma(struct comedi_device * dev)
{
unsigned int dma_desc_bits;
@@ -3074,7 +3074,7 @@ static void restart_ao_dma(comedi_device * dev)
dma_start_sync(dev, 0);
}
-static void handle_ao_interrupt(comedi_device * dev, unsigned short status,
+static void handle_ao_interrupt(struct comedi_device * dev, unsigned short status,
unsigned int plx_status)
{
comedi_subdevice *s = dev->write_subdev;
@@ -3128,7 +3128,7 @@ static void handle_ao_interrupt(comedi_device * dev, unsigned short status,
static irqreturn_t handle_interrupt(int irq, void *d PT_REGS_ARG)
{
- comedi_device *dev = d;
+ struct comedi_device *dev = d;
unsigned short status;
uint32_t plx_status;
uint32_t plx_bits;
@@ -3162,7 +3162,7 @@ static irqreturn_t handle_interrupt(int irq, void *d PT_REGS_ARG)
return IRQ_HANDLED;
}
-void abort_dma(comedi_device * dev, unsigned int channel)
+void abort_dma(struct comedi_device * dev, unsigned int channel)
{
unsigned long flags;
@@ -3174,7 +3174,7 @@ void abort_dma(comedi_device * dev, unsigned int channel)
comedi_spin_unlock_irqrestore(&dev->spinlock, flags);
}
-static int ai_cancel(comedi_device * dev, comedi_subdevice * s)
+static int ai_cancel(struct comedi_device * dev, comedi_subdevice * s)
{
unsigned long flags;
@@ -3194,7 +3194,7 @@ static int ai_cancel(comedi_device * dev, comedi_subdevice * s)
return 0;
}
-static int ao_winsn(comedi_device * dev, comedi_subdevice * s,
+static int ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int chan = CR_CHAN(insn->chanspec);
@@ -3224,7 +3224,7 @@ static int ao_winsn(comedi_device * dev, comedi_subdevice * s,
return 1;
}
-static int ao_readback_insn(comedi_device * dev, comedi_subdevice * s,
+static int ao_readback_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
data[0] = priv(dev)->ao_value[CR_CHAN(insn->chanspec)];
@@ -3232,7 +3232,7 @@ static int ao_readback_insn(comedi_device * dev, comedi_subdevice * s,
return 1;
}
-static void set_dac_control0_reg(comedi_device * dev, const comedi_cmd * cmd)
+static void set_dac_control0_reg(struct comedi_device * dev, const comedi_cmd * cmd)
{
unsigned int bits = DAC_ENABLE_BIT | WAVEFORM_GATE_LEVEL_BIT |
WAVEFORM_GATE_ENABLE_BIT | WAVEFORM_GATE_SELECT_BIT;
@@ -3252,7 +3252,7 @@ static void set_dac_control0_reg(comedi_device * dev, const comedi_cmd * cmd)
writew(bits, priv(dev)->main_iobase + DAC_CONTROL0_REG);
}
-static void set_dac_control1_reg(comedi_device * dev, const comedi_cmd * cmd)
+static void set_dac_control1_reg(struct comedi_device * dev, const comedi_cmd * cmd)
{
int i;
@@ -3269,7 +3269,7 @@ static void set_dac_control1_reg(comedi_device * dev, const comedi_cmd * cmd)
priv(dev)->main_iobase + DAC_CONTROL1_REG);
}
-static void set_dac_select_reg(comedi_device * dev, const comedi_cmd * cmd)
+static void set_dac_select_reg(struct comedi_device * dev, const comedi_cmd * cmd)
{
uint16_t bits;
unsigned int first_channel, last_channel;
@@ -3284,7 +3284,7 @@ static void set_dac_select_reg(comedi_device * dev, const comedi_cmd * cmd)
writew(bits, priv(dev)->main_iobase + DAC_SELECT_REG);
}
-static void set_dac_interval_regs(comedi_device * dev, const comedi_cmd * cmd)
+static void set_dac_interval_regs(struct comedi_device * dev, const comedi_cmd * cmd)
{
unsigned int divisor;
@@ -3302,7 +3302,7 @@ static void set_dac_interval_regs(comedi_device * dev, const comedi_cmd * cmd)
priv(dev)->main_iobase + DAC_SAMPLE_INTERVAL_UPPER_REG);
}
-static unsigned int load_ao_dma_buffer(comedi_device * dev,
+static unsigned int load_ao_dma_buffer(struct comedi_device * dev,
const comedi_cmd * cmd)
{
unsigned int num_bytes, buffer_index, prev_buffer_index;
@@ -3346,7 +3346,7 @@ static unsigned int load_ao_dma_buffer(comedi_device * dev,
return num_bytes;
}
-static void load_ao_dma(comedi_device * dev, const comedi_cmd * cmd)
+static void load_ao_dma(struct comedi_device * dev, const comedi_cmd * cmd)
{
unsigned int num_bytes;
unsigned int next_transfer_addr;
@@ -3368,7 +3368,7 @@ static void load_ao_dma(comedi_device * dev, const comedi_cmd * cmd)
} while (num_bytes >= DMA_BUFFER_SIZE);
}
-static int prep_ao_dma(comedi_device * dev, const comedi_cmd * cmd)
+static int prep_ao_dma(struct comedi_device * dev, const comedi_cmd * cmd)
{
unsigned int num_bytes;
int i;
@@ -3402,7 +3402,7 @@ static int prep_ao_dma(comedi_device * dev, const comedi_cmd * cmd)
return 0;
}
-static inline int external_ai_queue_in_use(comedi_device * dev)
+static inline int external_ai_queue_in_use(struct comedi_device * dev)
{
if (dev->read_subdev->busy)
return 0;
@@ -3413,7 +3413,7 @@ static inline int external_ai_queue_in_use(comedi_device * dev)
return 1;
}
-static int ao_cmd(comedi_device * dev, comedi_subdevice * s)
+static int ao_cmd(struct comedi_device * dev, comedi_subdevice * s)
{
comedi_cmd *cmd = &s->async->cmd;
@@ -3438,7 +3438,7 @@ static int ao_cmd(comedi_device * dev, comedi_subdevice * s)
return 0;
}
-static int ao_inttrig(comedi_device * dev, comedi_subdevice * s,
+static int ao_inttrig(struct comedi_device * dev, comedi_subdevice * s,
unsigned int trig_num)
{
comedi_cmd *cmd = &s->async->cmd;
@@ -3461,7 +3461,7 @@ static int ao_inttrig(comedi_device * dev, comedi_subdevice * s,
return 0;
}
-static int ao_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int ao_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
@@ -3577,7 +3577,7 @@ static int ao_cmdtest(comedi_device * dev, comedi_subdevice * s,
return 0;
}
-static int ao_cancel(comedi_device * dev, comedi_subdevice * s)
+static int ao_cancel(struct comedi_device * dev, comedi_subdevice * s)
{
writew(0x0, priv(dev)->main_iobase + DAC_CONTROL0_REG);
abort_dma(dev, 0);
@@ -3605,7 +3605,7 @@ static int dio_callback_4020(int dir, int port, int data, unsigned long iobase)
}
}
-static int di_rbits(comedi_device * dev, comedi_subdevice * s,
+static int di_rbits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int bits;
@@ -3618,7 +3618,7 @@ static int di_rbits(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int do_wbits(comedi_device * dev, comedi_subdevice * s,
+static int do_wbits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
data[0] &= 0xf;
@@ -3634,7 +3634,7 @@ static int do_wbits(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int dio_60xx_config_insn(comedi_device * dev, comedi_subdevice * s,
+static int dio_60xx_config_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int mask;
@@ -3661,7 +3661,7 @@ static int dio_60xx_config_insn(comedi_device * dev, comedi_subdevice * s,
return 1;
}
-static int dio_60xx_wbits(comedi_device * dev, comedi_subdevice * s,
+static int dio_60xx_wbits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (data[0]) {
@@ -3676,7 +3676,7 @@ static int dio_60xx_wbits(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static void caldac_write(comedi_device * dev, unsigned int channel,
+static void caldac_write(struct comedi_device * dev, unsigned int channel,
unsigned int value)
{
priv(dev)->caldac_state[channel] = value;
@@ -3694,7 +3694,7 @@ static void caldac_write(comedi_device * dev, unsigned int channel,
}
}
-static int calib_write_insn(comedi_device * dev, comedi_subdevice * s,
+static int calib_write_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int channel = CR_CHAN(insn->chanspec);
@@ -3709,7 +3709,7 @@ static int calib_write_insn(comedi_device * dev, comedi_subdevice * s,
return 1;
}
-static int calib_read_insn(comedi_device * dev, comedi_subdevice * s,
+static int calib_read_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int channel = CR_CHAN(insn->chanspec);
@@ -3719,7 +3719,7 @@ static int calib_read_insn(comedi_device * dev, comedi_subdevice * s,
return 1;
}
-static void ad8402_write(comedi_device * dev, unsigned int channel,
+static void ad8402_write(struct comedi_device * dev, unsigned int channel,
unsigned int value)
{
static const int bitstream_length = 10;
@@ -3750,7 +3750,7 @@ static void ad8402_write(comedi_device * dev, unsigned int channel,
}
/* for pci-das6402/16, channel 0 is analog input gain and channel 1 is offset */
-static int ad8402_write_insn(comedi_device * dev, comedi_subdevice * s,
+static int ad8402_write_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int channel = CR_CHAN(insn->chanspec);
@@ -3767,7 +3767,7 @@ static int ad8402_write_insn(comedi_device * dev, comedi_subdevice * s,
return 1;
}
-static int ad8402_read_insn(comedi_device * dev, comedi_subdevice * s,
+static int ad8402_read_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int channel = CR_CHAN(insn->chanspec);
@@ -3777,7 +3777,7 @@ static int ad8402_read_insn(comedi_device * dev, comedi_subdevice * s,
return 1;
}
-static uint16_t read_eeprom(comedi_device * dev, uint8_t address)
+static uint16_t read_eeprom(struct comedi_device * dev, uint8_t address)
{
static const int bitstream_length = 11;
static const int read_command = 0x6;
@@ -3839,7 +3839,7 @@ static uint16_t read_eeprom(comedi_device * dev, uint8_t address)
return value;
}
-static int eeprom_read_insn(comedi_device * dev, comedi_subdevice * s,
+static int eeprom_read_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
data[0] = read_eeprom(dev, CR_CHAN(insn->chanspec));
@@ -3851,7 +3851,7 @@ static int eeprom_read_insn(comedi_device * dev, comedi_subdevice * s,
* sets cmd members appropriately.
* adc paces conversions from master clock by dividing by (x + 3) where x is 24 bit number
*/
-static void check_adc_timing(comedi_device * dev, comedi_cmd * cmd)
+static void check_adc_timing(struct comedi_device * dev, comedi_cmd * cmd)
{
unsigned int convert_divisor = 0, scan_divisor;
static const int min_convert_divisor = 3;
@@ -3925,7 +3925,7 @@ static unsigned int get_ao_divisor(unsigned int ns, unsigned int flags)
}
// adjusts the size of hardware fifo (which determines block size for dma xfers)
-static int set_ai_fifo_size(comedi_device * dev, unsigned int num_samples)
+static int set_ai_fifo_size(struct comedi_device * dev, unsigned int num_samples)
{
unsigned int num_fifo_entries;
int retval;
@@ -3946,14 +3946,14 @@ static int set_ai_fifo_size(comedi_device * dev, unsigned int num_samples)
}
// query length of fifo
-static unsigned int ai_fifo_size(comedi_device * dev)
+static unsigned int ai_fifo_size(struct comedi_device * dev)
{
return priv(dev)->ai_fifo_segment_length *
board(dev)->ai_fifo->num_segments *
board(dev)->ai_fifo->sample_packing_ratio;
}
-static int set_ai_fifo_segment_length(comedi_device * dev,
+static int set_ai_fifo_segment_length(struct comedi_device * dev,
unsigned int num_entries)
{
static const int increment_size = 0x100;
@@ -4004,7 +4004,7 @@ static int set_ai_fifo_segment_length(comedi_device * dev,
* address 7 == dac channel 1 fine offset
*/
-static int caldac_8800_write(comedi_device * dev, unsigned int address,
+static int caldac_8800_write(struct comedi_device * dev, unsigned int address,
uint8_t value)
{
static const int num_caldac_channels = 8;
@@ -4036,7 +4036,7 @@ static int caldac_8800_write(comedi_device * dev, unsigned int address,
}
// 4020 caldacs
-static int caldac_i2c_write(comedi_device * dev, unsigned int caldac_channel,
+static int caldac_i2c_write(struct comedi_device * dev, unsigned int caldac_channel,
unsigned int value)
{
uint8_t serial_bytes[3];
@@ -4101,7 +4101,7 @@ static const int i2c_high_comedi_udelay = 1000;
static const int i2c_low_comedi_udelay = 10;
// set i2c data line high or low
-static void i2c_set_sda(comedi_device * dev, int state)
+static void i2c_set_sda(struct comedi_device * dev, int state)
{
static const int data_bit = CTL_EE_W;
void *plx_control_addr = priv(dev)->plx9080_iobase + PLX_CONTROL_REG;
@@ -4120,7 +4120,7 @@ static void i2c_set_sda(comedi_device * dev, int state)
}
// set i2c clock line high or low
-static void i2c_set_scl(comedi_device * dev, int state)
+static void i2c_set_scl(struct comedi_device * dev, int state)
{
static const int clock_bit = CTL_USERO;
void *plx_control_addr = priv(dev)->plx9080_iobase + PLX_CONTROL_REG;
@@ -4138,7 +4138,7 @@ static void i2c_set_scl(comedi_device * dev, int state)
}
}
-static void i2c_write_byte(comedi_device * dev, uint8_t byte)
+static void i2c_write_byte(struct comedi_device * dev, uint8_t byte)
{
uint8_t bit;
unsigned int num_bits = 8;
@@ -4156,7 +4156,7 @@ static void i2c_write_byte(comedi_device * dev, uint8_t byte)
}
// we can't really read the lines, so fake it
-static int i2c_read_ack(comedi_device * dev)
+static int i2c_read_ack(struct comedi_device * dev)
{
i2c_set_scl(dev, 0);
i2c_set_sda(dev, 1);
@@ -4166,7 +4166,7 @@ static int i2c_read_ack(comedi_device * dev)
}
// send start bit
-static void i2c_start(comedi_device * dev)
+static void i2c_start(struct comedi_device * dev)
{
i2c_set_scl(dev, 1);
i2c_set_sda(dev, 1);
@@ -4174,7 +4174,7 @@ static void i2c_start(comedi_device * dev)
}
// send stop bit
-static void i2c_stop(comedi_device * dev)
+static void i2c_stop(struct comedi_device * dev)
{
i2c_set_scl(dev, 0);
i2c_set_sda(dev, 0);
@@ -4182,7 +4182,7 @@ static void i2c_stop(comedi_device * dev)
i2c_set_sda(dev, 1);
}
-static void i2c_write(comedi_device * dev, unsigned int address,
+static void i2c_write(struct comedi_device * dev, unsigned int address,
const uint8_t * data, unsigned int length)
{
unsigned int i;
diff --git a/drivers/staging/comedi/drivers/cb_pcidda.c b/drivers/staging/comedi/drivers/cb_pcidda.c
index f245eb1c1631..d433780d5b50 100644
--- a/drivers/staging/comedi/drivers/cb_pcidda.c
+++ b/drivers/staging/comedi/drivers/cb_pcidda.c
@@ -210,7 +210,7 @@ MODULE_DEVICE_TABLE(pci, cb_pcidda_pci_table);
/* this structure is for data unique to this hardware driver. If
several hardware drivers keep similar information in this structure,
- feel free to suggest moving the variable to the comedi_device struct. */
+ feel free to suggest moving the variable to the struct comedi_device struct. */
typedef struct {
int data;
@@ -232,20 +232,20 @@ typedef struct {
*/
#define devpriv ((cb_pcidda_private *)dev->private)
-static int cb_pcidda_attach(comedi_device * dev, comedi_devconfig * it);
-static int cb_pcidda_detach(comedi_device * dev);
-//static int cb_pcidda_ai_rinsn(comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,unsigned int *data);
-static int cb_pcidda_ao_winsn(comedi_device * dev, comedi_subdevice * s,
+static int cb_pcidda_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int cb_pcidda_detach(struct comedi_device * dev);
+//static int cb_pcidda_ai_rinsn(struct comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,unsigned int *data);
+static int cb_pcidda_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-//static int cb_pcidda_ai_cmd(comedi_device *dev,comedi_subdevice *s);
-//static int cb_pcidda_ai_cmdtest(comedi_device *dev,comedi_subdevice *s, comedi_cmd *cmd);
+//static int cb_pcidda_ai_cmd(struct comedi_device *dev,comedi_subdevice *s);
+//static int cb_pcidda_ai_cmdtest(struct comedi_device *dev,comedi_subdevice *s, comedi_cmd *cmd);
//static int cb_pcidda_ns_to_timer(unsigned int *ns,int round);
-static unsigned int cb_pcidda_serial_in(comedi_device * dev);
-static void cb_pcidda_serial_out(comedi_device * dev, unsigned int value,
+static unsigned int cb_pcidda_serial_in(struct comedi_device * dev);
+static void cb_pcidda_serial_out(struct comedi_device * dev, unsigned int value,
unsigned int num_bits);
-static unsigned int cb_pcidda_read_eeprom(comedi_device * dev,
+static unsigned int cb_pcidda_read_eeprom(struct comedi_device * dev,
unsigned int address);
-static void cb_pcidda_calibrate(comedi_device * dev, unsigned int channel,
+static void cb_pcidda_calibrate(struct comedi_device * dev, unsigned int channel,
unsigned int range);
/*
@@ -265,7 +265,7 @@ static comedi_driver driver_cb_pcidda = {
* Attach is called by the Comedi core to configure the driver
* for a particular board.
*/
-static int cb_pcidda_attach(comedi_device * dev, comedi_devconfig * it)
+static int cb_pcidda_attach(struct comedi_device * dev, comedi_devconfig * it)
{
comedi_subdevice *s;
struct pci_dev *pcidev;
@@ -385,7 +385,7 @@ static int cb_pcidda_attach(comedi_device * dev, comedi_devconfig * it)
* allocated by _attach(). dev->private and dev->subdevices are
* deallocated automatically by the core.
*/
-static int cb_pcidda_detach(comedi_device * dev)
+static int cb_pcidda_detach(struct comedi_device * dev)
{
/*
* Deallocate the I/O ports.
@@ -413,7 +413,7 @@ static int cb_pcidda_detach(comedi_device * dev)
* I will program this later... ;-)
*/
#if 0
-static int cb_pcidda_ai_cmd(comedi_device * dev, comedi_subdevice * s)
+static int cb_pcidda_ai_cmd(struct comedi_device * dev, comedi_subdevice * s)
{
printk("cb_pcidda_ai_cmd\n");
printk("subdev: %d\n", cmd->subdev);
@@ -432,7 +432,7 @@ static int cb_pcidda_ai_cmd(comedi_device * dev, comedi_subdevice * s)
#endif
#if 0
-static int cb_pcidda_ai_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int cb_pcidda_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
@@ -598,7 +598,7 @@ static int cb_pcidda_ns_to_timer(unsigned int *ns, int round)
}
#endif
-static int cb_pcidda_ao_winsn(comedi_device * dev, comedi_subdevice * s,
+static int cb_pcidda_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int command;
@@ -648,7 +648,7 @@ static int cb_pcidda_ao_winsn(comedi_device * dev, comedi_subdevice * s,
}
// lowlevel read from eeprom
-static unsigned int cb_pcidda_serial_in(comedi_device * dev)
+static unsigned int cb_pcidda_serial_in(struct comedi_device * dev)
{
unsigned int value = 0;
int i;
@@ -665,7 +665,7 @@ static unsigned int cb_pcidda_serial_in(comedi_device * dev)
}
// lowlevel write to eeprom/dac
-static void cb_pcidda_serial_out(comedi_device * dev, unsigned int value,
+static void cb_pcidda_serial_out(struct comedi_device * dev, unsigned int value,
unsigned int num_bits)
{
int i;
@@ -681,7 +681,7 @@ static void cb_pcidda_serial_out(comedi_device * dev, unsigned int value,
}
// reads a 16 bit value from board's eeprom
-static unsigned int cb_pcidda_read_eeprom(comedi_device * dev,
+static unsigned int cb_pcidda_read_eeprom(struct comedi_device * dev,
unsigned int address)
{
unsigned int i;
@@ -715,7 +715,7 @@ static unsigned int cb_pcidda_read_eeprom(comedi_device * dev,
}
// writes to 8 bit calibration dacs
-static void cb_pcidda_write_caldac(comedi_device * dev, unsigned int caldac,
+static void cb_pcidda_write_caldac(struct comedi_device * dev, unsigned int caldac,
unsigned int channel, unsigned int value)
{
unsigned int cal2_bits;
@@ -801,7 +801,7 @@ static unsigned int eeprom_fine_byte(unsigned int word)
}
// set caldacs to eeprom values for given channel and range
-static void cb_pcidda_calibrate(comedi_device * dev, unsigned int channel,
+static void cb_pcidda_calibrate(struct comedi_device * dev, unsigned int channel,
unsigned int range)
{
unsigned int coarse_offset, fine_offset, coarse_gain, fine_gain;
diff --git a/drivers/staging/comedi/drivers/cb_pcidio.c b/drivers/staging/comedi/drivers/cb_pcidio.c
index e5bc34746e38..7f749bd61b58 100644
--- a/drivers/staging/comedi/drivers/cb_pcidio.c
+++ b/drivers/staging/comedi/drivers/cb_pcidio.c
@@ -102,7 +102,7 @@ MODULE_DEVICE_TABLE(pci, pcidio_pci_table);
/* this structure is for data unique to this hardware driver. If
several hardware drivers keep similar information in this structure,
- feel free to suggest moving the variable to the comedi_device struct. */
+ feel free to suggest moving the variable to the struct comedi_device struct. */
typedef struct {
int data; // curently unused
@@ -127,8 +127,8 @@ typedef struct {
* the board, and also about the kernel module that contains
* the device code.
*/
-static int pcidio_attach(comedi_device * dev, comedi_devconfig * it);
-static int pcidio_detach(comedi_device * dev);
+static int pcidio_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int pcidio_detach(struct comedi_device * dev);
static comedi_driver driver_cb_pcidio = {
driver_name:"cb_pcidio",
module:THIS_MODULE,
@@ -166,7 +166,7 @@ static comedi_driver driver_cb_pcidio = {
* in the driver structure, dev->board_ptr contains that
* address.
*/
-static int pcidio_attach(comedi_device * dev, comedi_devconfig * it)
+static int pcidio_attach(struct comedi_device * dev, comedi_devconfig * it)
{
struct pci_dev *pcidev = NULL;
int index;
@@ -267,7 +267,7 @@ static int pcidio_attach(comedi_device * dev, comedi_devconfig * it)
* allocated by _attach(). dev->private and dev->subdevices are
* deallocated automatically by the core.
*/
-static int pcidio_detach(comedi_device * dev)
+static int pcidio_detach(struct comedi_device * dev)
{
printk("comedi%d: cb_pcidio: remove\n", dev->minor);
if (devpriv) {
diff --git a/drivers/staging/comedi/drivers/cb_pcimdas.c b/drivers/staging/comedi/drivers/cb_pcimdas.c
index 1223635a4422..09be4e19522e 100644
--- a/drivers/staging/comedi/drivers/cb_pcimdas.c
+++ b/drivers/staging/comedi/drivers/cb_pcimdas.c
@@ -138,7 +138,7 @@ MODULE_DEVICE_TABLE(pci, cb_pcimdas_pci_table);
/* this structure is for data unique to this hardware driver. If
several hardware drivers keep similar information in this structure,
- feel free to suggest moving the variable to the comedi_device struct. */
+ feel free to suggest moving the variable to the struct comedi_device struct. */
typedef struct {
int data;
@@ -175,8 +175,8 @@ typedef struct {
* the board, and also about the kernel module that contains
* the device code.
*/
-static int cb_pcimdas_attach(comedi_device * dev, comedi_devconfig * it);
-static int cb_pcimdas_detach(comedi_device * dev);
+static int cb_pcimdas_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int cb_pcimdas_detach(struct comedi_device * dev);
static comedi_driver driver_cb_pcimdas = {
driver_name:"cb_pcimdas",
module:THIS_MODULE,
@@ -184,11 +184,11 @@ static comedi_driver driver_cb_pcimdas = {
detach:cb_pcimdas_detach,
};
-static int cb_pcimdas_ai_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int cb_pcimdas_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int cb_pcimdas_ao_winsn(comedi_device * dev, comedi_subdevice * s,
+static int cb_pcimdas_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int cb_pcimdas_ao_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int cb_pcimdas_ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
/*
@@ -197,7 +197,7 @@ static int cb_pcimdas_ao_rinsn(comedi_device * dev, comedi_subdevice * s,
* in the driver structure, dev->board_ptr contains that
* address.
*/
-static int cb_pcimdas_attach(comedi_device * dev, comedi_devconfig * it)
+static int cb_pcimdas_attach(struct comedi_device * dev, comedi_devconfig * it)
{
comedi_subdevice *s;
struct pci_dev *pcidev;
@@ -342,7 +342,7 @@ static int cb_pcimdas_attach(comedi_device * dev, comedi_devconfig * it)
* allocated by _attach(). dev->private and dev->subdevices are
* deallocated automatically by the core.
*/
-static int cb_pcimdas_detach(comedi_device * dev)
+static int cb_pcimdas_detach(struct comedi_device * dev)
{
#ifdef CBPCIMDAS_DEBUG
if (devpriv) {
@@ -372,7 +372,7 @@ static int cb_pcimdas_detach(comedi_device * dev)
* "instructions" read/write data in "one-shot" or "software-triggered"
* mode.
*/
-static int cb_pcimdas_ai_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int cb_pcimdas_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n, i;
@@ -437,7 +437,7 @@ static int cb_pcimdas_ai_rinsn(comedi_device * dev, comedi_subdevice * s,
return n;
}
-static int cb_pcimdas_ao_winsn(comedi_device * dev, comedi_subdevice * s,
+static int cb_pcimdas_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
@@ -465,7 +465,7 @@ static int cb_pcimdas_ao_winsn(comedi_device * dev, comedi_subdevice * s,
/* AO subdevices should have a read insn as well as a write insn.
* Usually this means copying a value stored in devpriv. */
-static int cb_pcimdas_ao_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int cb_pcimdas_ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
diff --git a/drivers/staging/comedi/drivers/cb_pcimdda.c b/drivers/staging/comedi/drivers/cb_pcimdda.c
index ac21056aa787..eb583bfd648c 100644
--- a/drivers/staging/comedi/drivers/cb_pcimdda.c
+++ b/drivers/staging/comedi/drivers/cb_pcimdda.c
@@ -154,7 +154,7 @@ MODULE_DEVICE_TABLE(pci, pci_table);
/* this structure is for data unique to this hardware driver. If
several hardware drivers keep similar information in this structure,
- feel free to suggest moving the variable to the comedi_device struct. */
+ feel free to suggest moving the variable to the struct comedi_device struct. */
typedef struct {
unsigned long registers; /* set by probe */
unsigned long dio_registers;
@@ -181,8 +181,8 @@ typedef struct {
* the board, and also about the kernel module that contains
* the device code.
*/
-static int attach(comedi_device * dev, comedi_devconfig * it);
-static int detach(comedi_device * dev);
+static int attach(struct comedi_device * dev, comedi_devconfig * it);
+static int detach(struct comedi_device * dev);
static comedi_driver cb_pcimdda_driver = {
driver_name:"cb_pcimdda",
module:THIS_MODULE,
@@ -197,9 +197,9 @@ MODULE_DESCRIPTION("Comedi low-level driver for the Computerboards PCIM-DDA "
MODULE_LICENSE("GPL");
COMEDI_PCI_INITCLEANUP_NOMODULE(cb_pcimdda_driver, pci_table);
-static int ao_winsn(comedi_device * dev, comedi_subdevice * s,
+static int ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int ao_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
/*---------------------------------------------------------------------------
@@ -226,7 +226,7 @@ static inline unsigned int figure_out_maxdata(int bits)
*
* Otherwise, returns a -errno on error
*/
-static int probe(comedi_device * dev, const comedi_devconfig * it);
+static int probe(struct comedi_device * dev, const comedi_devconfig * it);
/*---------------------------------------------------------------------------
FUNCTION DEFINITIONS
@@ -238,7 +238,7 @@ static int probe(comedi_device * dev, const comedi_devconfig * it);
* in the driver structure, dev->board_ptr contains that
* address.
*/
-static int attach(comedi_device * dev, comedi_devconfig * it)
+static int attach(struct comedi_device * dev, comedi_devconfig * it)
{
comedi_subdevice *s;
int err;
@@ -326,7 +326,7 @@ static int attach(comedi_device * dev, comedi_devconfig * it)
* allocated by _attach(). dev->private and dev->subdevices are
* deallocated automatically by the core.
*/
-static int detach(comedi_device * dev)
+static int detach(struct comedi_device * dev)
{
if (devpriv) {
@@ -352,7 +352,7 @@ static int detach(comedi_device * dev)
return 0;
}
-static int ao_winsn(comedi_device * dev, comedi_subdevice * s,
+static int ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
@@ -391,7 +391,7 @@ static int ao_winsn(comedi_device * dev, comedi_subdevice * s,
all AO channels update simultaneously. This is useful for some control
applications, I would imagine.
*/
-static int ao_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
@@ -425,7 +425,7 @@ static int ao_rinsn(comedi_device * dev, comedi_subdevice * s,
*
* Otherwise, returns a -errno on error
*/
-static int probe(comedi_device * dev, const comedi_devconfig * it)
+static int probe(struct comedi_device * dev, const comedi_devconfig * it)
{
struct pci_dev *pcidev;
int index;
diff --git a/drivers/staging/comedi/drivers/comedi_bond.c b/drivers/staging/comedi/drivers/comedi_bond.c
index 7868ddd6fe25..7d842a2bb5e0 100644
--- a/drivers/staging/comedi/drivers/comedi_bond.c
+++ b/drivers/staging/comedi/drivers/comedi_bond.c
@@ -154,7 +154,7 @@ struct BondedDevice {
/* this structure is for data unique to this hardware driver. If
several hardware drivers keep similar information in this structure,
- feel free to suggest moving the variable to the comedi_device struct. */
+ feel free to suggest moving the variable to the struct comedi_device struct. */
struct Private {
# define MAX_BOARD_NAME 256
char name[MAX_BOARD_NAME];
@@ -176,11 +176,11 @@ struct Private {
* the board, and also about the kernel module that contains
* the device code.
*/
-static int bonding_attach(comedi_device *dev, comedi_devconfig *it);
-static int bonding_detach(comedi_device *dev);
+static int bonding_attach(struct comedi_device *dev, comedi_devconfig *it);
+static int bonding_detach(struct comedi_device *dev);
/** Build Private array of all devices.. */
-static int doDevConfig(comedi_device *dev, comedi_devconfig *it);
-static void doDevUnconfig(comedi_device *dev);
+static int doDevConfig(struct comedi_device *dev, comedi_devconfig *it);
+static void doDevUnconfig(struct comedi_device *dev);
/* Ugly implementation of realloc that always copies memory around -- I'm lazy,
* what can I say? I like to do wasteful memcopies.. :) */
static void *Realloc(const void *ptr, size_t len, size_t old_len);
@@ -213,9 +213,9 @@ static comedi_driver driver_bonding = {
.num_names = sizeof(bondingBoards) / sizeof(struct BondingBoard),
};
-static int bonding_dio_insn_bits(comedi_device *dev, comedi_subdevice *s,
+static int bonding_dio_insn_bits(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-static int bonding_dio_insn_config(comedi_device *dev, comedi_subdevice *s,
+static int bonding_dio_insn_config(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
/*
@@ -224,7 +224,7 @@ static int bonding_dio_insn_config(comedi_device *dev, comedi_subdevice *s,
* in the driver structure, dev->board_ptr contains that
* address.
*/
-static int bonding_attach(comedi_device *dev, comedi_devconfig *it)
+static int bonding_attach(struct comedi_device *dev, comedi_devconfig *it)
{
comedi_subdevice *s;
@@ -281,7 +281,7 @@ static int bonding_attach(comedi_device *dev, comedi_devconfig *it)
* allocated by _attach(). dev->private and dev->subdevices are
* deallocated automatically by the core.
*/
-static int bonding_detach(comedi_device *dev)
+static int bonding_detach(struct comedi_device *dev)
{
LOG_MSG("comedi%d: remove\n", dev->minor);
doDevUnconfig(dev);
@@ -293,7 +293,7 @@ static int bonding_detach(comedi_device *dev)
* useful to applications if you implement the insn_bits interface.
* This allows packed reading/writing of the DIO channels. The
* comedi core can convert between insn_bits and insn_read/write */
-static int bonding_dio_insn_bits(comedi_device *dev, comedi_subdevice *s,
+static int bonding_dio_insn_bits(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
#define LSAMPL_BITS (sizeof(unsigned int)*8)
@@ -340,7 +340,7 @@ static int bonding_dio_insn_bits(comedi_device *dev, comedi_subdevice *s,
return insn->n;
}
-static int bonding_dio_insn_config(comedi_device *dev, comedi_subdevice *s,
+static int bonding_dio_insn_config(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
int chan = CR_CHAN(insn->chanspec), ret, io_bits = s->io_bits;
@@ -394,7 +394,7 @@ static void *Realloc(const void *oldmem, size_t newlen, size_t oldlen)
return newmem;
}
-static int doDevConfig(comedi_device *dev, comedi_devconfig *it)
+static int doDevConfig(struct comedi_device *dev, comedi_devconfig *it)
{
int i;
void *devs_opened[COMEDI_NUM_BOARD_MINORS];
@@ -497,7 +497,7 @@ static int doDevConfig(comedi_device *dev, comedi_devconfig *it)
return 1;
}
-static void doDevUnconfig(comedi_device *dev)
+static void doDevUnconfig(struct comedi_device *dev)
{
unsigned long devs_closed = 0;
diff --git a/drivers/staging/comedi/drivers/comedi_fc.c b/drivers/staging/comedi/drivers/comedi_fc.c
index cd74dbe5417d..842b250a7c65 100644
--- a/drivers/staging/comedi/drivers/comedi_fc.c
+++ b/drivers/staging/comedi/drivers/comedi_fc.c
@@ -85,7 +85,7 @@ unsigned int cfc_read_array_from_buffer(comedi_subdevice *subd, void *data,
}
EXPORT_SYMBOL(cfc_read_array_from_buffer);
-unsigned int cfc_handle_events(comedi_device *dev, comedi_subdevice *subd)
+unsigned int cfc_handle_events(struct comedi_device *dev, comedi_subdevice *subd)
{
unsigned int events = subd->async->events;
diff --git a/drivers/staging/comedi/drivers/comedi_fc.h b/drivers/staging/comedi/drivers/comedi_fc.h
index bbb70d66eee9..4f251cd509e6 100644
--- a/drivers/staging/comedi/drivers/comedi_fc.h
+++ b/drivers/staging/comedi/drivers/comedi_fc.h
@@ -50,7 +50,7 @@ extern unsigned int cfc_read_array_from_buffer(comedi_subdevice *subd,
void *data,
unsigned int num_bytes);
-extern unsigned int cfc_handle_events(comedi_device *dev,
+extern unsigned int cfc_handle_events(struct comedi_device *dev,
comedi_subdevice *subd);
static inline unsigned int cfc_bytes_per_scan(comedi_subdevice *subd)
diff --git a/drivers/staging/comedi/drivers/comedi_parport.c b/drivers/staging/comedi/drivers/comedi_parport.c
index 87c4c20694e0..b432d50df4d4 100644
--- a/drivers/staging/comedi/drivers/comedi_parport.c
+++ b/drivers/staging/comedi/drivers/comedi_parport.c
@@ -90,8 +90,8 @@ pin, which can be used to wake up tasks.
#define PARPORT_B 1
#define PARPORT_C 2
-static int parport_attach(comedi_device *dev, comedi_devconfig *it);
-static int parport_detach(comedi_device *dev);
+static int parport_attach(struct comedi_device *dev, comedi_devconfig *it);
+static int parport_detach(struct comedi_device *dev);
static comedi_driver driver_parport = {
.driver_name = "comedi_parport",
.module = THIS_MODULE,
@@ -108,7 +108,7 @@ struct parport_private {
};
#define devpriv ((struct parport_private *)(dev->private))
-static int parport_insn_a(comedi_device *dev, comedi_subdevice *s,
+static int parport_insn_a(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
if (data[0]) {
@@ -123,7 +123,7 @@ static int parport_insn_a(comedi_device *dev, comedi_subdevice *s,
return 2;
}
-static int parport_insn_config_a(comedi_device *dev, comedi_subdevice *s,
+static int parport_insn_config_a(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
if (data[0]) {
@@ -138,7 +138,7 @@ static int parport_insn_config_a(comedi_device *dev, comedi_subdevice *s,
return 1;
}
-static int parport_insn_b(comedi_device *dev, comedi_subdevice *s,
+static int parport_insn_b(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
if (data[0]) {
@@ -151,7 +151,7 @@ static int parport_insn_b(comedi_device *dev, comedi_subdevice *s,
return 2;
}
-static int parport_insn_c(comedi_device *dev, comedi_subdevice *s,
+static int parport_insn_c(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
data[0] &= 0x0f;
@@ -167,7 +167,7 @@ static int parport_insn_c(comedi_device *dev, comedi_subdevice *s,
return 2;
}
-static int parport_intr_insn(comedi_device *dev, comedi_subdevice *s,
+static int parport_intr_insn(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
if (insn->n < 1)
@@ -177,7 +177,7 @@ static int parport_intr_insn(comedi_device *dev, comedi_subdevice *s,
return 2;
}
-static int parport_intr_cmdtest(comedi_device *dev, comedi_subdevice *s,
+static int parport_intr_cmdtest(struct comedi_device *dev, comedi_subdevice *s,
comedi_cmd *cmd)
{
int err = 0;
@@ -252,7 +252,7 @@ static int parport_intr_cmdtest(comedi_device *dev, comedi_subdevice *s,
return 0;
}
-static int parport_intr_cmd(comedi_device *dev, comedi_subdevice *s)
+static int parport_intr_cmd(struct comedi_device *dev, comedi_subdevice *s)
{
devpriv->c_data |= 0x10;
outb(devpriv->c_data, dev->iobase + PARPORT_C);
@@ -262,7 +262,7 @@ static int parport_intr_cmd(comedi_device *dev, comedi_subdevice *s)
return 0;
}
-static int parport_intr_cancel(comedi_device *dev, comedi_subdevice *s)
+static int parport_intr_cancel(struct comedi_device *dev, comedi_subdevice *s)
{
printk(KERN_DEBUG "parport_intr_cancel()\n");
@@ -276,7 +276,7 @@ static int parport_intr_cancel(comedi_device *dev, comedi_subdevice *s)
static irqreturn_t parport_interrupt(int irq, void *d PT_REGS_ARG)
{
- comedi_device *dev = d;
+ struct comedi_device *dev = d;
comedi_subdevice *s = dev->subdevices + 3;
if (!devpriv->enable_irq) {
@@ -291,7 +291,7 @@ static irqreturn_t parport_interrupt(int irq, void *d PT_REGS_ARG)
return IRQ_HANDLED;
}
-static int parport_attach(comedi_device *dev, comedi_devconfig *it)
+static int parport_attach(struct comedi_device *dev, comedi_devconfig *it)
{
int ret;
unsigned int irq;
@@ -376,7 +376,7 @@ static int parport_attach(comedi_device *dev, comedi_devconfig *it)
return 1;
}
-static int parport_detach(comedi_device *dev)
+static int parport_detach(struct comedi_device *dev)
{
printk("comedi%d: parport: remove\n", dev->minor);
diff --git a/drivers/staging/comedi/drivers/comedi_rt_timer.c b/drivers/staging/comedi/drivers/comedi_rt_timer.c
index ec081c4180c6..202b04b2e394 100644
--- a/drivers/staging/comedi/drivers/comedi_rt_timer.c
+++ b/drivers/staging/comedi/drivers/comedi_rt_timer.c
@@ -122,11 +122,11 @@ static inline RTIME nano2count(long long ns)
* task period because analog input tends to be slow. */
#define SPEED_LIMIT 100000 /* in nanoseconds */
-static int timer_attach(comedi_device * dev, comedi_devconfig * it);
-static int timer_detach(comedi_device * dev);
-static int timer_inttrig(comedi_device * dev, comedi_subdevice * s,
+static int timer_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int timer_detach(struct comedi_device * dev);
+static int timer_inttrig(struct comedi_device * dev, comedi_subdevice * s,
unsigned int trig_num);
-static int timer_start_cmd(comedi_device * dev, comedi_subdevice * s);
+static int timer_start_cmd(struct comedi_device * dev, comedi_subdevice * s);
static comedi_driver driver_timer = {
module:THIS_MODULE,
@@ -145,7 +145,7 @@ typedef struct {
RT_TASK *scan_task; // rt task that controls conversion timing in a scan
/* io_function can point to either an input or output function
* depending on what kind of subdevice we are emulating for */
- int (*io_function) (comedi_device * dev, comedi_cmd * cmd,
+ int (*io_function) (struct comedi_device * dev, comedi_cmd * cmd,
unsigned int index);
// RTIME has units of 1 = 838 nanoseconds
// time at which first scan started, used to check scan timing
@@ -162,7 +162,7 @@ typedef struct {
} timer_private;
#define devpriv ((timer_private *)dev->private)
-static int timer_cancel(comedi_device * dev, comedi_subdevice * s)
+static int timer_cancel(struct comedi_device * dev, comedi_subdevice * s)
{
devpriv->stop = 1;
@@ -170,7 +170,7 @@ static int timer_cancel(comedi_device * dev, comedi_subdevice * s)
}
// checks for scan timing error
-inline static int check_scan_timing(comedi_device * dev,
+inline static int check_scan_timing(struct comedi_device * dev,
unsigned long long scan)
{
RTIME now, timing_error;
@@ -187,7 +187,7 @@ inline static int check_scan_timing(comedi_device * dev,
}
// checks for conversion timing error
-inline static int check_conversion_timing(comedi_device * dev,
+inline static int check_conversion_timing(struct comedi_device * dev,
RTIME scan_start, unsigned int conversion)
{
RTIME now, timing_error;
@@ -206,7 +206,7 @@ inline static int check_conversion_timing(comedi_device * dev,
}
// devpriv->io_function for an input subdevice
-static int timer_data_read(comedi_device * dev, comedi_cmd * cmd,
+static int timer_data_read(struct comedi_device * dev, comedi_cmd * cmd,
unsigned int index)
{
comedi_subdevice *s = dev->read_subdev;
@@ -231,7 +231,7 @@ static int timer_data_read(comedi_device * dev, comedi_cmd * cmd,
}
// devpriv->io_function for an output subdevice
-static int timer_data_write(comedi_device * dev, comedi_cmd * cmd,
+static int timer_data_write(struct comedi_device * dev, comedi_cmd * cmd,
unsigned int index)
{
comedi_subdevice *s = dev->write_subdev;
@@ -266,7 +266,7 @@ static int timer_data_write(comedi_device * dev, comedi_cmd * cmd,
}
// devpriv->io_function for DIO subdevices
-static int timer_dio_read(comedi_device * dev, comedi_cmd * cmd,
+static int timer_dio_read(struct comedi_device * dev, comedi_cmd * cmd,
unsigned int index)
{
comedi_subdevice *s = dev->read_subdev;
@@ -290,7 +290,7 @@ static int timer_dio_read(comedi_device * dev, comedi_cmd * cmd,
// performs scans
static void scan_task_func(comedi_rt_task_context_t d)
{
- comedi_device *dev = (comedi_device *) d;
+ struct comedi_device *dev = (struct comedi_device *) d;
comedi_subdevice *s = dev->subdevices + 0;
comedi_async *async = s->async;
comedi_cmd *cmd = &async->cmd;
@@ -360,7 +360,7 @@ static void scan_task_func(comedi_rt_task_context_t d)
static void timer_task_func(comedi_rt_task_context_t d)
{
- comedi_device *dev = (comedi_device *) d;
+ struct comedi_device *dev = (struct comedi_device *) d;
comedi_subdevice *s = dev->subdevices + 0;
comedi_cmd *cmd = &s->async->cmd;
int ret;
@@ -396,7 +396,7 @@ static void timer_task_func(comedi_rt_task_context_t d)
}
}
-static int timer_insn(comedi_device * dev, comedi_subdevice * s,
+static int timer_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
comedi_insn xinsn = *insn;
@@ -444,7 +444,7 @@ static int cmdtest_helper(comedi_cmd * cmd,
return err;
}
-static int timer_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int timer_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
@@ -516,7 +516,7 @@ static int timer_cmdtest(comedi_device * dev, comedi_subdevice * s,
return 0;
}
-static int timer_cmd(comedi_device * dev, comedi_subdevice * s)
+static int timer_cmd(struct comedi_device * dev, comedi_subdevice * s)
{
int ret;
comedi_cmd *cmd = &s->async->cmd;
@@ -567,7 +567,7 @@ static int timer_cmd(comedi_device * dev, comedi_subdevice * s)
return 0;
}
-static int timer_inttrig(comedi_device * dev, comedi_subdevice * s,
+static int timer_inttrig(struct comedi_device * dev, comedi_subdevice * s,
unsigned int trig_num)
{
if (trig_num != 0)
@@ -578,7 +578,7 @@ static int timer_inttrig(comedi_device * dev, comedi_subdevice * s,
return timer_start_cmd(dev, s);
}
-static int timer_start_cmd(comedi_device * dev, comedi_subdevice * s)
+static int timer_start_cmd(struct comedi_device * dev, comedi_subdevice * s)
{
comedi_async *async = s->async;
comedi_cmd *cmd = &async->cmd;
@@ -607,11 +607,11 @@ static int timer_start_cmd(comedi_device * dev, comedi_subdevice * s)
return 0;
}
-static int timer_attach(comedi_device * dev, comedi_devconfig * it)
+static int timer_attach(struct comedi_device * dev, comedi_devconfig * it)
{
int ret;
comedi_subdevice *s, *emul_s;
- comedi_device *emul_dev;
+ struct comedi_device *emul_dev;
/* These should probably be devconfig options[] */
const int timer_priority = 4;
const int scan_priority = timer_priority + 1;
@@ -706,7 +706,7 @@ static int timer_attach(comedi_device * dev, comedi_devconfig * it)
}
// free allocated resources
-static int timer_detach(comedi_device * dev)
+static int timer_detach(struct comedi_device * dev)
{
printk("comedi%d: timer: remove\n", dev->minor);
diff --git a/drivers/staging/comedi/drivers/comedi_test.c b/drivers/staging/comedi/drivers/comedi_test.c
index f65ee2b52042..70aeb6088e1b 100644
--- a/drivers/staging/comedi/drivers/comedi_test.c
+++ b/drivers/staging/comedi/drivers/comedi_test.c
@@ -93,8 +93,8 @@ struct waveform_private {
};
#define devpriv ((struct waveform_private *)dev->private)
-static int waveform_attach(comedi_device *dev, comedi_devconfig *it);
-static int waveform_detach(comedi_device *dev);
+static int waveform_attach(struct comedi_device *dev, comedi_devconfig *it);
+static int waveform_detach(struct comedi_device *dev);
static comedi_driver driver_waveform = {
.driver_name = "comedi_test",
.module = THIS_MODULE,
@@ -107,21 +107,21 @@ static comedi_driver driver_waveform = {
COMEDI_INITCLEANUP(driver_waveform);
-static int waveform_ai_cmdtest(comedi_device *dev, comedi_subdevice *s,
+static int waveform_ai_cmdtest(struct comedi_device *dev, comedi_subdevice *s,
comedi_cmd *cmd);
-static int waveform_ai_cmd(comedi_device *dev, comedi_subdevice *s);
-static int waveform_ai_cancel(comedi_device *dev, comedi_subdevice *s);
-static int waveform_ai_insn_read(comedi_device *dev, comedi_subdevice *s,
+static int waveform_ai_cmd(struct comedi_device *dev, comedi_subdevice *s);
+static int waveform_ai_cancel(struct comedi_device *dev, comedi_subdevice *s);
+static int waveform_ai_insn_read(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-static int waveform_ao_insn_write(comedi_device *dev, comedi_subdevice *s,
+static int waveform_ao_insn_write(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-static short fake_sawtooth(comedi_device *dev, unsigned int range,
+static short fake_sawtooth(struct comedi_device *dev, unsigned int range,
unsigned long current_time);
-static short fake_squarewave(comedi_device *dev, unsigned int range,
+static short fake_squarewave(struct comedi_device *dev, unsigned int range,
unsigned long current_time);
-static short fake_flatline(comedi_device *dev, unsigned int range,
+static short fake_flatline(struct comedi_device *dev, unsigned int range,
unsigned long current_time);
-static short fake_waveform(comedi_device *dev, unsigned int channel,
+static short fake_waveform(struct comedi_device *dev, unsigned int channel,
unsigned int range, unsigned long current_time);
/* 1000 nanosec in a microsec */
@@ -143,7 +143,7 @@ static const comedi_lrange waveform_ai_ranges = {
*/
static void waveform_ai_interrupt(unsigned long arg)
{
- comedi_device *dev = (comedi_device *) arg;
+ struct comedi_device *dev = (struct comedi_device *) arg;
comedi_async *async = dev->read_subdev->async;
comedi_cmd *cmd = &async->cmd;
unsigned int i, j;
@@ -192,7 +192,7 @@ static void waveform_ai_interrupt(unsigned long arg)
comedi_event(dev, dev->read_subdev);
}
-static int waveform_attach(comedi_device *dev, comedi_devconfig *it)
+static int waveform_attach(struct comedi_device *dev, comedi_devconfig *it)
{
comedi_subdevice *s;
int amplitude = it->options[0];
@@ -259,7 +259,7 @@ static int waveform_attach(comedi_device *dev, comedi_devconfig *it)
return 1;
}
-static int waveform_detach(comedi_device *dev)
+static int waveform_detach(struct comedi_device *dev)
{
printk("comedi%d: comedi_test: remove\n", dev->minor);
@@ -269,7 +269,7 @@ static int waveform_detach(comedi_device *dev)
return 0;
}
-static int waveform_ai_cmdtest(comedi_device *dev, comedi_subdevice *s,
+static int waveform_ai_cmdtest(struct comedi_device *dev, comedi_subdevice *s,
comedi_cmd *cmd)
{
int err = 0;
@@ -397,7 +397,7 @@ static int waveform_ai_cmdtest(comedi_device *dev, comedi_subdevice *s,
return 0;
}
-static int waveform_ai_cmd(comedi_device *dev, comedi_subdevice *s)
+static int waveform_ai_cmd(struct comedi_device *dev, comedi_subdevice *s)
{
comedi_cmd *cmd = &s->async->cmd;
@@ -429,14 +429,14 @@ static int waveform_ai_cmd(comedi_device *dev, comedi_subdevice *s)
return 0;
}
-static int waveform_ai_cancel(comedi_device *dev, comedi_subdevice *s)
+static int waveform_ai_cancel(struct comedi_device *dev, comedi_subdevice *s)
{
devpriv->timer_running = 0;
del_timer(&devpriv->timer);
return 0;
}
-static short fake_sawtooth(comedi_device *dev, unsigned int range_index,
+static short fake_sawtooth(struct comedi_device *dev, unsigned int range_index,
unsigned long current_time)
{
comedi_subdevice *s = dev->read_subdev;
@@ -457,7 +457,7 @@ static short fake_sawtooth(comedi_device *dev, unsigned int range_index,
return offset + value;
}
-static short fake_squarewave(comedi_device *dev, unsigned int range_index,
+static short fake_squarewave(struct comedi_device *dev, unsigned int range_index,
unsigned long current_time)
{
comedi_subdevice *s = dev->read_subdev;
@@ -476,14 +476,14 @@ static short fake_squarewave(comedi_device *dev, unsigned int range_index,
return offset + value;
}
-static short fake_flatline(comedi_device *dev, unsigned int range_index,
+static short fake_flatline(struct comedi_device *dev, unsigned int range_index,
unsigned long current_time)
{
return dev->read_subdev->maxdata / 2;
}
/* generates a different waveform depending on what channel is read */
-static short fake_waveform(comedi_device *dev, unsigned int channel,
+static short fake_waveform(struct comedi_device *dev, unsigned int channel,
unsigned int range, unsigned long current_time)
{
enum {
@@ -504,7 +504,7 @@ static short fake_waveform(comedi_device *dev, unsigned int channel,
return fake_flatline(dev, range, current_time);
}
-static int waveform_ai_insn_read(comedi_device *dev, comedi_subdevice *s,
+static int waveform_ai_insn_read(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
int i, chan = CR_CHAN(insn->chanspec);
@@ -515,7 +515,7 @@ static int waveform_ai_insn_read(comedi_device *dev, comedi_subdevice *s,
return insn->n;
}
-static int waveform_ao_insn_write(comedi_device *dev, comedi_subdevice *s,
+static int waveform_ao_insn_write(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
int i, chan = CR_CHAN(insn->chanspec);
diff --git a/drivers/staging/comedi/drivers/contec_pci_dio.c b/drivers/staging/comedi/drivers/contec_pci_dio.c
index 3049eb26674b..845f97e81280 100644
--- a/drivers/staging/comedi/drivers/contec_pci_dio.c
+++ b/drivers/staging/comedi/drivers/contec_pci_dio.c
@@ -75,8 +75,8 @@ typedef struct {
#define devpriv ((contec_private *)dev->private)
-static int contec_attach(comedi_device * dev, comedi_devconfig * it);
-static int contec_detach(comedi_device * dev);
+static int contec_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int contec_detach(struct comedi_device * dev);
static comedi_driver driver_contec = {
driver_name:"contec_pci_dio",
module:THIS_MODULE,
@@ -85,19 +85,19 @@ static comedi_driver driver_contec = {
};
/* Classic digital IO */
-static int contec_di_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int contec_di_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int contec_do_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int contec_do_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
#if 0
-static int contec_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int contec_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd);
static int contec_ns_to_timer(unsigned int *ns, int round);
#endif
-static int contec_attach(comedi_device * dev, comedi_devconfig * it)
+static int contec_attach(struct comedi_device * dev, comedi_devconfig * it)
{
struct pci_dev *pcidev;
comedi_subdevice *s;
@@ -164,7 +164,7 @@ static int contec_attach(comedi_device * dev, comedi_devconfig * it)
return -EIO;
}
-static int contec_detach(comedi_device * dev)
+static int contec_detach(struct comedi_device * dev)
{
printk("comedi%d: contec: remove\n", dev->minor);
@@ -179,7 +179,7 @@ static int contec_detach(comedi_device * dev)
}
#if 0
-static int contec_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int contec_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd)
{
printk("contec_cmdtest called\n");
@@ -192,7 +192,7 @@ static int contec_ns_to_timer(unsigned int *ns, int round)
}
#endif
-static int contec_do_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int contec_do_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
@@ -212,7 +212,7 @@ static int contec_do_insn_bits(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int contec_di_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int contec_di_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
diff --git a/drivers/staging/comedi/drivers/daqboard2000.c b/drivers/staging/comedi/drivers/daqboard2000.c
index 86cab4295d9e..21bf5d3131b7 100644
--- a/drivers/staging/comedi/drivers/daqboard2000.c
+++ b/drivers/staging/comedi/drivers/daqboard2000.c
@@ -296,8 +296,8 @@ typedef struct daqboard2000_hw {
#define DAQBOARD2000_PosRefDacSelect 0x0100
#define DAQBOARD2000_NegRefDacSelect 0x0000
-static int daqboard2000_attach(comedi_device * dev, comedi_devconfig * it);
-static int daqboard2000_detach(comedi_device * dev);
+static int daqboard2000_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int daqboard2000_detach(struct comedi_device * dev);
static comedi_driver driver_daqboard2000 = {
driver_name:"daqboard2000",
@@ -338,7 +338,7 @@ typedef struct {
#define devpriv ((daqboard2000_private*)dev->private)
-static void writeAcqScanListEntry(comedi_device * dev, u16 entry)
+static void writeAcqScanListEntry(struct comedi_device * dev, u16 entry)
{
daqboard2000_hw *fpga = devpriv->daq;
@@ -348,7 +348,7 @@ static void writeAcqScanListEntry(comedi_device * dev, u16 entry)
fpga->acqScanListFIFO = (entry >> 8) & 0x00ff;
}
-static void setup_sampling(comedi_device * dev, int chan, int gain)
+static void setup_sampling(struct comedi_device * dev, int chan, int gain)
{
u16 word0, word1, word2, word3;
@@ -393,7 +393,7 @@ static void setup_sampling(comedi_device * dev, int chan, int gain)
writeAcqScanListEntry(dev, word3);
}
-static int daqboard2000_ai_insn_read(comedi_device * dev, comedi_subdevice * s,
+static int daqboard2000_ai_insn_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
@@ -450,7 +450,7 @@ static int daqboard2000_ai_insn_read(comedi_device * dev, comedi_subdevice * s,
return i;
}
-static int daqboard2000_ao_insn_read(comedi_device * dev, comedi_subdevice * s,
+static int daqboard2000_ao_insn_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
@@ -463,7 +463,7 @@ static int daqboard2000_ao_insn_read(comedi_device * dev, comedi_subdevice * s,
return i;
}
-static int daqboard2000_ao_insn_write(comedi_device * dev, comedi_subdevice * s,
+static int daqboard2000_ao_insn_write(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
@@ -494,7 +494,7 @@ static int daqboard2000_ao_insn_write(comedi_device * dev, comedi_subdevice * s,
return i;
}
-static void daqboard2000_resetLocalBus(comedi_device * dev)
+static void daqboard2000_resetLocalBus(struct comedi_device * dev)
{
printk("daqboard2000_resetLocalBus\n");
writel(DAQBOARD2000_SECRLocalBusHi, devpriv->plx + 0x6c);
@@ -503,7 +503,7 @@ static void daqboard2000_resetLocalBus(comedi_device * dev)
comedi_udelay(10000);
}
-static void daqboard2000_reloadPLX(comedi_device * dev)
+static void daqboard2000_reloadPLX(struct comedi_device * dev)
{
printk("daqboard2000_reloadPLX\n");
writel(DAQBOARD2000_SECRReloadLo, devpriv->plx + 0x6c);
@@ -514,7 +514,7 @@ static void daqboard2000_reloadPLX(comedi_device * dev)
comedi_udelay(10000);
}
-static void daqboard2000_pulseProgPin(comedi_device * dev)
+static void daqboard2000_pulseProgPin(struct comedi_device * dev)
{
printk("daqboard2000_pulseProgPin 1\n");
writel(DAQBOARD2000_SECRProgPinHi, devpriv->plx + 0x6c);
@@ -523,7 +523,7 @@ static void daqboard2000_pulseProgPin(comedi_device * dev)
comedi_udelay(10000); /* Not in the original code, but I like symmetry... */
}
-static int daqboard2000_pollCPLD(comedi_device * dev, int mask)
+static int daqboard2000_pollCPLD(struct comedi_device * dev, int mask)
{
int result = 0;
int i;
@@ -542,7 +542,7 @@ static int daqboard2000_pollCPLD(comedi_device * dev, int mask)
return result;
}
-static int daqboard2000_writeCPLD(comedi_device * dev, int data)
+static int daqboard2000_writeCPLD(struct comedi_device * dev, int data)
{
int result = 0;
@@ -555,7 +555,7 @@ static int daqboard2000_writeCPLD(comedi_device * dev, int data)
return result;
}
-static int initialize_daqboard2000(comedi_device * dev,
+static int initialize_daqboard2000(struct comedi_device * dev,
unsigned char *cpld_array, int len)
{
int result = -EIO;
@@ -613,12 +613,12 @@ static int initialize_daqboard2000(comedi_device * dev,
return result;
}
-static void daqboard2000_adcStopDmaTransfer(comedi_device * dev)
+static void daqboard2000_adcStopDmaTransfer(struct comedi_device * dev)
{
/* printk("Implement: daqboard2000_adcStopDmaTransfer\n");*/
}
-static void daqboard2000_adcDisarm(comedi_device * dev)
+static void daqboard2000_adcDisarm(struct comedi_device * dev)
{
daqboard2000_hw *fpga = devpriv->daq;
@@ -640,7 +640,7 @@ static void daqboard2000_adcDisarm(comedi_device * dev)
daqboard2000_adcStopDmaTransfer(dev);
}
-static void daqboard2000_activateReferenceDacs(comedi_device * dev)
+static void daqboard2000_activateReferenceDacs(struct comedi_device * dev)
{
daqboard2000_hw *fpga = devpriv->daq;
int timeout;
@@ -666,22 +666,22 @@ static void daqboard2000_activateReferenceDacs(comedi_device * dev)
/* printk("DAQBOARD2000_NegRefDacSelect %d\n", timeout);*/
}
-static void daqboard2000_initializeCtrs(comedi_device * dev)
+static void daqboard2000_initializeCtrs(struct comedi_device * dev)
{
/* printk("Implement: daqboard2000_initializeCtrs\n");*/
}
-static void daqboard2000_initializeTmrs(comedi_device * dev)
+static void daqboard2000_initializeTmrs(struct comedi_device * dev)
{
/* printk("Implement: daqboard2000_initializeTmrs\n");*/
}
-static void daqboard2000_dacDisarm(comedi_device * dev)
+static void daqboard2000_dacDisarm(struct comedi_device * dev)
{
/* printk("Implement: daqboard2000_dacDisarm\n");*/
}
-static void daqboard2000_initializeAdc(comedi_device * dev)
+static void daqboard2000_initializeAdc(struct comedi_device * dev)
{
daqboard2000_adcDisarm(dev);
daqboard2000_activateReferenceDacs(dev);
@@ -689,7 +689,7 @@ static void daqboard2000_initializeAdc(comedi_device * dev)
daqboard2000_initializeTmrs(dev);
}
-static void daqboard2000_initializeDac(comedi_device * dev)
+static void daqboard2000_initializeDac(struct comedi_device * dev)
{
daqboard2000_dacDisarm(dev);
}
@@ -717,7 +717,7 @@ static int daqboard2000_8255_cb(int dir, int port, int data,
return result;
}
-static int daqboard2000_attach(comedi_device * dev, comedi_devconfig * it)
+static int daqboard2000_attach(struct comedi_device * dev, comedi_devconfig * it)
{
int result = 0;
comedi_subdevice *s;
@@ -849,7 +849,7 @@ static int daqboard2000_attach(comedi_device * dev, comedi_devconfig * it)
return result;
}
-static int daqboard2000_detach(comedi_device * dev)
+static int daqboard2000_detach(struct comedi_device * dev)
{
printk("comedi%d: daqboard2000: remove\n", dev->minor);
diff --git a/drivers/staging/comedi/drivers/das08.c b/drivers/staging/comedi/drivers/das08.c
index 8d4903dc03d6..1614a2070aff 100644
--- a/drivers/staging/comedi/drivers/das08.c
+++ b/drivers/staging/comedi/drivers/das08.c
@@ -154,19 +154,19 @@ driver.
/* gainlist same as _pgx_ below */
-static int das08_ai_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int das08_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int das08_di_rbits(comedi_device * dev, comedi_subdevice * s,
+static int das08_di_rbits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int das08_do_wbits(comedi_device * dev, comedi_subdevice * s,
+static int das08_do_wbits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int das08jr_di_rbits(comedi_device * dev, comedi_subdevice * s,
+static int das08jr_di_rbits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int das08jr_do_wbits(comedi_device * dev, comedi_subdevice * s,
+static int das08jr_do_wbits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int das08jr_ao_winsn(comedi_device * dev, comedi_subdevice * s,
+static int das08jr_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int das08ao_ao_winsn(comedi_device * dev, comedi_subdevice * s,
+static int das08ao_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
static void i8254_set_mode_low(unsigned int base, int channel,
unsigned int mode);
@@ -512,7 +512,7 @@ MODULE_DEVICE_TABLE(pci, das08_pci_table);
#define TIMEOUT 100000
-static int das08_ai_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int das08_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i, n;
@@ -579,7 +579,7 @@ static int das08_ai_rinsn(comedi_device * dev, comedi_subdevice * s,
return n;
}
-static int das08_di_rbits(comedi_device * dev, comedi_subdevice * s,
+static int das08_di_rbits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
data[0] = 0;
@@ -588,7 +588,7 @@ static int das08_di_rbits(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int das08_do_wbits(comedi_device * dev, comedi_subdevice * s,
+static int das08_do_wbits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int wbits;
@@ -611,7 +611,7 @@ static int das08_do_wbits(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int das08jr_di_rbits(comedi_device * dev, comedi_subdevice * s,
+static int das08jr_di_rbits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
data[0] = 0;
@@ -620,7 +620,7 @@ static int das08jr_di_rbits(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int das08jr_do_wbits(comedi_device * dev, comedi_subdevice * s,
+static int das08jr_do_wbits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
// null bits we are going to set
@@ -634,7 +634,7 @@ static int das08jr_do_wbits(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int das08jr_ao_winsn(comedi_device * dev, comedi_subdevice * s,
+static int das08jr_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n;
@@ -668,7 +668,7 @@ static int das08jr_ao_winsn(comedi_device * dev, comedi_subdevice * s,
* a different method to force an update.
*
*/
-static int das08ao_ao_winsn(comedi_device * dev, comedi_subdevice * s,
+static int das08ao_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n;
@@ -782,7 +782,7 @@ static unsigned int i8254_read_status(struct i8254_struct *st, int channel)
return i8254_read_status_low(st->iobase, chan);
}
-static int das08_counter_read(comedi_device * dev, comedi_subdevice * s,
+static int das08_counter_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int chan = insn->chanspec;
@@ -794,7 +794,7 @@ static int das08_counter_read(comedi_device * dev, comedi_subdevice * s,
return 1;
}
-static int das08_counter_write(comedi_device * dev, comedi_subdevice * s,
+static int das08_counter_write(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int chan = insn->chanspec;
@@ -805,7 +805,7 @@ static int das08_counter_write(comedi_device * dev, comedi_subdevice * s,
return 1;
}
-static int das08_counter_config(comedi_device * dev, comedi_subdevice * s,
+static int das08_counter_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int chan = insn->chanspec;
@@ -827,7 +827,7 @@ static int das08_counter_config(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int das08_attach(comedi_device * dev, comedi_devconfig * it);
+static int das08_attach(struct comedi_device * dev, comedi_devconfig * it);
static comedi_driver driver_das08 = {
driver_name: DRV_NAME,
@@ -840,7 +840,7 @@ static comedi_driver driver_das08 = {
offset:sizeof(struct das08_board_struct),
};
-int das08_common_attach(comedi_device * dev, unsigned long iobase)
+int das08_common_attach(struct comedi_device * dev, unsigned long iobase)
{
comedi_subdevice *s;
int ret;
@@ -952,7 +952,7 @@ int das08_common_attach(comedi_device * dev, unsigned long iobase)
return 0;
}
-static int das08_attach(comedi_device * dev, comedi_devconfig * it)
+static int das08_attach(struct comedi_device * dev, comedi_devconfig * it)
{
int ret;
unsigned long iobase;
@@ -1028,7 +1028,7 @@ static int das08_attach(comedi_device * dev, comedi_devconfig * it)
return das08_common_attach(dev, iobase);
}
-int das08_common_detach(comedi_device * dev)
+int das08_common_detach(struct comedi_device * dev)
{
printk(KERN_INFO "comedi%d: das08: remove\n", dev->minor);
diff --git a/drivers/staging/comedi/drivers/das08.h b/drivers/staging/comedi/drivers/das08.h
index 6342fbaf7bf0..9f82527ec834 100644
--- a/drivers/staging/comedi/drivers/das08.h
+++ b/drivers/staging/comedi/drivers/das08.h
@@ -72,7 +72,7 @@ struct das08_private_struct {
#define NUM_DAS08_CS_BOARDS 2
extern struct das08_board_struct das08_cs_boards[NUM_DAS08_CS_BOARDS];
-int das08_common_attach(comedi_device * dev, unsigned long iobase);
-int das08_common_detach(comedi_device * dev);
+int das08_common_attach(struct comedi_device * dev, unsigned long iobase);
+int das08_common_detach(struct comedi_device * dev);
#endif /* _DAS08_H */
diff --git a/drivers/staging/comedi/drivers/das08_cs.c b/drivers/staging/comedi/drivers/das08_cs.c
index d5390e630878..0e56f1d762de 100644
--- a/drivers/staging/comedi/drivers/das08_cs.c
+++ b/drivers/staging/comedi/drivers/das08_cs.c
@@ -56,7 +56,7 @@ static struct pcmcia_device *cur_dev = NULL;
#define thisboard ((const struct das08_board_struct *)dev->board_ptr)
-static int das08_cs_attach(comedi_device * dev, comedi_devconfig * it);
+static int das08_cs_attach(struct comedi_device * dev, comedi_devconfig * it);
static comedi_driver driver_das08_cs = {
driver_name:"das08_cs",
@@ -69,7 +69,7 @@ static comedi_driver driver_das08_cs = {
offset:sizeof(struct das08_board_struct),
};
-static int das08_cs_attach(comedi_device * dev, comedi_devconfig * it)
+static int das08_cs_attach(struct comedi_device * dev, comedi_devconfig * it)
{
int ret;
unsigned long iobase;
diff --git a/drivers/staging/comedi/drivers/das16.c b/drivers/staging/comedi/drivers/das16.c
index dd28385fc12f..07f8856c2c39 100644
--- a/drivers/staging/comedi/drivers/das16.c
+++ b/drivers/staging/comedi/drivers/das16.c
@@ -326,34 +326,34 @@ struct munge_info {
unsigned have_byte:1;
};
-static int das16_ao_winsn(comedi_device * dev, comedi_subdevice * s,
+static int das16_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int das16_do_wbits(comedi_device * dev, comedi_subdevice * s,
+static int das16_do_wbits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int das16_di_rbits(comedi_device * dev, comedi_subdevice * s,
+static int das16_di_rbits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int das16_ai_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int das16_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int das16_cmd_test(comedi_device * dev, comedi_subdevice * s,
+static int das16_cmd_test(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd);
-static int das16_cmd_exec(comedi_device * dev, comedi_subdevice * s);
-static int das16_cancel(comedi_device * dev, comedi_subdevice * s);
-static void das16_ai_munge(comedi_device * dev, comedi_subdevice * s,
+static int das16_cmd_exec(struct comedi_device * dev, comedi_subdevice * s);
+static int das16_cancel(struct comedi_device * dev, comedi_subdevice * s);
+static void das16_ai_munge(struct comedi_device * dev, comedi_subdevice * s,
void *array, unsigned int num_bytes, unsigned int start_chan_index);
-static void das16_reset(comedi_device * dev);
+static void das16_reset(struct comedi_device * dev);
static irqreturn_t das16_dma_interrupt(int irq, void *d PT_REGS_ARG);
static void das16_timer_interrupt(unsigned long arg);
-static void das16_interrupt(comedi_device * dev);
+static void das16_interrupt(struct comedi_device * dev);
-static unsigned int das16_set_pacer(comedi_device * dev, unsigned int ns,
+static unsigned int das16_set_pacer(struct comedi_device * dev, unsigned int ns,
int flags);
-static int das1600_mode_detect(comedi_device * dev);
-static unsigned int das16_suggest_transfer_size(comedi_device * dev,
+static int das1600_mode_detect(struct comedi_device * dev);
+static unsigned int das16_suggest_transfer_size(struct comedi_device * dev,
comedi_cmd cmd);
-static void reg_dump(comedi_device * dev);
+static void reg_dump(struct comedi_device * dev);
typedef struct das16_board_struct {
const char *name;
@@ -698,8 +698,8 @@ static const struct das16_board_struct das16_boards[] = {
#define n_das16_boards ((sizeof(das16_boards))/(sizeof(das16_board)))
-static int das16_attach(comedi_device * dev, comedi_devconfig * it);
-static int das16_detach(comedi_device * dev);
+static int das16_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int das16_detach(struct comedi_device * dev);
static comedi_driver driver_das16 = {
driver_name:"das16",
module:THIS_MODULE,
@@ -742,7 +742,7 @@ struct das16_private_struct {
#define devpriv ((struct das16_private_struct *)(dev->private))
#define thisboard ((struct das16_board_struct *)(dev->board_ptr))
-static int das16_cmd_test(comedi_device * dev, comedi_subdevice * s,
+static int das16_cmd_test(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0, tmp;
@@ -893,7 +893,7 @@ static int das16_cmd_test(comedi_device * dev, comedi_subdevice * s,
return 0;
}
-static int das16_cmd_exec(comedi_device * dev, comedi_subdevice * s)
+static int das16_cmd_exec(struct comedi_device * dev, comedi_subdevice * s)
{
comedi_async *async = s->async;
comedi_cmd *cmd = &async->cmd;
@@ -996,7 +996,7 @@ static int das16_cmd_exec(comedi_device * dev, comedi_subdevice * s)
return 0;
}
-static int das16_cancel(comedi_device * dev, comedi_subdevice * s)
+static int das16_cancel(struct comedi_device * dev, comedi_subdevice * s)
{
unsigned long flags;
@@ -1023,7 +1023,7 @@ static int das16_cancel(comedi_device * dev, comedi_subdevice * s)
return 0;
}
-static void das16_reset(comedi_device * dev)
+static void das16_reset(struct comedi_device * dev)
{
outb(0, dev->iobase + DAS16_STATUS);
outb(0, dev->iobase + DAS16_CONTROL);
@@ -1031,7 +1031,7 @@ static void das16_reset(comedi_device * dev)
outb(0, dev->iobase + DAS16_CNTR_CONTROL);
}
-static int das16_ai_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int das16_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i, n;
@@ -1079,7 +1079,7 @@ static int das16_ai_rinsn(comedi_device * dev, comedi_subdevice * s,
return n;
}
-static int das16_di_rbits(comedi_device * dev, comedi_subdevice * s,
+static int das16_di_rbits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int bits;
@@ -1091,7 +1091,7 @@ static int das16_di_rbits(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int das16_do_wbits(comedi_device * dev, comedi_subdevice * s,
+static int das16_do_wbits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int wbits;
@@ -1111,7 +1111,7 @@ static int das16_do_wbits(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int das16_ao_winsn(comedi_device * dev, comedi_subdevice * s,
+static int das16_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
@@ -1138,7 +1138,7 @@ static int das16_ao_winsn(comedi_device * dev, comedi_subdevice * s,
static irqreturn_t das16_dma_interrupt(int irq, void *d PT_REGS_ARG)
{
int status;
- comedi_device *dev = d;
+ struct comedi_device *dev = d;
status = inb(dev->iobase + DAS16_STATUS);
@@ -1155,7 +1155,7 @@ static irqreturn_t das16_dma_interrupt(int irq, void *d PT_REGS_ARG)
static void das16_timer_interrupt(unsigned long arg)
{
- comedi_device *dev = (comedi_device *) arg;
+ struct comedi_device *dev = (struct comedi_device *) arg;
das16_interrupt(dev);
@@ -1169,7 +1169,7 @@ static void das16_timer_interrupt(unsigned long arg)
an even transfer count after disabling dma
channel.
*/
-static int disable_dma_on_even(comedi_device * dev)
+static int disable_dma_on_even(struct comedi_device * dev)
{
int residue;
int i;
@@ -1197,7 +1197,7 @@ static int disable_dma_on_even(comedi_device * dev)
return residue;
}
-static void das16_interrupt(comedi_device * dev)
+static void das16_interrupt(struct comedi_device * dev)
{
unsigned long dma_flags, spin_flags;
comedi_subdevice *s = dev->read_subdev;
@@ -1273,7 +1273,7 @@ static void das16_interrupt(comedi_device * dev)
cfc_handle_events(dev, s);
}
-static unsigned int das16_set_pacer(comedi_device * dev, unsigned int ns,
+static unsigned int das16_set_pacer(struct comedi_device * dev, unsigned int ns,
int rounding_flags)
{
i8253_cascade_ns_to_timer_2div(devpriv->clockbase, &(devpriv->divisor1),
@@ -1286,7 +1286,7 @@ static unsigned int das16_set_pacer(comedi_device * dev, unsigned int ns,
return ns;
}
-static void reg_dump(comedi_device * dev)
+static void reg_dump(struct comedi_device * dev)
{
DEBUG_PRINT("********DAS1600 REGISTER DUMP********\n");
DEBUG_PRINT("DAS16_MUX: %x\n", inb(dev->iobase + DAS16_MUX));
@@ -1304,7 +1304,7 @@ static void reg_dump(comedi_device * dev)
inb(dev->iobase + DAS1600_STATUS_B));
}
-static int das16_probe(comedi_device * dev, comedi_devconfig * it)
+static int das16_probe(struct comedi_device * dev, comedi_devconfig * it)
{
int status;
int diobits;
@@ -1338,7 +1338,7 @@ static int das16_probe(comedi_device * dev, comedi_devconfig * it)
return 0;
}
-static int das1600_mode_detect(comedi_device * dev)
+static int das1600_mode_detect(struct comedi_device * dev)
{
int status = 0;
@@ -1366,7 +1366,7 @@ static int das1600_mode_detect(comedi_device * dev)
* 3 Clock speed (in MHz)
*/
-static int das16_attach(comedi_device * dev, comedi_devconfig * it)
+static int das16_attach(struct comedi_device * dev, comedi_devconfig * it)
{
comedi_subdevice *s;
int ret;
@@ -1630,7 +1630,7 @@ static int das16_attach(comedi_device * dev, comedi_devconfig * it)
return 0;
}
-static int das16_detach(comedi_device * dev)
+static int das16_detach(struct comedi_device * dev)
{
printk("comedi%d: das16: remove\n", dev->minor);
@@ -1674,7 +1674,7 @@ static int das16_detach(comedi_device * dev)
COMEDI_INITCLEANUP(driver_das16);
// utility function that suggests a dma transfer size in bytes
-static unsigned int das16_suggest_transfer_size(comedi_device * dev,
+static unsigned int das16_suggest_transfer_size(struct comedi_device * dev,
comedi_cmd cmd)
{
unsigned int size;
@@ -1715,7 +1715,7 @@ static unsigned int das16_suggest_transfer_size(comedi_device * dev,
return size;
}
-static void das16_ai_munge(comedi_device * dev, comedi_subdevice * s,
+static void das16_ai_munge(struct comedi_device * dev, comedi_subdevice * s,
void *array, unsigned int num_bytes, unsigned int start_chan_index)
{
unsigned int i, num_samples = num_bytes / sizeof(short);
diff --git a/drivers/staging/comedi/drivers/das16m1.c b/drivers/staging/comedi/drivers/das16m1.c
index addccba3c6e8..f646eb16d0c9 100644
--- a/drivers/staging/comedi/drivers/das16m1.c
+++ b/drivers/staging/comedi/drivers/das16m1.c
@@ -131,23 +131,23 @@ static const comedi_lrange range_das16m1 = { 9,
}
};
-static int das16m1_do_wbits(comedi_device * dev, comedi_subdevice * s,
+static int das16m1_do_wbits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int das16m1_di_rbits(comedi_device * dev, comedi_subdevice * s,
+static int das16m1_di_rbits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int das16m1_ai_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int das16m1_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int das16m1_cmd_test(comedi_device * dev, comedi_subdevice * s,
+static int das16m1_cmd_test(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd);
-static int das16m1_cmd_exec(comedi_device * dev, comedi_subdevice * s);
-static int das16m1_cancel(comedi_device * dev, comedi_subdevice * s);
+static int das16m1_cmd_exec(struct comedi_device * dev, comedi_subdevice * s);
+static int das16m1_cancel(struct comedi_device * dev, comedi_subdevice * s);
-static int das16m1_poll(comedi_device * dev, comedi_subdevice * s);
+static int das16m1_poll(struct comedi_device * dev, comedi_subdevice * s);
static irqreturn_t das16m1_interrupt(int irq, void *d PT_REGS_ARG);
-static void das16m1_handler(comedi_device * dev, unsigned int status);
+static void das16m1_handler(struct comedi_device * dev, unsigned int status);
-static unsigned int das16m1_set_pacer(comedi_device * dev, unsigned int ns,
+static unsigned int das16m1_set_pacer(struct comedi_device * dev, unsigned int ns,
int round_flag);
static int das16m1_irq_bits(unsigned int irq);
@@ -166,8 +166,8 @@ static const das16m1_board das16m1_boards[] = {
#define das16m1_num_boards ((sizeof(das16m1_boards)) / (sizeof(das16m1_boards[0])))
-static int das16m1_attach(comedi_device * dev, comedi_devconfig * it);
-static int das16m1_detach(comedi_device * dev);
+static int das16m1_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int das16m1_detach(struct comedi_device * dev);
static comedi_driver driver_das16m1 = {
driver_name:"das16m1",
module:THIS_MODULE,
@@ -200,7 +200,7 @@ static inline short munge_sample(short data)
return (data >> 4) & 0xfff;
}
-static int das16m1_cmd_test(comedi_device * dev, comedi_subdevice * s,
+static int das16m1_cmd_test(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd)
{
unsigned int err = 0, tmp, i;
@@ -322,7 +322,7 @@ static int das16m1_cmd_test(comedi_device * dev, comedi_subdevice * s,
return 0;
}
-static int das16m1_cmd_exec(comedi_device * dev, comedi_subdevice * s)
+static int das16m1_cmd_exec(struct comedi_device * dev, comedi_subdevice * s)
{
comedi_async *async = s->async;
comedi_cmd *cmd = &async->cmd;
@@ -385,7 +385,7 @@ static int das16m1_cmd_exec(comedi_device * dev, comedi_subdevice * s)
return 0;
}
-static int das16m1_cancel(comedi_device * dev, comedi_subdevice * s)
+static int das16m1_cancel(struct comedi_device * dev, comedi_subdevice * s)
{
devpriv->control_state &= ~INTE & ~PACER_MASK;
outb(devpriv->control_state, dev->iobase + DAS16M1_INTR_CONTROL);
@@ -393,7 +393,7 @@ static int das16m1_cancel(comedi_device * dev, comedi_subdevice * s)
return 0;
}
-static int das16m1_ai_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int das16m1_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i, n;
@@ -430,7 +430,7 @@ static int das16m1_ai_rinsn(comedi_device * dev, comedi_subdevice * s,
return n;
}
-static int das16m1_di_rbits(comedi_device * dev, comedi_subdevice * s,
+static int das16m1_di_rbits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int bits;
@@ -442,7 +442,7 @@ static int das16m1_di_rbits(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int das16m1_do_wbits(comedi_device * dev, comedi_subdevice * s,
+static int das16m1_do_wbits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int wbits;
@@ -462,7 +462,7 @@ static int das16m1_do_wbits(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int das16m1_poll(comedi_device * dev, comedi_subdevice * s)
+static int das16m1_poll(struct comedi_device * dev, comedi_subdevice * s)
{
unsigned long flags;
unsigned int status;
@@ -479,7 +479,7 @@ static int das16m1_poll(comedi_device * dev, comedi_subdevice * s)
static irqreturn_t das16m1_interrupt(int irq, void *d PT_REGS_ARG)
{
int status;
- comedi_device *dev = d;
+ struct comedi_device *dev = d;
if (dev->attached == 0) {
comedi_error(dev, "premature interrupt");
@@ -514,7 +514,7 @@ static void munge_sample_array(short * array, unsigned int num_elements)
}
}
-static void das16m1_handler(comedi_device * dev, unsigned int status)
+static void das16m1_handler(struct comedi_device * dev, unsigned int status)
{
comedi_subdevice *s;
comedi_async *async;
@@ -578,7 +578,7 @@ static void das16m1_handler(comedi_device * dev, unsigned int status)
/* This function takes a time in nanoseconds and sets the *
* 2 pacer clocks to the closest frequency possible. It also *
* returns the actual sampling period. */
-static unsigned int das16m1_set_pacer(comedi_device * dev, unsigned int ns,
+static unsigned int das16m1_set_pacer(struct comedi_device * dev, unsigned int ns,
int rounding_flags)
{
i8253_cascade_ns_to_timer_2div(DAS16M1_XTAL, &(devpriv->divisor1),
@@ -635,7 +635,7 @@ static int das16m1_irq_bits(unsigned int irq)
* 1 IRQ
*/
-static int das16m1_attach(comedi_device * dev, comedi_devconfig * it)
+static int das16m1_attach(struct comedi_device * dev, comedi_devconfig * it)
{
comedi_subdevice *s;
int ret;
@@ -744,7 +744,7 @@ static int das16m1_attach(comedi_device * dev, comedi_devconfig * it)
return 0;
}
-static int das16m1_detach(comedi_device * dev)
+static int das16m1_detach(struct comedi_device * dev)
{
printk("comedi%d: das16m1: remove\n", dev->minor);
diff --git a/drivers/staging/comedi/drivers/das1800.c b/drivers/staging/comedi/drivers/das1800.c
index f66cf17bbbcd..9fb800fbfc15 100644
--- a/drivers/staging/comedi/drivers/das1800.c
+++ b/drivers/staging/comedi/drivers/das1800.c
@@ -180,35 +180,35 @@ enum {
das1802hr, das1802hr_da, das1801hc, das1802hc, das1801ao, das1802ao
};
-static int das1800_attach(comedi_device * dev, comedi_devconfig * it);
-static int das1800_detach(comedi_device * dev);
-static int das1800_probe(comedi_device * dev);
-static int das1800_cancel(comedi_device * dev, comedi_subdevice * s);
+static int das1800_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int das1800_detach(struct comedi_device * dev);
+static int das1800_probe(struct comedi_device * dev);
+static int das1800_cancel(struct comedi_device * dev, comedi_subdevice * s);
static irqreturn_t das1800_interrupt(int irq, void *d PT_REGS_ARG);
-static int das1800_ai_poll(comedi_device * dev, comedi_subdevice * s);
-static void das1800_ai_handler(comedi_device * dev);
-static void das1800_handle_dma(comedi_device * dev, comedi_subdevice * s,
+static int das1800_ai_poll(struct comedi_device * dev, comedi_subdevice * s);
+static void das1800_ai_handler(struct comedi_device * dev);
+static void das1800_handle_dma(struct comedi_device * dev, comedi_subdevice * s,
unsigned int status);
-static void das1800_flush_dma(comedi_device * dev, comedi_subdevice * s);
-static void das1800_flush_dma_channel(comedi_device * dev, comedi_subdevice * s,
+static void das1800_flush_dma(struct comedi_device * dev, comedi_subdevice * s);
+static void das1800_flush_dma_channel(struct comedi_device * dev, comedi_subdevice * s,
unsigned int channel, uint16_t * buffer);
-static void das1800_handle_fifo_half_full(comedi_device * dev,
+static void das1800_handle_fifo_half_full(struct comedi_device * dev,
comedi_subdevice * s);
-static void das1800_handle_fifo_not_empty(comedi_device * dev,
+static void das1800_handle_fifo_not_empty(struct comedi_device * dev,
comedi_subdevice * s);
-static int das1800_ai_do_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int das1800_ai_do_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd);
-static int das1800_ai_do_cmd(comedi_device * dev, comedi_subdevice * s);
-static int das1800_ai_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int das1800_ai_do_cmd(struct comedi_device * dev, comedi_subdevice * s);
+static int das1800_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int das1800_ao_winsn(comedi_device * dev, comedi_subdevice * s,
+static int das1800_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int das1800_di_rbits(comedi_device * dev, comedi_subdevice * s,
+static int das1800_di_rbits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int das1800_do_wbits(comedi_device * dev, comedi_subdevice * s,
+static int das1800_do_wbits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int das1800_set_frequency(comedi_device * dev);
+static int das1800_set_frequency(struct comedi_device * dev);
static unsigned int burst_convert_arg(unsigned int convert_arg, int round_mode);
static unsigned int suggest_transfer_size(comedi_cmd * cmd);
@@ -520,7 +520,7 @@ static comedi_driver driver_das1800 = {
*/
COMEDI_INITCLEANUP(driver_das1800);
-static int das1800_init_dma(comedi_device * dev, unsigned int dma0,
+static int das1800_init_dma(struct comedi_device * dev, unsigned int dma0,
unsigned int dma1)
{
unsigned long flags;
@@ -590,7 +590,7 @@ static int das1800_init_dma(comedi_device * dev, unsigned int dma0,
return 0;
}
-static int das1800_attach(comedi_device * dev, comedi_devconfig * it)
+static int das1800_attach(struct comedi_device * dev, comedi_devconfig * it)
{
comedi_subdevice *s;
unsigned long iobase = it->options[0];
@@ -765,7 +765,7 @@ static int das1800_attach(comedi_device * dev, comedi_devconfig * it)
return 0;
};
-static int das1800_detach(comedi_device * dev)
+static int das1800_detach(struct comedi_device * dev)
{
/* only free stuff if it has been allocated by _attach */
if (dev->iobase)
@@ -793,7 +793,7 @@ static int das1800_detach(comedi_device * dev)
/* probes and checks das-1800 series board type
*/
-static int das1800_probe(comedi_device * dev)
+static int das1800_probe(struct comedi_device * dev)
{
int id;
int board;
@@ -867,7 +867,7 @@ static int das1800_probe(comedi_device * dev)
return -1;
}
-static int das1800_ai_poll(comedi_device * dev, comedi_subdevice * s)
+static int das1800_ai_poll(struct comedi_device * dev, comedi_subdevice * s)
{
unsigned long flags;
@@ -881,7 +881,7 @@ static int das1800_ai_poll(comedi_device * dev, comedi_subdevice * s)
static irqreturn_t das1800_interrupt(int irq, void *d PT_REGS_ARG)
{
- comedi_device *dev = d;
+ struct comedi_device *dev = d;
unsigned int status;
if (dev->attached == 0) {
@@ -909,7 +909,7 @@ static irqreturn_t das1800_interrupt(int irq, void *d PT_REGS_ARG)
}
// the guts of the interrupt handler, that is shared with das1800_ai_poll
-static void das1800_ai_handler(comedi_device * dev)
+static void das1800_ai_handler(struct comedi_device * dev)
{
comedi_subdevice *s = dev->subdevices + 0; /* analog input subdevice */
comedi_async *async = s->async;
@@ -962,7 +962,7 @@ static void das1800_ai_handler(comedi_device * dev)
return;
}
-static void das1800_handle_dma(comedi_device * dev, comedi_subdevice * s,
+static void das1800_handle_dma(struct comedi_device * dev, comedi_subdevice * s,
unsigned int status)
{
unsigned long flags;
@@ -997,14 +997,14 @@ static void das1800_handle_dma(comedi_device * dev, comedi_subdevice * s,
return;
}
-static inline uint16_t munge_bipolar_sample(const comedi_device * dev,
+static inline uint16_t munge_bipolar_sample(const struct comedi_device * dev,
uint16_t sample)
{
sample += 1 << (thisboard->resolution - 1);
return sample;
}
-static void munge_data(comedi_device * dev, uint16_t * array,
+static void munge_data(struct comedi_device * dev, uint16_t * array,
unsigned int num_elements)
{
unsigned int i;
@@ -1023,7 +1023,7 @@ static void munge_data(comedi_device * dev, uint16_t * array,
/* Utility function used by das1800_flush_dma() and das1800_handle_dma().
* Assumes dma lock is held */
-static void das1800_flush_dma_channel(comedi_device * dev, comedi_subdevice * s,
+static void das1800_flush_dma_channel(struct comedi_device * dev, comedi_subdevice * s,
unsigned int channel, uint16_t * buffer)
{
unsigned int num_bytes, num_samples;
@@ -1053,7 +1053,7 @@ static void das1800_flush_dma_channel(comedi_device * dev, comedi_subdevice * s,
/* flushes remaining data from board when external trigger has stopped aquisition
* and we are using dma transfers */
-static void das1800_flush_dma(comedi_device * dev, comedi_subdevice * s)
+static void das1800_flush_dma(struct comedi_device * dev, comedi_subdevice * s)
{
unsigned long flags;
const int dual_dma = devpriv->irq_dma_bits & DMA_DUAL;
@@ -1083,7 +1083,7 @@ static void das1800_flush_dma(comedi_device * dev, comedi_subdevice * s)
return;
}
-static void das1800_handle_fifo_half_full(comedi_device * dev,
+static void das1800_handle_fifo_half_full(struct comedi_device * dev,
comedi_subdevice * s)
{
int numPoints = 0; /* number of points to read */
@@ -1102,7 +1102,7 @@ static void das1800_handle_fifo_half_full(comedi_device * dev,
return;
}
-static void das1800_handle_fifo_not_empty(comedi_device * dev,
+static void das1800_handle_fifo_not_empty(struct comedi_device * dev,
comedi_subdevice * s)
{
short dpnt;
@@ -1126,7 +1126,7 @@ static void das1800_handle_fifo_not_empty(comedi_device * dev,
return;
}
-static int das1800_cancel(comedi_device * dev, comedi_subdevice * s)
+static int das1800_cancel(struct comedi_device * dev, comedi_subdevice * s)
{
outb(0x0, dev->iobase + DAS1800_STATUS); /* disable conversions */
outb(0x0, dev->iobase + DAS1800_CONTROL_B); /* disable interrupts and dma */
@@ -1139,7 +1139,7 @@ static int das1800_cancel(comedi_device * dev, comedi_subdevice * s)
}
/* test analog input cmd */
-static int das1800_ai_do_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int das1800_ai_do_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
@@ -1385,7 +1385,7 @@ static int control_c_bits(comedi_cmd cmd)
}
// sets up counters
-static int setup_counters(comedi_device * dev, comedi_cmd cmd)
+static int setup_counters(struct comedi_device * dev, comedi_cmd cmd)
{
// setup cascaded counters for conversion/scan frequency
switch (cmd.scan_begin_src) {
@@ -1424,7 +1424,7 @@ static int setup_counters(comedi_device * dev, comedi_cmd cmd)
}
// sets up dma
-static void setup_dma(comedi_device * dev, comedi_cmd cmd)
+static void setup_dma(struct comedi_device * dev, comedi_cmd cmd)
{
unsigned long lock_flags;
const int dual_dma = devpriv->irq_dma_bits & DMA_DUAL;
@@ -1462,7 +1462,7 @@ static void setup_dma(comedi_device * dev, comedi_cmd cmd)
}
// programs channel/gain list into card
-static void program_chanlist(comedi_device * dev, comedi_cmd cmd)
+static void program_chanlist(struct comedi_device * dev, comedi_cmd cmd)
{
int i, n, chan_range;
unsigned long irq_flags;
@@ -1489,7 +1489,7 @@ static void program_chanlist(comedi_device * dev, comedi_cmd cmd)
}
// analog input do_cmd
-static int das1800_ai_do_cmd(comedi_device * dev, comedi_subdevice * s)
+static int das1800_ai_do_cmd(struct comedi_device * dev, comedi_subdevice * s)
{
int ret;
int control_a, control_c;
@@ -1552,7 +1552,7 @@ static int das1800_ai_do_cmd(comedi_device * dev, comedi_subdevice * s)
}
/* read analog input */
-static int das1800_ai_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int das1800_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i, n;
@@ -1612,7 +1612,7 @@ static int das1800_ai_rinsn(comedi_device * dev, comedi_subdevice * s,
}
/* writes to an analog output channel */
-static int das1800_ao_winsn(comedi_device * dev, comedi_subdevice * s,
+static int das1800_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int chan = CR_CHAN(insn->chanspec);
@@ -1641,7 +1641,7 @@ static int das1800_ao_winsn(comedi_device * dev, comedi_subdevice * s,
}
/* reads from digital input channels */
-static int das1800_di_rbits(comedi_device * dev, comedi_subdevice * s,
+static int das1800_di_rbits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
@@ -1652,7 +1652,7 @@ static int das1800_di_rbits(comedi_device * dev, comedi_subdevice * s,
}
/* writes to digital output channels */
-static int das1800_do_wbits(comedi_device * dev, comedi_subdevice * s,
+static int das1800_do_wbits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int wbits;
@@ -1672,7 +1672,7 @@ static int das1800_do_wbits(comedi_device * dev, comedi_subdevice * s,
}
/* loads counters with divisor1, divisor2 from private structure */
-static int das1800_set_frequency(comedi_device * dev)
+static int das1800_set_frequency(struct comedi_device * dev)
{
int err = 0;
diff --git a/drivers/staging/comedi/drivers/das6402.c b/drivers/staging/comedi/drivers/das6402.c
index 85959c09679f..e78d9eb0eb7a 100644
--- a/drivers/staging/comedi/drivers/das6402.c
+++ b/drivers/staging/comedi/drivers/das6402.c
@@ -98,8 +98,8 @@ This driver has suffered bitrot.
#define C2 0x80
#define RWLH 0x30
-static int das6402_attach(comedi_device * dev, comedi_devconfig * it);
-static int das6402_detach(comedi_device * dev);
+static int das6402_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int das6402_detach(struct comedi_device * dev);
static comedi_driver driver_das6402 = {
driver_name:"das6402",
module:THIS_MODULE,
@@ -116,9 +116,9 @@ typedef struct {
} das6402_private;
#define devpriv ((das6402_private *)dev->private)
-static void das6402_ai_fifo_dregs(comedi_device * dev, comedi_subdevice * s);
+static void das6402_ai_fifo_dregs(struct comedi_device * dev, comedi_subdevice * s);
-static void das6402_setcounter(comedi_device * dev)
+static void das6402_setcounter(struct comedi_device * dev)
{
BYTE p;
unsigned short ctrlwrd;
@@ -153,7 +153,7 @@ static void das6402_setcounter(comedi_device * dev)
static irqreturn_t intr_handler(int irq, void *d PT_REGS_ARG)
{
- comedi_device *dev = d;
+ struct comedi_device *dev = d;
comedi_subdevice *s = dev->subdevices;
if (!dev->attached || devpriv->das6402_ignoreirq) {
@@ -186,7 +186,7 @@ static irqreturn_t intr_handler(int irq, void *d PT_REGS_ARG)
}
#if 0
-static void das6402_ai_fifo_read(comedi_device * dev, short * data, int n)
+static void das6402_ai_fifo_read(struct comedi_device * dev, short * data, int n)
{
int i;
@@ -195,7 +195,7 @@ static void das6402_ai_fifo_read(comedi_device * dev, short * data, int n)
}
#endif
-static void das6402_ai_fifo_dregs(comedi_device * dev, comedi_subdevice * s)
+static void das6402_ai_fifo_dregs(struct comedi_device * dev, comedi_subdevice * s)
{
while (1) {
if (!(inb(dev->iobase + 8) & 0x01))
@@ -204,7 +204,7 @@ static void das6402_ai_fifo_dregs(comedi_device * dev, comedi_subdevice * s)
}
}
-static int das6402_ai_cancel(comedi_device * dev, comedi_subdevice * s)
+static int das6402_ai_cancel(struct comedi_device * dev, comedi_subdevice * s)
{
/*
* This function should reset the board from whatever condition it
@@ -226,7 +226,7 @@ static int das6402_ai_cancel(comedi_device * dev, comedi_subdevice * s)
}
#ifdef unused
-static int das6402_ai_mode2(comedi_device * dev, comedi_subdevice * s,
+static int das6402_ai_mode2(struct comedi_device * dev, comedi_subdevice * s,
comedi_trig * it)
{
devpriv->das6402_ignoreirq = 1;
@@ -249,7 +249,7 @@ static int das6402_ai_mode2(comedi_device * dev, comedi_subdevice * s,
}
#endif
-static int board_init(comedi_device * dev)
+static int board_init(struct comedi_device * dev)
{
BYTE b;
@@ -289,7 +289,7 @@ static int board_init(comedi_device * dev)
return 0;
}
-static int das6402_detach(comedi_device * dev)
+static int das6402_detach(struct comedi_device * dev)
{
if (dev->irq)
comedi_free_irq(dev->irq, dev);
@@ -299,7 +299,7 @@ static int das6402_detach(comedi_device * dev)
return 0;
}
-static int das6402_attach(comedi_device * dev, comedi_devconfig * it)
+static int das6402_attach(struct comedi_device * dev, comedi_devconfig * it)
{
unsigned int irq;
unsigned long iobase;
diff --git a/drivers/staging/comedi/drivers/das800.c b/drivers/staging/comedi/drivers/das800.c
index 7e658dbfa07a..73068309ae9c 100644
--- a/drivers/staging/comedi/drivers/das800.c
+++ b/drivers/staging/comedi/drivers/das800.c
@@ -242,9 +242,9 @@ typedef struct {
#define devpriv ((das800_private *)dev->private)
-static int das800_attach(comedi_device * dev, comedi_devconfig * it);
-static int das800_detach(comedi_device * dev);
-static int das800_cancel(comedi_device * dev, comedi_subdevice * s);
+static int das800_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int das800_detach(struct comedi_device * dev);
+static int das800_cancel(struct comedi_device * dev, comedi_subdevice * s);
static comedi_driver driver_das800 = {
driver_name:"das800",
@@ -257,22 +257,22 @@ static comedi_driver driver_das800 = {
};
static irqreturn_t das800_interrupt(int irq, void *d PT_REGS_ARG);
-static void enable_das800(comedi_device * dev);
-static void disable_das800(comedi_device * dev);
-static int das800_ai_do_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static void enable_das800(struct comedi_device * dev);
+static void disable_das800(struct comedi_device * dev);
+static int das800_ai_do_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd);
-static int das800_ai_do_cmd(comedi_device * dev, comedi_subdevice * s);
-static int das800_ai_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int das800_ai_do_cmd(struct comedi_device * dev, comedi_subdevice * s);
+static int das800_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int das800_di_rbits(comedi_device * dev, comedi_subdevice * s,
+static int das800_di_rbits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int das800_do_wbits(comedi_device * dev, comedi_subdevice * s,
+static int das800_do_wbits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int das800_probe(comedi_device * dev);
-static int das800_set_frequency(comedi_device * dev);
+static int das800_probe(struct comedi_device * dev);
+static int das800_set_frequency(struct comedi_device * dev);
/* checks and probes das-800 series board type */
-static int das800_probe(comedi_device * dev)
+static int das800_probe(struct comedi_device * dev)
{
int id_bits;
unsigned long irq_flags;
@@ -347,7 +347,7 @@ static irqreturn_t das800_interrupt(int irq, void *d PT_REGS_ARG)
{
short i; /* loop index */
short dataPoint = 0;
- comedi_device *dev = d;
+ struct comedi_device *dev = d;
comedi_subdevice *s = dev->read_subdev; /* analog input subdevice */
comedi_async *async;
int status;
@@ -441,7 +441,7 @@ static irqreturn_t das800_interrupt(int irq, void *d PT_REGS_ARG)
return IRQ_HANDLED;
}
-static int das800_attach(comedi_device * dev, comedi_devconfig * it)
+static int das800_attach(struct comedi_device * dev, comedi_devconfig * it)
{
comedi_subdevice *s;
unsigned long iobase = it->options[0];
@@ -539,7 +539,7 @@ static int das800_attach(comedi_device * dev, comedi_devconfig * it)
return 0;
};
-static int das800_detach(comedi_device * dev)
+static int das800_detach(struct comedi_device * dev)
{
printk("comedi%d: das800: remove\n", dev->minor);
@@ -551,7 +551,7 @@ static int das800_detach(comedi_device * dev)
return 0;
};
-static int das800_cancel(comedi_device * dev, comedi_subdevice * s)
+static int das800_cancel(struct comedi_device * dev, comedi_subdevice * s)
{
devpriv->forever = 0;
devpriv->count = 0;
@@ -560,7 +560,7 @@ static int das800_cancel(comedi_device * dev, comedi_subdevice * s)
}
/* enable_das800 makes the card start taking hardware triggered conversions */
-static void enable_das800(comedi_device * dev)
+static void enable_das800(struct comedi_device * dev)
{
unsigned long irq_flags;
comedi_spin_lock_irqsave(&dev->spinlock, irq_flags);
@@ -575,7 +575,7 @@ static void enable_das800(comedi_device * dev)
}
/* disable_das800 stops hardware triggered conversions */
-static void disable_das800(comedi_device * dev)
+static void disable_das800(struct comedi_device * dev)
{
unsigned long irq_flags;
comedi_spin_lock_irqsave(&dev->spinlock, irq_flags);
@@ -584,7 +584,7 @@ static void disable_das800(comedi_device * dev)
comedi_spin_unlock_irqrestore(&dev->spinlock, irq_flags);
}
-static int das800_ai_do_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int das800_ai_do_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
@@ -709,7 +709,7 @@ static int das800_ai_do_cmdtest(comedi_device * dev, comedi_subdevice * s,
return 0;
}
-static int das800_ai_do_cmd(comedi_device * dev, comedi_subdevice * s)
+static int das800_ai_do_cmd(struct comedi_device * dev, comedi_subdevice * s)
{
int startChan, endChan, scan, gain;
int conv_bits;
@@ -788,7 +788,7 @@ static int das800_ai_do_cmd(comedi_device * dev, comedi_subdevice * s)
return 0;
}
-static int das800_ai_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int das800_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i, n;
@@ -842,7 +842,7 @@ static int das800_ai_rinsn(comedi_device * dev, comedi_subdevice * s,
return n;
}
-static int das800_di_rbits(comedi_device * dev, comedi_subdevice * s,
+static int das800_di_rbits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int bits;
@@ -855,7 +855,7 @@ static int das800_di_rbits(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int das800_do_wbits(comedi_device * dev, comedi_subdevice * s,
+static int das800_do_wbits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int wbits;
@@ -879,7 +879,7 @@ static int das800_do_wbits(comedi_device * dev, comedi_subdevice * s,
}
/* loads counters with divisor1, divisor2 from private structure */
-static int das800_set_frequency(comedi_device * dev)
+static int das800_set_frequency(struct comedi_device * dev)
{
int err = 0;
diff --git a/drivers/staging/comedi/drivers/dmm32at.c b/drivers/staging/comedi/drivers/dmm32at.c
index c63af0c556b4..678eb970a034 100644
--- a/drivers/staging/comedi/drivers/dmm32at.c
+++ b/drivers/staging/comedi/drivers/dmm32at.c
@@ -232,7 +232,7 @@ static const dmm32at_board dmm32at_boards[] = {
/* this structure is for data unique to this hardware driver. If
* several hardware drivers keep similar information in this structure,
- * feel free to suggest moving the variable to the comedi_device struct.
+ * feel free to suggest moving the variable to the struct comedi_device struct.
*/
typedef struct {
@@ -258,8 +258,8 @@ typedef struct {
* the board, and also about the kernel module that contains
* the device code.
*/
-static int dmm32at_attach(comedi_device * dev, comedi_devconfig * it);
-static int dmm32at_detach(comedi_device * dev);
+static int dmm32at_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int dmm32at_detach(struct comedi_device * dev);
static comedi_driver driver_dmm32at = {
driver_name:"dmm32at",
module:THIS_MODULE,
@@ -289,23 +289,23 @@ static comedi_driver driver_dmm32at = {
};
/* prototypes for driver functions below */
-static int dmm32at_ai_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int dmm32at_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int dmm32at_ao_winsn(comedi_device * dev, comedi_subdevice * s,
+static int dmm32at_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int dmm32at_ao_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int dmm32at_ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int dmm32at_dio_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int dmm32at_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int dmm32at_dio_insn_config(comedi_device * dev, comedi_subdevice * s,
+static int dmm32at_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int dmm32at_ai_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int dmm32at_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd);
-static int dmm32at_ai_cmd(comedi_device * dev, comedi_subdevice * s);
-static int dmm32at_ai_cancel(comedi_device * dev, comedi_subdevice * s);
+static int dmm32at_ai_cmd(struct comedi_device * dev, comedi_subdevice * s);
+static int dmm32at_ai_cancel(struct comedi_device * dev, comedi_subdevice * s);
static int dmm32at_ns_to_timer(unsigned int *ns, int round);
static irqreturn_t dmm32at_isr(int irq, void *d PT_REGS_ARG);
-void dmm32at_setaitimer(comedi_device * dev, unsigned int nansec);
+void dmm32at_setaitimer(struct comedi_device * dev, unsigned int nansec);
/*
* Attach is called by the Comedi core to configure the driver
@@ -313,7 +313,7 @@ void dmm32at_setaitimer(comedi_device * dev, unsigned int nansec);
* in the driver structure, dev->board_ptr contains that
* address.
*/
-static int dmm32at_attach(comedi_device * dev, comedi_devconfig * it)
+static int dmm32at_attach(struct comedi_device * dev, comedi_devconfig * it)
{
int ret;
comedi_subdevice *s;
@@ -481,7 +481,7 @@ static int dmm32at_attach(comedi_device * dev, comedi_devconfig * it)
* allocated by _attach(). dev->private and dev->subdevices are
* deallocated automatically by the core.
*/
-static int dmm32at_detach(comedi_device * dev)
+static int dmm32at_detach(struct comedi_device * dev)
{
printk("comedi%d: dmm32at: remove\n", dev->minor);
if (dev->irq)
@@ -497,7 +497,7 @@ static int dmm32at_detach(comedi_device * dev)
* mode.
*/
-static int dmm32at_ai_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int dmm32at_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n, i;
@@ -568,7 +568,7 @@ static int dmm32at_ai_rinsn(comedi_device * dev, comedi_subdevice * s,
return n;
}
-static int dmm32at_ai_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int dmm32at_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
@@ -752,7 +752,7 @@ static int dmm32at_ai_cmdtest(comedi_device * dev, comedi_subdevice * s,
return 0;
}
-static int dmm32at_ai_cmd(comedi_device * dev, comedi_subdevice * s)
+static int dmm32at_ai_cmd(struct comedi_device * dev, comedi_subdevice * s)
{
comedi_cmd *cmd = &s->async->cmd;
int i, range;
@@ -822,7 +822,7 @@ static int dmm32at_ai_cmd(comedi_device * dev, comedi_subdevice * s)
}
-static int dmm32at_ai_cancel(comedi_device * dev, comedi_subdevice * s)
+static int dmm32at_ai_cancel(struct comedi_device * dev, comedi_subdevice * s)
{
devpriv->ai_scans_left = 1;
return 0;
@@ -834,7 +834,7 @@ static irqreturn_t dmm32at_isr(int irq, void *d PT_REGS_ARG)
unsigned int samp;
unsigned short msb, lsb;
int i;
- comedi_device *dev = d;
+ struct comedi_device *dev = d;
if (!dev->attached) {
comedi_error(dev, "spurious interrupt");
@@ -893,7 +893,7 @@ static int dmm32at_ns_to_timer(unsigned int *ns, int round)
return *ns;
}
-static int dmm32at_ao_winsn(comedi_device * dev, comedi_subdevice * s,
+static int dmm32at_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
@@ -936,7 +936,7 @@ static int dmm32at_ao_winsn(comedi_device * dev, comedi_subdevice * s,
/* AO subdevices should have a read insn as well as a write insn.
* Usually this means copying a value stored in devpriv. */
-static int dmm32at_ao_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int dmm32at_ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
@@ -953,7 +953,7 @@ static int dmm32at_ao_rinsn(comedi_device * dev, comedi_subdevice * s,
* useful to applications if you implement the insn_bits interface.
* This allows packed reading/writing of the DIO channels. The
* comedi core can convert between insn_bits and insn_read/write */
-static int dmm32at_dio_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int dmm32at_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned char diobits;
@@ -1006,7 +1006,7 @@ static int dmm32at_dio_insn_bits(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int dmm32at_dio_insn_config(comedi_device * dev, comedi_subdevice * s,
+static int dmm32at_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned char chanbit;
@@ -1043,7 +1043,7 @@ static int dmm32at_dio_insn_config(comedi_device * dev, comedi_subdevice * s,
return 1;
}
-void dmm32at_setaitimer(comedi_device * dev, unsigned int nansec)
+void dmm32at_setaitimer(struct comedi_device * dev, unsigned int nansec)
{
unsigned char lo1, lo2, hi2;
unsigned short both2;
diff --git a/drivers/staging/comedi/drivers/dt2801.c b/drivers/staging/comedi/drivers/dt2801.c
index 4ee1199920e1..364102436d6e 100644
--- a/drivers/staging/comedi/drivers/dt2801.c
+++ b/drivers/staging/comedi/drivers/dt2801.c
@@ -88,8 +88,8 @@ Configuration options:
#define DT2801_STATUS 1
#define DT2801_CMD 1
-static int dt2801_attach(comedi_device * dev, comedi_devconfig * it);
-static int dt2801_detach(comedi_device * dev);
+static int dt2801_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int dt2801_detach(struct comedi_device * dev);
static comedi_driver driver_dt2801 = {
driver_name:"dt2801",
module:THIS_MODULE,
@@ -224,15 +224,15 @@ typedef struct {
} dt2801_private;
#define devpriv ((dt2801_private *)dev->private)
-static int dt2801_ai_insn_read(comedi_device * dev, comedi_subdevice * s,
+static int dt2801_ai_insn_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int dt2801_ao_insn_read(comedi_device * dev, comedi_subdevice * s,
+static int dt2801_ao_insn_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int dt2801_ao_insn_write(comedi_device * dev, comedi_subdevice * s,
+static int dt2801_ao_insn_write(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int dt2801_dio_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int dt2801_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int dt2801_dio_insn_config(comedi_device * dev, comedi_subdevice * s,
+static int dt2801_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
/* These are the low-level routines:
@@ -244,7 +244,7 @@ static int dt2801_dio_insn_config(comedi_device * dev, comedi_subdevice * s,
/* Only checks DataOutReady-flag, not the Ready-flag as it is done
in the examples of the manual. I don't see why this should be
necessary. */
-static int dt2801_readdata(comedi_device * dev, int *data)
+static int dt2801_readdata(struct comedi_device * dev, int *data)
{
int stat = 0;
int timeout = DT2801_TIMEOUT;
@@ -263,7 +263,7 @@ static int dt2801_readdata(comedi_device * dev, int *data)
return -ETIME;
}
-static int dt2801_readdata2(comedi_device * dev, int *data)
+static int dt2801_readdata2(struct comedi_device * dev, int *data)
{
int lb, hb;
int ret;
@@ -279,7 +279,7 @@ static int dt2801_readdata2(comedi_device * dev, int *data)
return 0;
}
-static int dt2801_writedata(comedi_device * dev, unsigned int data)
+static int dt2801_writedata(struct comedi_device * dev, unsigned int data)
{
int stat = 0;
int timeout = DT2801_TIMEOUT;
@@ -305,7 +305,7 @@ static int dt2801_writedata(comedi_device * dev, unsigned int data)
return -ETIME;
}
-static int dt2801_writedata2(comedi_device * dev, unsigned int data)
+static int dt2801_writedata2(struct comedi_device * dev, unsigned int data)
{
int ret;
@@ -319,7 +319,7 @@ static int dt2801_writedata2(comedi_device * dev, unsigned int data)
return 0;
}
-static int dt2801_wait_for_ready(comedi_device * dev)
+static int dt2801_wait_for_ready(struct comedi_device * dev)
{
int timeout = DT2801_TIMEOUT;
int stat;
@@ -342,7 +342,7 @@ static int dt2801_wait_for_ready(comedi_device * dev)
return -ETIME;
}
-static int dt2801_writecmd(comedi_device * dev, int command)
+static int dt2801_writecmd(struct comedi_device * dev, int command)
{
int stat;
@@ -360,7 +360,7 @@ static int dt2801_writecmd(comedi_device * dev, int command)
return 0;
}
-static int dt2801_reset(comedi_device * dev)
+static int dt2801_reset(struct comedi_device * dev)
{
int board_code = 0;
unsigned int stat;
@@ -417,7 +417,7 @@ static int dt2801_reset(comedi_device * dev)
return board_code;
}
-static int probe_number_of_ai_chans(comedi_device * dev)
+static int probe_number_of_ai_chans(struct comedi_device * dev)
{
int n_chans;
int stat;
@@ -478,7 +478,7 @@ static const comedi_lrange *ai_range_lkup(int type, int opt)
[4] - dac0 range 0=[-10,10], 1=[-5,5], 2=[-2.5,2.5] 3=[0,10], 4=[0,5]
[5] - dac1 range 0=[-10,10], 1=[-5,5], 2=[-2.5,2.5] 3=[0,10], 4=[0,5]
*/
-static int dt2801_attach(comedi_device * dev, comedi_devconfig * it)
+static int dt2801_attach(struct comedi_device * dev, comedi_devconfig * it)
{
comedi_subdevice *s;
unsigned long iobase;
@@ -579,7 +579,7 @@ static int dt2801_attach(comedi_device * dev, comedi_devconfig * it)
return ret;
}
-static int dt2801_detach(comedi_device * dev)
+static int dt2801_detach(struct comedi_device * dev)
{
if (dev->iobase)
release_region(dev->iobase, DT2801_IOSIZE);
@@ -587,7 +587,7 @@ static int dt2801_detach(comedi_device * dev)
return 0;
}
-static int dt2801_error(comedi_device * dev, int stat)
+static int dt2801_error(struct comedi_device * dev, int stat)
{
if (stat < 0) {
if (stat == -ETIME) {
@@ -605,7 +605,7 @@ static int dt2801_error(comedi_device * dev, int stat)
return -EIO;
}
-static int dt2801_ai_insn_read(comedi_device * dev, comedi_subdevice * s,
+static int dt2801_ai_insn_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int d;
@@ -627,7 +627,7 @@ static int dt2801_ai_insn_read(comedi_device * dev, comedi_subdevice * s,
return i;
}
-static int dt2801_ao_insn_read(comedi_device * dev, comedi_subdevice * s,
+static int dt2801_ao_insn_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
data[0] = devpriv->ao_readback[CR_CHAN(insn->chanspec)];
@@ -635,7 +635,7 @@ static int dt2801_ao_insn_read(comedi_device * dev, comedi_subdevice * s,
return 1;
}
-static int dt2801_ao_insn_write(comedi_device * dev, comedi_subdevice * s,
+static int dt2801_ao_insn_write(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
dt2801_writecmd(dev, DT_C_WRITE_DAIM);
@@ -647,7 +647,7 @@ static int dt2801_ao_insn_write(comedi_device * dev, comedi_subdevice * s,
return 1;
}
-static int dt2801_dio_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int dt2801_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int which = 0;
@@ -671,7 +671,7 @@ static int dt2801_dio_insn_bits(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int dt2801_dio_insn_config(comedi_device * dev, comedi_subdevice * s,
+static int dt2801_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int which = 0;
diff --git a/drivers/staging/comedi/drivers/dt2811.c b/drivers/staging/comedi/drivers/dt2811.c
index ce7cf31f2fc9..76c084ca081b 100644
--- a/drivers/staging/comedi/drivers/dt2811.c
+++ b/drivers/staging/comedi/drivers/dt2811.c
@@ -212,8 +212,8 @@ static const boardtype boardtypes[] = {
#define this_board ((const boardtype *)dev->board_ptr)
-static int dt2811_attach(comedi_device * dev, comedi_devconfig * it);
-static int dt2811_detach(comedi_device * dev);
+static int dt2811_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int dt2811_detach(struct comedi_device * dev);
static comedi_driver driver_dt2811 = {
driver_name:"dt2811",
module:THIS_MODULE,
@@ -226,15 +226,15 @@ static comedi_driver driver_dt2811 = {
COMEDI_INITCLEANUP(driver_dt2811);
-static int dt2811_ai_insn(comedi_device * dev, comedi_subdevice * s,
+static int dt2811_ai_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int dt2811_ao_insn(comedi_device * dev, comedi_subdevice * s,
+static int dt2811_ao_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int dt2811_ao_insn_read(comedi_device * dev, comedi_subdevice * s,
+static int dt2811_ao_insn_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int dt2811_di_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int dt2811_di_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int dt2811_do_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int dt2811_do_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
enum { card_2811_pgh, card_2811_pgl };
@@ -266,7 +266,7 @@ static irqreturn_t dt2811_interrupt(int irq, void *d PT_REGS_ARG)
{
int lo, hi;
int data;
- comedi_device *dev = d;
+ struct comedi_device *dev = d;
if (!dev->attached) {
comedi_error(dev, "spurious interrupt");
@@ -308,7 +308,7 @@ static irqreturn_t dt2811_interrupt(int irq, void *d PT_REGS_ARG)
2 == unipolar 5V (0V -- +5V)
*/
-static int dt2811_attach(comedi_device * dev, comedi_devconfig * it)
+static int dt2811_attach(struct comedi_device * dev, comedi_devconfig * it)
{
//int i, irq;
//unsigned long irqs;
@@ -476,7 +476,7 @@ static int dt2811_attach(comedi_device * dev, comedi_devconfig * it)
return 0;
}
-static int dt2811_detach(comedi_device * dev)
+static int dt2811_detach(struct comedi_device * dev)
{
printk("comedi%d: dt2811: remove\n", dev->minor);
@@ -490,7 +490,7 @@ static int dt2811_detach(comedi_device * dev)
return 0;
}
-static int dt2811_ai_insn(comedi_device * dev, comedi_subdevice * s,
+static int dt2811_ai_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int chan = CR_CHAN(insn->chanspec);
@@ -519,7 +519,7 @@ static int dt2811_ai_insn(comedi_device * dev, comedi_subdevice * s,
* replaced, so I'll let it stay. */
int dt2811_adtrig(kdev_t minor, comedi_adtrig * adtrig)
{
- comedi_device *dev = comedi_devices + minor;
+ struct comedi_device *dev = comedi_devices + minor;
if (adtrig->n < 1)
return 0;
@@ -541,7 +541,7 @@ int dt2811_adtrig(kdev_t minor, comedi_adtrig * adtrig)
}
#endif
-static int dt2811_ao_insn(comedi_device * dev, comedi_subdevice * s,
+static int dt2811_ao_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
@@ -559,7 +559,7 @@ static int dt2811_ao_insn(comedi_device * dev, comedi_subdevice * s,
return i;
}
-static int dt2811_ao_insn_read(comedi_device * dev, comedi_subdevice * s,
+static int dt2811_ao_insn_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
@@ -574,7 +574,7 @@ static int dt2811_ao_insn_read(comedi_device * dev, comedi_subdevice * s,
return i;
}
-static int dt2811_di_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int dt2811_di_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
@@ -585,7 +585,7 @@ static int dt2811_di_insn_bits(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int dt2811_do_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int dt2811_do_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
diff --git a/drivers/staging/comedi/drivers/dt2814.c b/drivers/staging/comedi/drivers/dt2814.c
index bc96bf63e027..40430b5df69a 100644
--- a/drivers/staging/comedi/drivers/dt2814.c
+++ b/drivers/staging/comedi/drivers/dt2814.c
@@ -59,8 +59,8 @@ addition, the clock does not seem to be very accurate.
#define DT2814_ENB 0x10
#define DT2814_CHANMASK 0x0f
-static int dt2814_attach(comedi_device * dev, comedi_devconfig * it);
-static int dt2814_detach(comedi_device * dev);
+static int dt2814_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int dt2814_detach(struct comedi_device * dev);
static comedi_driver driver_dt2814 = {
driver_name:"dt2814",
module:THIS_MODULE,
@@ -81,7 +81,7 @@ typedef struct {
#define DT2814_TIMEOUT 10
#define DT2814_MAX_SPEED 100000 /* Arbitrary 10 khz limit */
-static int dt2814_ai_insn_read(comedi_device * dev, comedi_subdevice * s,
+static int dt2814_ai_insn_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n, i, hi, lo;
@@ -132,7 +132,7 @@ static int dt2814_ns_to_timer(unsigned int *ns, unsigned int flags)
return i;
}
-static int dt2814_ai_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int dt2814_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
@@ -224,7 +224,7 @@ static int dt2814_ai_cmdtest(comedi_device * dev, comedi_subdevice * s,
return 0;
}
-static int dt2814_ai_cmd(comedi_device * dev, comedi_subdevice * s)
+static int dt2814_ai_cmd(struct comedi_device * dev, comedi_subdevice * s)
{
comedi_cmd *cmd = &s->async->cmd;
int chan;
@@ -243,7 +243,7 @@ static int dt2814_ai_cmd(comedi_device * dev, comedi_subdevice * s)
}
-static int dt2814_attach(comedi_device * dev, comedi_devconfig * it)
+static int dt2814_attach(struct comedi_device * dev, comedi_devconfig * it)
{
int i, irq;
int ret;
@@ -327,7 +327,7 @@ static int dt2814_attach(comedi_device * dev, comedi_devconfig * it)
return 0;
}
-static int dt2814_detach(comedi_device * dev)
+static int dt2814_detach(struct comedi_device * dev)
{
printk("comedi%d: dt2814: remove\n", dev->minor);
@@ -344,7 +344,7 @@ static int dt2814_detach(comedi_device * dev)
static irqreturn_t dt2814_interrupt(int irq, void *d PT_REGS_ARG)
{
int lo, hi;
- comedi_device *dev = d;
+ struct comedi_device *dev = d;
comedi_subdevice *s;
int data;
diff --git a/drivers/staging/comedi/drivers/dt2815.c b/drivers/staging/comedi/drivers/dt2815.c
index 98a64a74c82b..892fe38d55e6 100644
--- a/drivers/staging/comedi/drivers/dt2815.c
+++ b/drivers/staging/comedi/drivers/dt2815.c
@@ -75,8 +75,8 @@ static const comedi_lrange range_dt2815_ao_20_current = { 1, {
#define DT2815_DATA 0
#define DT2815_STATUS 1
-static int dt2815_attach(comedi_device * dev, comedi_devconfig * it);
-static int dt2815_detach(comedi_device * dev);
+static int dt2815_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int dt2815_detach(struct comedi_device * dev);
static comedi_driver driver_dt2815 = {
driver_name:"dt2815",
module:THIS_MODULE,
@@ -86,7 +86,7 @@ static comedi_driver driver_dt2815 = {
COMEDI_INITCLEANUP(driver_dt2815);
-static void dt2815_free_resources(comedi_device * dev);
+static void dt2815_free_resources(struct comedi_device * dev);
typedef struct {
const comedi_lrange *range_type_list[8];
@@ -95,7 +95,7 @@ typedef struct {
#define devpriv ((dt2815_private *)dev->private)
-static int dt2815_wait_for_status(comedi_device * dev, int status)
+static int dt2815_wait_for_status(struct comedi_device * dev, int status)
{
int i;
@@ -106,7 +106,7 @@ static int dt2815_wait_for_status(comedi_device * dev, int status)
return status;
}
-static int dt2815_ao_insn_read(comedi_device * dev, comedi_subdevice * s,
+static int dt2815_ao_insn_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
@@ -119,7 +119,7 @@ static int dt2815_ao_insn_read(comedi_device * dev, comedi_subdevice * s,
return i;
}
-static int dt2815_ao_insn(comedi_device * dev, comedi_subdevice * s,
+static int dt2815_ao_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
@@ -177,7 +177,7 @@ static int dt2815_ao_insn(comedi_device * dev, comedi_subdevice * s,
1 == current
*/
-static int dt2815_attach(comedi_device * dev, comedi_devconfig * it)
+static int dt2815_attach(struct comedi_device * dev, comedi_devconfig * it)
{
comedi_subdevice *s;
int i;
@@ -246,13 +246,13 @@ static int dt2815_attach(comedi_device * dev, comedi_devconfig * it)
return 0;
}
-static void dt2815_free_resources(comedi_device * dev)
+static void dt2815_free_resources(struct comedi_device * dev)
{
if (dev->iobase)
release_region(dev->iobase, DT2815_SIZE);
}
-static int dt2815_detach(comedi_device * dev)
+static int dt2815_detach(struct comedi_device * dev)
{
printk("comedi%d: dt2815: remove\n", dev->minor);
diff --git a/drivers/staging/comedi/drivers/dt2817.c b/drivers/staging/comedi/drivers/dt2817.c
index 77c28e7b2a11..41aa03d40cdd 100644
--- a/drivers/staging/comedi/drivers/dt2817.c
+++ b/drivers/staging/comedi/drivers/dt2817.c
@@ -47,8 +47,8 @@ Configuration options:
#define DT2817_CR 0
#define DT2817_DATA 1
-static int dt2817_attach(comedi_device * dev, comedi_devconfig * it);
-static int dt2817_detach(comedi_device * dev);
+static int dt2817_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int dt2817_detach(struct comedi_device * dev);
static comedi_driver driver_dt2817 = {
driver_name:"dt2817",
module:THIS_MODULE,
@@ -58,7 +58,7 @@ static comedi_driver driver_dt2817 = {
COMEDI_INITCLEANUP(driver_dt2817);
-static int dt2817_dio_insn_config(comedi_device * dev, comedi_subdevice * s,
+static int dt2817_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int mask;
@@ -96,7 +96,7 @@ static int dt2817_dio_insn_config(comedi_device * dev, comedi_subdevice * s,
return 1;
}
-static int dt2817_dio_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int dt2817_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int changed;
@@ -131,7 +131,7 @@ static int dt2817_dio_insn_bits(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int dt2817_attach(comedi_device * dev, comedi_devconfig * it)
+static int dt2817_attach(struct comedi_device * dev, comedi_devconfig * it)
{
int ret;
comedi_subdevice *s;
@@ -167,7 +167,7 @@ static int dt2817_attach(comedi_device * dev, comedi_devconfig * it)
return 0;
}
-static int dt2817_detach(comedi_device * dev)
+static int dt2817_detach(struct comedi_device * dev)
{
printk("comedi%d: dt2817: remove\n", dev->minor);
diff --git a/drivers/staging/comedi/drivers/dt282x.c b/drivers/staging/comedi/drivers/dt282x.c
index 5cdd577475da..2c4557faac4a 100644
--- a/drivers/staging/comedi/drivers/dt282x.c
+++ b/drivers/staging/comedi/drivers/dt282x.c
@@ -394,8 +394,8 @@ typedef struct {
if(_i){b} \
}while(0)
-static int dt282x_attach(comedi_device * dev, comedi_devconfig * it);
-static int dt282x_detach(comedi_device * dev);
+static int dt282x_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int dt282x_detach(struct comedi_device * dev);
static comedi_driver driver_dt282x = {
driver_name:"dt282x",
module:THIS_MODULE,
@@ -408,17 +408,17 @@ static comedi_driver driver_dt282x = {
COMEDI_INITCLEANUP(driver_dt282x);
-static void free_resources(comedi_device * dev);
-static int prep_ai_dma(comedi_device * dev, int chan, int size);
-static int prep_ao_dma(comedi_device * dev, int chan, int size);
-static int dt282x_ai_cancel(comedi_device * dev, comedi_subdevice * s);
-static int dt282x_ao_cancel(comedi_device * dev, comedi_subdevice * s);
+static void free_resources(struct comedi_device * dev);
+static int prep_ai_dma(struct comedi_device * dev, int chan, int size);
+static int prep_ao_dma(struct comedi_device * dev, int chan, int size);
+static int dt282x_ai_cancel(struct comedi_device * dev, comedi_subdevice * s);
+static int dt282x_ao_cancel(struct comedi_device * dev, comedi_subdevice * s);
static int dt282x_ns_to_timer(int *nanosec, int round_mode);
-static void dt282x_disable_dma(comedi_device * dev);
+static void dt282x_disable_dma(struct comedi_device * dev);
-static int dt282x_grab_dma(comedi_device * dev, int dma1, int dma2);
+static int dt282x_grab_dma(struct comedi_device * dev, int dma1, int dma2);
-static void dt282x_munge(comedi_device * dev, short * buf,
+static void dt282x_munge(struct comedi_device * dev, short * buf,
unsigned int nbytes)
{
unsigned int i;
@@ -440,7 +440,7 @@ static void dt282x_munge(comedi_device * dev, short * buf,
}
}
-static void dt282x_ao_dma_interrupt(comedi_device * dev)
+static void dt282x_ao_dma_interrupt(struct comedi_device * dev)
{
void *ptr;
int size;
@@ -472,7 +472,7 @@ static void dt282x_ao_dma_interrupt(comedi_device * dev)
return;
}
-static void dt282x_ai_dma_interrupt(comedi_device * dev)
+static void dt282x_ai_dma_interrupt(struct comedi_device * dev)
{
void *ptr;
int size;
@@ -524,7 +524,7 @@ static void dt282x_ai_dma_interrupt(comedi_device * dev)
prep_ai_dma(dev, i, 0);
}
-static int prep_ai_dma(comedi_device * dev, int dma_index, int n)
+static int prep_ai_dma(struct comedi_device * dev, int dma_index, int n)
{
int dma_chan;
unsigned long dma_ptr;
@@ -555,7 +555,7 @@ static int prep_ai_dma(comedi_device * dev, int dma_index, int n)
return n;
}
-static int prep_ao_dma(comedi_device * dev, int dma_index, int n)
+static int prep_ao_dma(struct comedi_device * dev, int dma_index, int n)
{
int dma_chan;
unsigned long dma_ptr;
@@ -579,7 +579,7 @@ static int prep_ao_dma(comedi_device * dev, int dma_index, int n)
static irqreturn_t dt282x_interrupt(int irq, void *d PT_REGS_ARG)
{
- comedi_device *dev = d;
+ struct comedi_device *dev = d;
comedi_subdevice *s;
comedi_subdevice *s_ao;
unsigned int supcsr, adcsr, dacsr;
@@ -653,7 +653,7 @@ static irqreturn_t dt282x_interrupt(int irq, void *d PT_REGS_ARG)
return IRQ_RETVAL(handled);
}
-static void dt282x_load_changain(comedi_device * dev, int n,
+static void dt282x_load_changain(struct comedi_device * dev, int n,
unsigned int *chanlist)
{
unsigned int i;
@@ -674,7 +674,7 @@ static void dt282x_load_changain(comedi_device * dev, int n,
* - preload multiplexer
* - trigger conversion and wait for it to finish
*/
-static int dt282x_ai_insn_read(comedi_device * dev, comedi_subdevice * s,
+static int dt282x_ai_insn_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
@@ -706,7 +706,7 @@ static int dt282x_ai_insn_read(comedi_device * dev, comedi_subdevice * s,
return i;
}
-static int dt282x_ai_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int dt282x_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
@@ -818,7 +818,7 @@ static int dt282x_ai_cmdtest(comedi_device * dev, comedi_subdevice * s,
return 0;
}
-static int dt282x_ai_cmd(comedi_device * dev, comedi_subdevice * s)
+static int dt282x_ai_cmd(struct comedi_device * dev, comedi_subdevice * s)
{
comedi_cmd *cmd = &s->async->cmd;
int timer;
@@ -879,7 +879,7 @@ static int dt282x_ai_cmd(comedi_device * dev, comedi_subdevice * s)
return 0;
}
-static void dt282x_disable_dma(comedi_device * dev)
+static void dt282x_disable_dma(struct comedi_device * dev)
{
if (devpriv->usedma) {
disable_dma(devpriv->dma[0].chan);
@@ -887,7 +887,7 @@ static void dt282x_disable_dma(comedi_device * dev)
}
}
-static int dt282x_ai_cancel(comedi_device * dev, comedi_subdevice * s)
+static int dt282x_ai_cancel(struct comedi_device * dev, comedi_subdevice * s)
{
dt282x_disable_dma(dev);
@@ -937,7 +937,7 @@ static int dt282x_ns_to_timer(int *nanosec, int round_mode)
* offset binary if necessary, loads the data into the DAC
* data register, and performs the conversion.
*/
-static int dt282x_ao_insn_read(comedi_device * dev, comedi_subdevice * s,
+static int dt282x_ao_insn_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
data[0] = devpriv->ao[CR_CHAN(insn->chanspec)];
@@ -945,7 +945,7 @@ static int dt282x_ao_insn_read(comedi_device * dev, comedi_subdevice * s,
return 1;
}
-static int dt282x_ao_insn_write(comedi_device * dev, comedi_subdevice * s,
+static int dt282x_ao_insn_write(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
short d;
@@ -978,7 +978,7 @@ static int dt282x_ao_insn_write(comedi_device * dev, comedi_subdevice * s,
return 1;
}
-static int dt282x_ao_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int dt282x_ao_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
@@ -1069,7 +1069,7 @@ static int dt282x_ao_cmdtest(comedi_device * dev, comedi_subdevice * s,
}
-static int dt282x_ao_inttrig(comedi_device * dev, comedi_subdevice * s,
+static int dt282x_ao_inttrig(struct comedi_device * dev, comedi_subdevice * s,
unsigned int x)
{
int size;
@@ -1099,7 +1099,7 @@ static int dt282x_ao_inttrig(comedi_device * dev, comedi_subdevice * s,
return 1;
}
-static int dt282x_ao_cmd(comedi_device * dev, comedi_subdevice * s)
+static int dt282x_ao_cmd(struct comedi_device * dev, comedi_subdevice * s)
{
int timer;
comedi_cmd *cmd = &s->async->cmd;
@@ -1132,7 +1132,7 @@ static int dt282x_ao_cmd(comedi_device * dev, comedi_subdevice * s)
return 0;
}
-static int dt282x_ao_cancel(comedi_device * dev, comedi_subdevice * s)
+static int dt282x_ao_cancel(struct comedi_device * dev, comedi_subdevice * s)
{
dt282x_disable_dma(dev);
@@ -1145,7 +1145,7 @@ static int dt282x_ao_cancel(comedi_device * dev, comedi_subdevice * s)
return 0;
}
-static int dt282x_dio_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int dt282x_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (data[0]) {
@@ -1159,7 +1159,7 @@ static int dt282x_dio_insn_bits(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int dt282x_dio_insn_config(comedi_device * dev, comedi_subdevice * s,
+static int dt282x_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int mask;
@@ -1240,7 +1240,7 @@ enum { opt_iobase = 0, opt_irq, opt_dma1, opt_dma2, /* i/o base, irq, dma channe
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)
+static int dt282x_attach(struct comedi_device * dev, comedi_devconfig * it)
{
int i, irq;
int ret;
@@ -1396,7 +1396,7 @@ static int dt282x_attach(comedi_device * dev, comedi_devconfig * it)
return 0;
}
-static void free_resources(comedi_device * dev)
+static void free_resources(struct comedi_device * dev)
{
if (dev->irq) {
comedi_free_irq(dev->irq, dev);
@@ -1415,7 +1415,7 @@ static void free_resources(comedi_device * dev)
}
}
-static int dt282x_detach(comedi_device * dev)
+static int dt282x_detach(struct comedi_device * dev)
{
printk("comedi%d: dt282x: remove\n", dev->minor);
@@ -1424,7 +1424,7 @@ static int dt282x_detach(comedi_device * dev)
return 0;
}
-static int dt282x_grab_dma(comedi_device * dev, int dma1, int dma2)
+static int dt282x_grab_dma(struct comedi_device * dev, int dma1, int dma2)
{
int ret;
diff --git a/drivers/staging/comedi/drivers/dt3000.c b/drivers/staging/comedi/drivers/dt3000.c
index b1af0e74cc73..0b015a0d8203 100644
--- a/drivers/staging/comedi/drivers/dt3000.c
+++ b/drivers/staging/comedi/drivers/dt3000.c
@@ -271,8 +271,8 @@ typedef struct {
} dt3k_private;
#define devpriv ((dt3k_private *)dev->private)
-static int dt3000_attach(comedi_device * dev, comedi_devconfig * it);
-static int dt3000_detach(comedi_device * dev);
+static int dt3000_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int dt3000_detach(struct comedi_device * dev);
static comedi_driver driver_dt3000 = {
driver_name:"dt3000",
module:THIS_MODULE,
@@ -282,17 +282,17 @@ static comedi_driver driver_dt3000 = {
COMEDI_PCI_INITCLEANUP(driver_dt3000, dt3k_pci_table);
-static void dt3k_ai_empty_fifo(comedi_device * dev, comedi_subdevice * s);
+static void dt3k_ai_empty_fifo(struct comedi_device * dev, comedi_subdevice * s);
static int dt3k_ns_to_timer(unsigned int timer_base, unsigned int *arg,
unsigned int round_mode);
-static int dt3k_ai_cancel(comedi_device * dev, comedi_subdevice * s);
+static int dt3k_ai_cancel(struct comedi_device * dev, comedi_subdevice * s);
#ifdef DEBUG
static void debug_intr_flags(unsigned int flags);
#endif
#define TIMEOUT 100
-static int dt3k_send_cmd(comedi_device * dev, unsigned int cmd)
+static int dt3k_send_cmd(struct comedi_device * dev, unsigned int cmd)
{
int i;
unsigned int status = 0;
@@ -314,7 +314,7 @@ static int dt3k_send_cmd(comedi_device * dev, unsigned int cmd)
return -ETIME;
}
-static unsigned int dt3k_readsingle(comedi_device * dev, unsigned int subsys,
+static unsigned int dt3k_readsingle(struct comedi_device * dev, unsigned int subsys,
unsigned int chan, unsigned int gain)
{
writew(subsys, devpriv->io_addr + DPR_SubSys);
@@ -327,7 +327,7 @@ static unsigned int dt3k_readsingle(comedi_device * dev, unsigned int subsys,
return readw(devpriv->io_addr + DPR_Params(2));
}
-static void dt3k_writesingle(comedi_device * dev, unsigned int subsys,
+static void dt3k_writesingle(struct comedi_device * dev, unsigned int subsys,
unsigned int chan, unsigned int data)
{
writew(subsys, devpriv->io_addr + DPR_SubSys);
@@ -345,7 +345,7 @@ static int debug_n_ints = 0;
// What's this debug_n_ints stuff? Obviously needs some work...
static irqreturn_t dt3k_interrupt(int irq, void *d PT_REGS_ARG)
{
- comedi_device *dev = d;
+ struct comedi_device *dev = d;
comedi_subdevice *s;
unsigned int status;
@@ -396,7 +396,7 @@ static void debug_intr_flags(unsigned int flags)
}
#endif
-static void dt3k_ai_empty_fifo(comedi_device * dev, comedi_subdevice * s)
+static void dt3k_ai_empty_fifo(struct comedi_device * dev, comedi_subdevice * s)
{
int front;
int rear;
@@ -425,7 +425,7 @@ static void dt3k_ai_empty_fifo(comedi_device * dev, comedi_subdevice * s)
writew(rear, devpriv->io_addr + DPR_AD_Buf_Rear);
}
-static int dt3k_ai_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int dt3k_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
@@ -587,7 +587,7 @@ static int dt3k_ns_to_timer(unsigned int timer_base, unsigned int *nanosec,
return (prescale << 16) | (divider);
}
-static int dt3k_ai_cmd(comedi_device * dev, comedi_subdevice * s)
+static int dt3k_ai_cmd(struct comedi_device * dev, comedi_subdevice * s)
{
comedi_cmd *cmd = &s->async->cmd;
int i;
@@ -655,7 +655,7 @@ static int dt3k_ai_cmd(comedi_device * dev, comedi_subdevice * s)
return 0;
}
-static int dt3k_ai_cancel(comedi_device * dev, comedi_subdevice * s)
+static int dt3k_ai_cancel(struct comedi_device * dev, comedi_subdevice * s)
{
int ret;
@@ -667,7 +667,7 @@ static int dt3k_ai_cancel(comedi_device * dev, comedi_subdevice * s)
return 0;
}
-static int dt3k_ai_insn(comedi_device * dev, comedi_subdevice * s,
+static int dt3k_ai_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
@@ -685,7 +685,7 @@ static int dt3k_ai_insn(comedi_device * dev, comedi_subdevice * s,
return i;
}
-static int dt3k_ao_insn(comedi_device * dev, comedi_subdevice * s,
+static int dt3k_ao_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
@@ -700,7 +700,7 @@ static int dt3k_ao_insn(comedi_device * dev, comedi_subdevice * s,
return i;
}
-static int dt3k_ao_insn_read(comedi_device * dev, comedi_subdevice * s,
+static int dt3k_ao_insn_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
@@ -714,7 +714,7 @@ static int dt3k_ao_insn_read(comedi_device * dev, comedi_subdevice * s,
return i;
}
-static void dt3k_dio_config(comedi_device * dev, int bits)
+static void dt3k_dio_config(struct comedi_device * dev, int bits)
{
/* XXX */
writew(SUBS_DOUT, devpriv->io_addr + DPR_SubSys);
@@ -729,7 +729,7 @@ static void dt3k_dio_config(comedi_device * dev, int bits)
dt3k_send_cmd(dev, CMD_CONFIG);
}
-static int dt3k_dio_insn_config(comedi_device * dev, comedi_subdevice * s,
+static int dt3k_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int mask;
@@ -760,7 +760,7 @@ static int dt3k_dio_insn_config(comedi_device * dev, comedi_subdevice * s,
return insn->n;
}
-static int dt3k_dio_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int dt3k_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
@@ -776,7 +776,7 @@ static int dt3k_dio_insn_bits(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int dt3k_mem_insn_read(comedi_device * dev, comedi_subdevice * s,
+static int dt3k_mem_insn_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int addr = CR_CHAN(insn->chanspec);
@@ -795,9 +795,9 @@ static int dt3k_mem_insn_read(comedi_device * dev, comedi_subdevice * s,
return i;
}
-static int dt_pci_probe(comedi_device * dev, int bus, int slot);
+static int dt_pci_probe(struct comedi_device * dev, int bus, int slot);
-static int dt3000_attach(comedi_device * dev, comedi_devconfig * it)
+static int dt3000_attach(struct comedi_device * dev, comedi_devconfig * it)
{
comedi_subdevice *s;
int bus, slot;
@@ -886,7 +886,7 @@ static int dt3000_attach(comedi_device * dev, comedi_devconfig * it)
return 0;
}
-static int dt3000_detach(comedi_device * dev)
+static int dt3000_detach(struct comedi_device * dev)
{
if (dev->irq)
comedi_free_irq(dev->irq, dev);
@@ -907,9 +907,9 @@ static int dt3000_detach(comedi_device * dev)
}
static struct pci_dev *dt_pci_find_device(struct pci_dev *from, int *board);
-static int setup_pci(comedi_device * dev);
+static int setup_pci(struct comedi_device * dev);
-static int dt_pci_probe(comedi_device * dev, int bus, int slot)
+static int dt_pci_probe(struct comedi_device * dev, int bus, int slot)
{
int board;
int ret;
@@ -937,7 +937,7 @@ static int dt_pci_probe(comedi_device * dev, int bus, int slot)
return 1;
}
-static int setup_pci(comedi_device * dev)
+static int setup_pci(struct comedi_device * dev)
{
resource_size_t addr;
int ret;
diff --git a/drivers/staging/comedi/drivers/dt9812.c b/drivers/staging/comedi/drivers/dt9812.c
index bbb5a146a7ee..068ef2f79e5a 100644
--- a/drivers/staging/comedi/drivers/dt9812.c
+++ b/drivers/staging/comedi/drivers/dt9812.c
@@ -892,7 +892,7 @@ static struct usb_driver dt9812_usb_driver = {
* Comedi functions
*/
-static void dt9812_comedi_open(comedi_device *dev)
+static void dt9812_comedi_open(struct comedi_device *dev)
{
down(&devpriv->slot->mutex);
if (devpriv->slot->usb) {
@@ -940,7 +940,7 @@ static void dt9812_comedi_open(comedi_device *dev)
up(&devpriv->slot->mutex);
}
-static int dt9812_di_rinsn(comedi_device *dev, comedi_subdevice *s,
+static int dt9812_di_rinsn(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
int n;
@@ -952,7 +952,7 @@ static int dt9812_di_rinsn(comedi_device *dev, comedi_subdevice *s,
return n;
}
-static int dt9812_do_winsn(comedi_device *dev, comedi_subdevice *s,
+static int dt9812_do_winsn(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
int n;
@@ -970,7 +970,7 @@ static int dt9812_do_winsn(comedi_device *dev, comedi_subdevice *s,
return n;
}
-static int dt9812_ai_rinsn(comedi_device *dev, comedi_subdevice *s,
+static int dt9812_ai_rinsn(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
int n;
@@ -985,7 +985,7 @@ static int dt9812_ai_rinsn(comedi_device *dev, comedi_subdevice *s,
return n;
}
-static int dt9812_ao_rinsn(comedi_device *dev, comedi_subdevice *s,
+static int dt9812_ao_rinsn(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
int n;
@@ -999,7 +999,7 @@ static int dt9812_ao_rinsn(comedi_device *dev, comedi_subdevice *s,
return n;
}
-static int dt9812_ao_winsn(comedi_device *dev, comedi_subdevice *s,
+static int dt9812_ao_winsn(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
int n;
@@ -1009,7 +1009,7 @@ static int dt9812_ao_winsn(comedi_device *dev, comedi_subdevice *s,
return n;
}
-static int dt9812_attach(comedi_device *dev, comedi_devconfig *it)
+static int dt9812_attach(struct comedi_device *dev, comedi_devconfig *it)
{
int i;
comedi_subdevice *s;
@@ -1103,7 +1103,7 @@ static int dt9812_attach(comedi_device *dev, comedi_devconfig *it)
return 0;
}
-static int dt9812_detach(comedi_device *dev)
+static int dt9812_detach(struct comedi_device *dev)
{
return 0;
}
diff --git a/drivers/staging/comedi/drivers/fl512.c b/drivers/staging/comedi/drivers/fl512.c
index 26709987278c..20bd47318439 100644
--- a/drivers/staging/comedi/drivers/fl512.c
+++ b/drivers/staging/comedi/drivers/fl512.c
@@ -40,8 +40,8 @@ static const comedi_lrange range_fl512 = { 4, {
}
};
-static int fl512_attach(comedi_device * dev, comedi_devconfig * it);
-static int fl512_detach(comedi_device * dev);
+static int fl512_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int fl512_detach(struct comedi_device * dev);
static comedi_driver driver_fl512 = {
driver_name:"fl512",
@@ -52,17 +52,17 @@ static comedi_driver driver_fl512 = {
COMEDI_INITCLEANUP(driver_fl512);
-static int fl512_ai_insn(comedi_device * dev,
+static int fl512_ai_insn(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
-static int fl512_ao_insn(comedi_device * dev,
+static int fl512_ao_insn(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
-static int fl512_ao_insn_readback(comedi_device * dev,
+static int fl512_ao_insn_readback(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
/*
* fl512_ai_insn : this is the analog input function
*/
-static int fl512_ai_insn(comedi_device * dev,
+static int fl512_ai_insn(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
int n;
@@ -87,7 +87,7 @@ static int fl512_ai_insn(comedi_device * dev,
/*
* fl512_ao_insn : used to write to a DA port n times
*/
-static int fl512_ao_insn(comedi_device * dev,
+static int fl512_ao_insn(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
int n;
@@ -108,7 +108,7 @@ static int fl512_ao_insn(comedi_device * dev,
* fl512_ao_insn_readback : used to read previous values written to
* DA port
*/
-static int fl512_ao_insn_readback(comedi_device * dev,
+static int fl512_ao_insn_readback(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
int n;
@@ -124,7 +124,7 @@ static int fl512_ao_insn_readback(comedi_device * dev,
/*
* start attach
*/
-static int fl512_attach(comedi_device * dev, comedi_devconfig * it)
+static int fl512_attach(struct comedi_device * dev, comedi_devconfig * it)
{
unsigned long iobase;
comedi_subdevice *s; /* pointer to the subdevice:
@@ -175,7 +175,7 @@ static int fl512_attach(comedi_device * dev, comedi_devconfig * it)
return 1;
}
-static int fl512_detach(comedi_device * dev)
+static int fl512_detach(struct comedi_device * dev)
{
if (dev->iobase)
release_region(dev->iobase, FL512_SIZE);
diff --git a/drivers/staging/comedi/drivers/gsc_hpdi.c b/drivers/staging/comedi/drivers/gsc_hpdi.c
index 07ed2380aa9a..5048255b4a3f 100644
--- a/drivers/staging/comedi/drivers/gsc_hpdi.c
+++ b/drivers/staging/comedi/drivers/gsc_hpdi.c
@@ -52,15 +52,15 @@ support could be added to this driver.
#include "plx9080.h"
#include "comedi_fc.h"
-static int hpdi_attach(comedi_device * dev, comedi_devconfig * it);
-static int hpdi_detach(comedi_device * dev);
-void abort_dma(comedi_device * dev, unsigned int channel);
-static int hpdi_cmd(comedi_device * dev, comedi_subdevice * s);
-static int hpdi_cmd_test(comedi_device * dev, comedi_subdevice * s,
+static int hpdi_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int hpdi_detach(struct comedi_device * dev);
+void abort_dma(struct comedi_device * dev, unsigned int channel);
+static int hpdi_cmd(struct comedi_device * dev, comedi_subdevice * s);
+static int hpdi_cmd_test(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd);
-static int hpdi_cancel(comedi_device * dev, comedi_subdevice * s);
+static int hpdi_cancel(struct comedi_device * dev, comedi_subdevice * s);
static irqreturn_t handle_interrupt(int irq, void *d PT_REGS_ARG);
-static int dio_config_block_size(comedi_device * dev, unsigned int * data);
+static int dio_config_block_size(struct comedi_device * dev, unsigned int * data);
#undef HPDI_DEBUG // disable debugging messages
//#define HPDI_DEBUG // enable debugging code
@@ -294,7 +294,7 @@ static DEFINE_PCI_DEVICE_TABLE(hpdi_pci_table) = {
MODULE_DEVICE_TABLE(pci, hpdi_pci_table);
-static inline hpdi_board *board(const comedi_device * dev)
+static inline hpdi_board *board(const struct comedi_device * dev)
{
return (hpdi_board *) dev->board_ptr;
}
@@ -322,7 +322,7 @@ typedef struct {
unsigned dio_config_output:1;
} hpdi_private;
-static inline hpdi_private *priv(comedi_device * dev)
+static inline hpdi_private *priv(struct comedi_device * dev)
{
return dev->private;
}
@@ -336,7 +336,7 @@ static comedi_driver driver_hpdi = {
COMEDI_PCI_INITCLEANUP(driver_hpdi, hpdi_pci_table);
-static int dio_config_insn(comedi_device * dev, comedi_subdevice * s,
+static int dio_config_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
switch (data[0]) {
@@ -364,13 +364,13 @@ static int dio_config_insn(comedi_device * dev, comedi_subdevice * s,
return -EINVAL;
}
-static void disable_plx_interrupts(comedi_device * dev)
+static void disable_plx_interrupts(struct comedi_device * dev)
{
writel(0, priv(dev)->plx9080_iobase + PLX_INTRCS_REG);
}
// initialize plx9080 chip
-static void init_plx9080(comedi_device * dev)
+static void init_plx9080(struct comedi_device * dev)
{
uint32_t bits;
void *plx_iobase = priv(dev)->plx9080_iobase;
@@ -435,7 +435,7 @@ static void init_plx9080(comedi_device * dev)
/* Allocate and initialize the subdevice structures.
*/
-static int setup_subdevices(comedi_device * dev)
+static int setup_subdevices(struct comedi_device * dev)
{
comedi_subdevice *s;
@@ -461,7 +461,7 @@ static int setup_subdevices(comedi_device * dev)
return 0;
}
-static int init_hpdi(comedi_device * dev)
+static int init_hpdi(struct comedi_device * dev)
{
uint32_t plx_intcsr_bits;
@@ -490,7 +490,7 @@ static int init_hpdi(comedi_device * dev)
}
// setup dma descriptors so a link completes every 'transfer_size' bytes
-static int setup_dma_descriptors(comedi_device * dev,
+static int setup_dma_descriptors(struct comedi_device * dev,
unsigned int transfer_size)
{
unsigned int buffer_index, buffer_offset;
@@ -552,7 +552,7 @@ static int setup_dma_descriptors(comedi_device * dev,
return transfer_size;
}
-static int hpdi_attach(comedi_device * dev, comedi_devconfig * it)
+static int hpdi_attach(struct comedi_device * dev, comedi_devconfig * it)
{
struct pci_dev *pcidev;
int i;
@@ -661,7 +661,7 @@ static int hpdi_attach(comedi_device * dev, comedi_devconfig * it)
return init_hpdi(dev);
}
-static int hpdi_detach(comedi_device * dev)
+static int hpdi_detach(struct comedi_device * dev)
{
unsigned int i;
@@ -702,7 +702,7 @@ static int hpdi_detach(comedi_device * dev)
return 0;
}
-static int dio_config_block_size(comedi_device * dev, unsigned int * data)
+static int dio_config_block_size(struct comedi_device * dev, unsigned int * data)
{
unsigned int requested_block_size;
int retval;
@@ -718,7 +718,7 @@ static int dio_config_block_size(comedi_device * dev, unsigned int * data)
return 2;
}
-static int di_cmd_test(comedi_device * dev, comedi_subdevice * s,
+static int di_cmd_test(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
@@ -818,7 +818,7 @@ static int di_cmd_test(comedi_device * dev, comedi_subdevice * s,
return 0;
}
-static int hpdi_cmd_test(comedi_device * dev, comedi_subdevice * s,
+static int hpdi_cmd_test(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd)
{
if (priv(dev)->dio_config_output) {
@@ -827,14 +827,14 @@ static int hpdi_cmd_test(comedi_device * dev, comedi_subdevice * s,
return di_cmd_test(dev, s, cmd);
}
-static inline void hpdi_writel(comedi_device * dev, uint32_t bits,
+static inline void hpdi_writel(struct comedi_device * dev, uint32_t bits,
unsigned int offset)
{
writel(bits | priv(dev)->bits[offset / sizeof(uint32_t)],
priv(dev)->hpdi_iobase + offset);
}
-static int di_cmd(comedi_device * dev, comedi_subdevice * s)
+static int di_cmd(struct comedi_device * dev, comedi_subdevice * s)
{
uint32_t bits;
unsigned long flags;
@@ -887,7 +887,7 @@ static int di_cmd(comedi_device * dev, comedi_subdevice * s)
return 0;
}
-static int hpdi_cmd(comedi_device * dev, comedi_subdevice * s)
+static int hpdi_cmd(struct comedi_device * dev, comedi_subdevice * s)
{
if (priv(dev)->dio_config_output) {
return -EINVAL;
@@ -895,7 +895,7 @@ static int hpdi_cmd(comedi_device * dev, comedi_subdevice * s)
return di_cmd(dev, s);
}
-static void drain_dma_buffers(comedi_device * dev, unsigned int channel)
+static void drain_dma_buffers(struct comedi_device * dev, unsigned int channel)
{
comedi_async *async = dev->read_subdev->async;
uint32_t next_transfer_addr;
@@ -943,7 +943,7 @@ static void drain_dma_buffers(comedi_device * dev, unsigned int channel)
static irqreturn_t handle_interrupt(int irq, void *d PT_REGS_ARG)
{
- comedi_device *dev = d;
+ struct comedi_device *dev = d;
comedi_subdevice *s = dev->read_subdev;
comedi_async *async = s->async;
uint32_t hpdi_intr_status, hpdi_board_status;
@@ -1032,7 +1032,7 @@ static irqreturn_t handle_interrupt(int irq, void *d PT_REGS_ARG)
return IRQ_HANDLED;
}
-void abort_dma(comedi_device * dev, unsigned int channel)
+void abort_dma(struct comedi_device * dev, unsigned int channel)
{
unsigned long flags;
@@ -1044,7 +1044,7 @@ void abort_dma(comedi_device * dev, unsigned int channel)
comedi_spin_unlock_irqrestore(&dev->spinlock, flags);
}
-static int hpdi_cancel(comedi_device * dev, comedi_subdevice * s)
+static int hpdi_cancel(struct comedi_device * dev, comedi_subdevice * s)
{
hpdi_writel(dev, 0, BOARD_CONTROL_REG);
diff --git a/drivers/staging/comedi/drivers/icp_multi.c b/drivers/staging/comedi/drivers/icp_multi.c
index 1d27e90213cd..04152148a106 100644
--- a/drivers/staging/comedi/drivers/icp_multi.c
+++ b/drivers/staging/comedi/drivers/icp_multi.c
@@ -123,8 +123,8 @@ static const char range_codes_analog[] = { 0x00, 0x20, 0x10, 0x30 };
Forward declarations
==============================================================================
*/
-static int icp_multi_attach(comedi_device *dev, comedi_devconfig *it);
-static int icp_multi_detach(comedi_device *dev);
+static int icp_multi_attach(struct comedi_device *dev, comedi_devconfig *it);
+static int icp_multi_detach(struct comedi_device *dev);
/*
==============================================================================
@@ -214,12 +214,12 @@ struct icp_multi_private {
*/
#if 0
-static int check_channel_list(comedi_device *dev, comedi_subdevice *s,
+static int check_channel_list(struct comedi_device *dev, comedi_subdevice *s,
unsigned int *chanlist, unsigned int n_chan);
#endif
-static void setup_channel_list(comedi_device *dev, comedi_subdevice *s,
+static void setup_channel_list(struct comedi_device *dev, comedi_subdevice *s,
unsigned int *chanlist, unsigned int n_chan);
-static int icp_multi_reset(comedi_device *dev);
+static int icp_multi_reset(struct comedi_device *dev);
/*
==============================================================================
@@ -236,7 +236,7 @@ static int icp_multi_reset(comedi_device *dev);
This function reads a single analogue input.
Parameters:
- comedi_device *dev Pointer to current device structure
+ struct comedi_device *dev Pointer to current device structure
comedi_subdevice *s Pointer to current subdevice structure
comedi_insn *insn Pointer to current comedi instruction
unsigned int *data Pointer to analogue input data
@@ -245,7 +245,7 @@ static int icp_multi_reset(comedi_device *dev);
==============================================================================
*/
-static int icp_multi_insn_read_ai(comedi_device *dev, comedi_subdevice *s,
+static int icp_multi_insn_read_ai(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
int n, timeout;
@@ -355,7 +355,7 @@ static int icp_multi_insn_read_ai(comedi_device *dev, comedi_subdevice *s,
This function writes a single analogue output.
Parameters:
- comedi_device *dev Pointer to current device structure
+ struct comedi_device *dev Pointer to current device structure
comedi_subdevice *s Pointer to current subdevice structure
comedi_insn *insn Pointer to current comedi instruction
unsigned int *data Pointer to analogue output data
@@ -364,7 +364,7 @@ static int icp_multi_insn_read_ai(comedi_device *dev, comedi_subdevice *s,
==============================================================================
*/
-static int icp_multi_insn_write_ao(comedi_device *dev, comedi_subdevice *s,
+static int icp_multi_insn_write_ao(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
int n, chan, range, timeout;
@@ -463,7 +463,7 @@ static int icp_multi_insn_write_ao(comedi_device *dev, comedi_subdevice *s,
This function reads a single analogue output.
Parameters:
- comedi_device *dev Pointer to current device structure
+ struct comedi_device *dev Pointer to current device structure
comedi_subdevice *s Pointer to current subdevice structure
comedi_insn *insn Pointer to current comedi instruction
unsigned int *data Pointer to analogue output data
@@ -472,7 +472,7 @@ static int icp_multi_insn_write_ao(comedi_device *dev, comedi_subdevice *s,
==============================================================================
*/
-static int icp_multi_insn_read_ao(comedi_device *dev, comedi_subdevice *s,
+static int icp_multi_insn_read_ao(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
int n, chan;
@@ -496,7 +496,7 @@ static int icp_multi_insn_read_ao(comedi_device *dev, comedi_subdevice *s,
This function reads the digital inputs.
Parameters:
- comedi_device *dev Pointer to current device structure
+ struct comedi_device *dev Pointer to current device structure
comedi_subdevice *s Pointer to current subdevice structure
comedi_insn *insn Pointer to current comedi instruction
unsigned int *data Pointer to analogue output data
@@ -505,7 +505,7 @@ static int icp_multi_insn_read_ao(comedi_device *dev, comedi_subdevice *s,
==============================================================================
*/
-static int icp_multi_insn_bits_di(comedi_device *dev, comedi_subdevice *s,
+static int icp_multi_insn_bits_di(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
data[1] = readw(devpriv->io_addr + ICP_MULTI_DI);
@@ -522,7 +522,7 @@ static int icp_multi_insn_bits_di(comedi_device *dev, comedi_subdevice *s,
This function writes the appropriate digital outputs.
Parameters:
- comedi_device *dev Pointer to current device structure
+ struct comedi_device *dev Pointer to current device structure
comedi_subdevice *s Pointer to current subdevice structure
comedi_insn *insn Pointer to current comedi instruction
unsigned int *data Pointer to analogue output data
@@ -531,7 +531,7 @@ static int icp_multi_insn_bits_di(comedi_device *dev, comedi_subdevice *s,
==============================================================================
*/
-static int icp_multi_insn_bits_do(comedi_device *dev, comedi_subdevice *s,
+static int icp_multi_insn_bits_do(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
#ifdef ICP_MULTI_EXTDEBUG
@@ -564,7 +564,7 @@ static int icp_multi_insn_bits_do(comedi_device *dev, comedi_subdevice *s,
This function reads the specified counter.
Parameters:
- comedi_device *dev Pointer to current device structure
+ struct comedi_device *dev Pointer to current device structure
comedi_subdevice *s Pointer to current subdevice structure
comedi_insn *insn Pointer to current comedi instruction
unsigned int *data Pointer to counter data
@@ -573,7 +573,7 @@ static int icp_multi_insn_bits_do(comedi_device *dev, comedi_subdevice *s,
==============================================================================
*/
-static int icp_multi_insn_read_ctr(comedi_device *dev, comedi_subdevice *s,
+static int icp_multi_insn_read_ctr(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
return 0;
@@ -588,7 +588,7 @@ static int icp_multi_insn_read_ctr(comedi_device *dev, comedi_subdevice *s,
This function write to the specified counter.
Parameters:
- comedi_device *dev Pointer to current device structure
+ struct comedi_device *dev Pointer to current device structure
comedi_subdevice *s Pointer to current subdevice structure
comedi_insn *insn Pointer to current comedi instruction
unsigned int *data Pointer to counter data
@@ -597,7 +597,7 @@ static int icp_multi_insn_read_ctr(comedi_device *dev, comedi_subdevice *s,
==============================================================================
*/
-static int icp_multi_insn_write_ctr(comedi_device *dev, comedi_subdevice *s,
+static int icp_multi_insn_write_ctr(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
return 0;
@@ -620,7 +620,7 @@ static int icp_multi_insn_write_ctr(comedi_device *dev, comedi_subdevice *s,
*/
static irqreturn_t interrupt_service_icp_multi(int irq, void *d PT_REGS_ARG)
{
- comedi_device *dev = d;
+ struct comedi_device *dev = d;
int int_no;
#ifdef ICP_MULTI_EXTDEBUG
@@ -679,7 +679,7 @@ static irqreturn_t interrupt_service_icp_multi(int irq, void *d PT_REGS_ARG)
is built correctly
Parameters:
- comedi_device *dev Pointer to current sevice structure
+ struct comedi_device *dev Pointer to current sevice structure
comedi_subdevice *s Pointer to current subdevice structure
unsigned int *chanlist Pointer to packed channel list
unsigned int n_chan Number of channels to scan
@@ -689,7 +689,7 @@ static irqreturn_t interrupt_service_icp_multi(int irq, void *d PT_REGS_ARG)
==============================================================================
*/
-static int check_channel_list(comedi_device *dev, comedi_subdevice *s,
+static int check_channel_list(struct comedi_device *dev, comedi_subdevice *s,
unsigned int *chanlist, unsigned int n_chan)
{
unsigned int i;
@@ -734,7 +734,7 @@ static int check_channel_list(comedi_device *dev, comedi_subdevice *s,
Status register.
Parameters:
- comedi_device *dev Pointer to current sevice structure
+ struct comedi_device *dev Pointer to current sevice structure
comedi_subdevice *s Pointer to current subdevice structure
unsigned int *chanlist Pointer to packed channel list
unsigned int n_chan Number of channels to scan
@@ -743,7 +743,7 @@ static int check_channel_list(comedi_device *dev, comedi_subdevice *s,
==============================================================================
*/
-static void setup_channel_list(comedi_device *dev, comedi_subdevice *s,
+static void setup_channel_list(struct comedi_device *dev, comedi_subdevice *s,
unsigned int *chanlist, unsigned int n_chan)
{
unsigned int i, range, chanprog;
@@ -806,13 +806,13 @@ static void setup_channel_list(comedi_device *dev, comedi_subdevice *s,
This function resets the icp multi device to a 'safe' state
Parameters:
- comedi_device *dev Pointer to current sevice structure
+ struct comedi_device *dev Pointer to current sevice structure
Returns:int 0 = success
==============================================================================
*/
-static int icp_multi_reset(comedi_device *dev)
+static int icp_multi_reset(struct comedi_device *dev)
{
unsigned int i;
@@ -863,14 +863,14 @@ static int icp_multi_reset(comedi_device *dev)
device.
Parameters:
- comedi_device *dev Pointer to current device structure
+ struct comedi_device *dev Pointer to current device structure
comedi_devconfig *it Pointer to current device configuration
Returns:int 0 = success
==============================================================================
*/
-static int icp_multi_attach(comedi_device *dev, comedi_devconfig *it)
+static int icp_multi_attach(struct comedi_device *dev, comedi_devconfig *it)
{
comedi_subdevice *s;
int ret, subdev, n_subdevices;
@@ -1058,13 +1058,13 @@ static int icp_multi_attach(comedi_device *dev, comedi_devconfig *it)
device.
Parameters:
- comedi_device *dev Pointer to current device structure
+ struct comedi_device *dev Pointer to current device structure
Returns:int 0 = success
==============================================================================
*/
-static int icp_multi_detach(comedi_device *dev)
+static int icp_multi_detach(struct comedi_device *dev)
{
if (dev->private)
diff --git a/drivers/staging/comedi/drivers/ii_pci20kc.c b/drivers/staging/comedi/drivers/ii_pci20kc.c
index eb3dde50d75c..3e7ca4e6b8af 100644
--- a/drivers/staging/comedi/drivers/ii_pci20kc.c
+++ b/drivers/staging/comedi/drivers/ii_pci20kc.c
@@ -156,8 +156,8 @@ typedef struct {
#define devpriv ((pci20xxx_private *)dev->private)
#define CHAN (CR_CHAN(it->chanlist[0]))
-static int pci20xxx_attach(comedi_device * dev, comedi_devconfig * it);
-static int pci20xxx_detach(comedi_device * dev);
+static int pci20xxx_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int pci20xxx_detach(struct comedi_device * dev);
static comedi_driver driver_pci20xxx = {
driver_name:"ii_pci20kc",
@@ -166,11 +166,11 @@ static comedi_driver driver_pci20xxx = {
detach:pci20xxx_detach,
};
-static int pci20006_init(comedi_device * dev, comedi_subdevice * s,
+static int pci20006_init(struct comedi_device * dev, comedi_subdevice * s,
int opt0, int opt1);
-static int pci20341_init(comedi_device * dev, comedi_subdevice * s,
+static int pci20341_init(struct comedi_device * dev, comedi_subdevice * s,
int opt0, int opt1);
-static int pci20xxx_dio_init(comedi_device * dev, comedi_subdevice * s);
+static int pci20xxx_dio_init(struct comedi_device * dev, comedi_subdevice * s);
/*
options[0] Board base address
@@ -199,7 +199,7 @@ static int pci20xxx_dio_init(comedi_device * dev, comedi_subdevice * s);
1 == unipolar 10V (0V -- +10V)
2 == bipolar 5V (-5V -- +5V)
*/
-static int pci20xxx_attach(comedi_device * dev, comedi_devconfig * it)
+static int pci20xxx_attach(struct comedi_device * dev, comedi_devconfig * it)
{
unsigned char i;
int ret;
@@ -261,7 +261,7 @@ static int pci20xxx_attach(comedi_device * dev, comedi_devconfig * it)
return 1;
}
-static int pci20xxx_detach(comedi_device * dev)
+static int pci20xxx_detach(struct comedi_device * dev)
{
printk("comedi%d: pci20xxx: remove\n", dev->minor);
@@ -270,9 +270,9 @@ static int pci20xxx_detach(comedi_device * dev)
/* pci20006m */
-static int pci20006_insn_read(comedi_device * dev, comedi_subdevice * s,
+static int pci20006_insn_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int pci20006_insn_write(comedi_device * dev, comedi_subdevice * s,
+static int pci20006_insn_write(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
static const comedi_lrange *pci20006_range_list[] = {
@@ -281,7 +281,7 @@ static const comedi_lrange *pci20006_range_list[] = {
&range_bipolar5,
};
-static int pci20006_init(comedi_device * dev, comedi_subdevice * s,
+static int pci20006_init(struct comedi_device * dev, comedi_subdevice * s,
int opt0, int opt1)
{
pci20xxx_subdev_private *sdp = s->private;
@@ -306,7 +306,7 @@ static int pci20006_init(comedi_device * dev, comedi_subdevice * s,
return 0;
}
-static int pci20006_insn_read(comedi_device * dev, comedi_subdevice * s,
+static int pci20006_insn_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
pci20xxx_subdev_private *sdp = s->private;
@@ -316,7 +316,7 @@ static int pci20006_insn_read(comedi_device * dev, comedi_subdevice * s,
return 1;
}
-static int pci20006_insn_write(comedi_device * dev, comedi_subdevice * s,
+static int pci20006_insn_write(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
pci20xxx_subdev_private *sdp = s->private;
@@ -349,7 +349,7 @@ static int pci20006_insn_write(comedi_device * dev, comedi_subdevice * s,
/* PCI20341M */
-static int pci20341_insn_read(comedi_device * dev, comedi_subdevice * s,
+static int pci20341_insn_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
static const int pci20341_timebase[] = { 0x00, 0x00, 0x00, 0x04 };
@@ -366,7 +366,7 @@ static const comedi_lrange *const pci20341_ranges[] = {
&range_bipolar0_025,
};
-static int pci20341_init(comedi_device * dev, comedi_subdevice * s,
+static int pci20341_init(struct comedi_device * dev, comedi_subdevice * s,
int opt0, int opt1)
{
pci20xxx_subdev_private *sdp = s->private;
@@ -397,7 +397,7 @@ static int pci20341_init(comedi_device * dev, comedi_subdevice * s,
return 0;
}
-static int pci20341_insn_read(comedi_device * dev, comedi_subdevice * s,
+static int pci20341_insn_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
pci20xxx_subdev_private *sdp = s->private;
@@ -443,14 +443,14 @@ static int pci20341_insn_read(comedi_device * dev, comedi_subdevice * s,
/* native DIO */
-static void pci20xxx_dio_config(comedi_device * dev, comedi_subdevice * s);
-static int pci20xxx_dio_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static void pci20xxx_dio_config(struct comedi_device * dev, comedi_subdevice * s);
+static int pci20xxx_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int pci20xxx_dio_insn_config(comedi_device * dev, comedi_subdevice * s,
+static int pci20xxx_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
/* initialize pci20xxx_private */
-static int pci20xxx_dio_init(comedi_device * dev, comedi_subdevice * s)
+static int pci20xxx_dio_init(struct comedi_device * dev, comedi_subdevice * s)
{
s->type = COMEDI_SUBD_DIO;
@@ -469,7 +469,7 @@ static int pci20xxx_dio_init(comedi_device * dev, comedi_subdevice * s)
return 0;
}
-static int pci20xxx_dio_insn_config(comedi_device * dev, comedi_subdevice * s,
+static int pci20xxx_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int mask, bits;
@@ -494,7 +494,7 @@ static int pci20xxx_dio_insn_config(comedi_device * dev, comedi_subdevice * s,
return 1;
}
-static int pci20xxx_dio_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int pci20xxx_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int mask = data[0];
@@ -524,7 +524,7 @@ static int pci20xxx_dio_insn_bits(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static void pci20xxx_dio_config(comedi_device * dev, comedi_subdevice * s)
+static void pci20xxx_dio_config(struct comedi_device * dev, comedi_subdevice * s)
{
unsigned char control_01;
unsigned char control_23;
@@ -580,7 +580,7 @@ static void pci20xxx_dio_config(comedi_device * dev, comedi_subdevice * s)
}
#if 0
-static void pci20xxx_do(comedi_device * dev, comedi_subdevice * s)
+static void pci20xxx_do(struct comedi_device * dev, comedi_subdevice * s)
{
/* XXX if the channel is configured for input, does this
do bad things? */
@@ -593,7 +593,7 @@ static void pci20xxx_do(comedi_device * dev, comedi_subdevice * s)
writeb((s->state >> 24) & 0xff, devpriv->ioaddr + PCI20000_DIO_3);
}
-static unsigned int pci20xxx_di(comedi_device * dev, comedi_subdevice * s)
+static unsigned int pci20xxx_di(struct comedi_device * dev, comedi_subdevice * s)
{
/* XXX same note as above */
unsigned int bits;
diff --git a/drivers/staging/comedi/drivers/jr3_pci.c b/drivers/staging/comedi/drivers/jr3_pci.c
index ae3e2a125abf..0a077486315c 100644
--- a/drivers/staging/comedi/drivers/jr3_pci.c
+++ b/drivers/staging/comedi/drivers/jr3_pci.c
@@ -60,10 +60,10 @@ static struct device comedi_fw_device = {
.release = comedi_fw_release
};
-typedef int comedi_firmware_callback(comedi_device * dev,
+typedef int comedi_firmware_callback(struct comedi_device * dev,
const u8 * data, size_t size);
-static int comedi_load_firmware(comedi_device * dev,
+static int comedi_load_firmware(struct comedi_device * dev,
char *name, comedi_firmware_callback cb)
{
int result = 0;
@@ -103,8 +103,8 @@ static int comedi_load_firmware(comedi_device * dev,
#define PCI_DEVICE_ID_JR3_3_CHANNEL 0x3113
#define PCI_DEVICE_ID_JR3_4_CHANNEL 0x3114
-static int jr3_pci_attach(comedi_device * dev, comedi_devconfig * it);
-static int jr3_pci_detach(comedi_device * dev);
+static int jr3_pci_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int jr3_pci_detach(struct comedi_device * dev);
static comedi_driver driver_jr3_pci = {
driver_name:"jr3_pci",
@@ -269,7 +269,7 @@ static six_axis_t get_max_full_scales(volatile jr3_channel_t * channel)
return result;
}
-static int jr3_pci_ai_insn_read(comedi_device * dev, comedi_subdevice * s,
+static int jr3_pci_ai_insn_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int result;
@@ -385,7 +385,7 @@ static int jr3_pci_ai_insn_read(comedi_device * dev, comedi_subdevice * s,
return result;
}
-static void jr3_pci_open(comedi_device * dev)
+static void jr3_pci_open(struct comedi_device * dev)
{
int i;
jr3_pci_dev_private *devpriv = dev->private;
@@ -424,7 +424,7 @@ int read_idm_word(const u8 * data, size_t size, int *pos, unsigned int *val)
return result;
}
-static int jr3_download_firmware(comedi_device * dev, const u8 * data,
+static int jr3_download_firmware(struct comedi_device * dev, const u8 * data,
size_t size)
{
/*
@@ -737,7 +737,7 @@ static poll_delay_t jr3_pci_poll_subdevice(comedi_subdevice * s)
static void jr3_pci_poll_dev(unsigned long data)
{
unsigned long flags;
- comedi_device *dev = (comedi_device *) data;
+ struct comedi_device *dev = (struct comedi_device *) data;
jr3_pci_dev_private *devpriv = dev->private;
unsigned long now;
int delay;
@@ -770,7 +770,7 @@ static void jr3_pci_poll_dev(unsigned long data)
add_timer(&devpriv->timer);
}
-static int jr3_pci_attach(comedi_device * dev, comedi_devconfig * it)
+static int jr3_pci_attach(struct comedi_device * dev, comedi_devconfig * it)
{
int result = 0;
struct pci_dev *card = NULL;
@@ -940,7 +940,7 @@ static int jr3_pci_attach(comedi_device * dev, comedi_devconfig * it)
return result;
}
-static int jr3_pci_detach(comedi_device * dev)
+static int jr3_pci_detach(struct comedi_device * dev)
{
int i;
jr3_pci_dev_private *devpriv = dev->private;
diff --git a/drivers/staging/comedi/drivers/ke_counter.c b/drivers/staging/comedi/drivers/ke_counter.c
index 834625c546db..d9b8a83343d9 100644
--- a/drivers/staging/comedi/drivers/ke_counter.c
+++ b/drivers/staging/comedi/drivers/ke_counter.c
@@ -48,8 +48,8 @@ Kolter Electronic PCI Counter Card.
/*-- function prototypes ----------------------------------------------------*/
-static int cnt_attach(comedi_device * dev, comedi_devconfig * it);
-static int cnt_detach(comedi_device * dev);
+static int cnt_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int cnt_detach(struct comedi_device * dev);
static DEFINE_PCI_DEVICE_TABLE(cnt_pci_table) = {
{PCI_VENDOR_ID_KOLTER, CNT_CARD_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
@@ -99,7 +99,7 @@ COMEDI_PCI_INITCLEANUP(cnt_driver, cnt_pci_table);
/* This should be used only for resetting the counters; maybe it is better
to make a special command 'reset'. */
-static int cnt_winsn(comedi_device * dev,
+static int cnt_winsn(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
int chan = CR_CHAN(insn->chanspec);
@@ -119,7 +119,7 @@ static int cnt_winsn(comedi_device * dev,
/*-- counter read -----------------------------------------------------------*/
-static int cnt_rinsn(comedi_device * dev,
+static int cnt_rinsn(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
unsigned char a0, a1, a2, a3, a4;
@@ -144,7 +144,7 @@ static int cnt_rinsn(comedi_device * dev,
/*-- attach -----------------------------------------------------------------*/
-static int cnt_attach(comedi_device * dev, comedi_devconfig * it)
+static int cnt_attach(struct comedi_device * dev, comedi_devconfig * it)
{
comedi_subdevice *subdevice;
struct pci_dev *pci_device;
@@ -237,7 +237,7 @@ static int cnt_attach(comedi_device * dev, comedi_devconfig * it)
/*-- detach -----------------------------------------------------------------*/
-static int cnt_detach(comedi_device * dev)
+static int cnt_detach(struct comedi_device * dev)
{
if (devpriv && devpriv->pcidev) {
if (dev->iobase) {
diff --git a/drivers/staging/comedi/drivers/me4000.c b/drivers/staging/comedi/drivers/me4000.c
index 7aad3e53624a..a03661ce34b5 100644
--- a/drivers/staging/comedi/drivers/me4000.c
+++ b/drivers/staging/comedi/drivers/me4000.c
@@ -118,8 +118,8 @@ static const me4000_board_t me4000_boards[] = {
/*-----------------------------------------------------------------------------
Comedi function prototypes
---------------------------------------------------------------------------*/
-static int me4000_attach(comedi_device *dev, comedi_devconfig *it);
-static int me4000_detach(comedi_device *dev);
+static int me4000_attach(struct comedi_device *dev, comedi_devconfig *it);
+static int me4000_detach(struct comedi_device *dev);
static comedi_driver driver_me4000 = {
driver_name:"me4000",
module : THIS_MODULE,
@@ -130,91 +130,91 @@ static comedi_driver driver_me4000 = {
/*-----------------------------------------------------------------------------
Meilhaus function prototypes
---------------------------------------------------------------------------*/
-static int me4000_probe(comedi_device *dev, comedi_devconfig *it);
-static int get_registers(comedi_device *dev, struct pci_dev *pci_dev_p);
-static int init_board_info(comedi_device *dev, struct pci_dev *pci_dev_p);
-static int init_ao_context(comedi_device *dev);
-static int init_ai_context(comedi_device *dev);
-static int init_dio_context(comedi_device *dev);
-static int init_cnt_context(comedi_device *dev);
-static int xilinx_download(comedi_device *dev);
-static int reset_board(comedi_device *dev);
-
-static int me4000_dio_insn_bits(comedi_device *dev,
+static int me4000_probe(struct comedi_device *dev, comedi_devconfig *it);
+static int get_registers(struct comedi_device *dev, struct pci_dev *pci_dev_p);
+static int init_board_info(struct comedi_device *dev, struct pci_dev *pci_dev_p);
+static int init_ao_context(struct comedi_device *dev);
+static int init_ai_context(struct comedi_device *dev);
+static int init_dio_context(struct comedi_device *dev);
+static int init_cnt_context(struct comedi_device *dev);
+static int xilinx_download(struct comedi_device *dev);
+static int reset_board(struct comedi_device *dev);
+
+static int me4000_dio_insn_bits(struct comedi_device *dev,
comedi_subdevice *s, comedi_insn *insn, unsigned int *data);
-static int me4000_dio_insn_config(comedi_device *dev,
+static int me4000_dio_insn_config(struct comedi_device *dev,
comedi_subdevice *s, comedi_insn *insn, unsigned int *data);
-static int cnt_reset(comedi_device *dev, unsigned int channel);
+static int cnt_reset(struct comedi_device *dev, unsigned int channel);
-static int cnt_config(comedi_device *dev,
+static int cnt_config(struct comedi_device *dev,
unsigned int channel, unsigned int mode);
-static int me4000_cnt_insn_config(comedi_device *dev,
+static int me4000_cnt_insn_config(struct comedi_device *dev,
comedi_subdevice *s, comedi_insn *insn, unsigned int *data);
-static int me4000_cnt_insn_write(comedi_device *dev,
+static int me4000_cnt_insn_write(struct comedi_device *dev,
comedi_subdevice *s, comedi_insn *insn, unsigned int *data);
-static int me4000_cnt_insn_read(comedi_device *dev,
+static int me4000_cnt_insn_read(struct comedi_device *dev,
comedi_subdevice *s, comedi_insn *insn, unsigned int *data);
-static int me4000_ai_insn_read(comedi_device *dev,
+static int me4000_ai_insn_read(struct comedi_device *dev,
comedi_subdevice *subdevice, comedi_insn *insn, unsigned int *data);
-static int me4000_ai_cancel(comedi_device *dev, comedi_subdevice *s);
+static int me4000_ai_cancel(struct comedi_device *dev, comedi_subdevice *s);
-static int ai_check_chanlist(comedi_device *dev,
+static int ai_check_chanlist(struct comedi_device *dev,
comedi_subdevice *s, comedi_cmd *cmd);
-static int ai_round_cmd_args(comedi_device *dev,
+static int ai_round_cmd_args(struct comedi_device *dev,
comedi_subdevice *s,
comedi_cmd *cmd,
unsigned int *init_ticks,
unsigned int *scan_ticks, unsigned int *chan_ticks);
-static int ai_prepare(comedi_device *dev,
+static int ai_prepare(struct comedi_device *dev,
comedi_subdevice *s,
comedi_cmd *cmd,
unsigned int init_ticks,
unsigned int scan_ticks, unsigned int chan_ticks);
-static int ai_write_chanlist(comedi_device *dev,
+static int ai_write_chanlist(struct comedi_device *dev,
comedi_subdevice *s, comedi_cmd *cmd);
static irqreturn_t me4000_ai_isr(int irq, void *dev_id PT_REGS_ARG);
-static int me4000_ai_do_cmd_test(comedi_device *dev,
+static int me4000_ai_do_cmd_test(struct comedi_device *dev,
comedi_subdevice *s, comedi_cmd *cmd);
-static int me4000_ai_do_cmd(comedi_device *dev, comedi_subdevice *s);
+static int me4000_ai_do_cmd(struct comedi_device *dev, comedi_subdevice *s);
-static int me4000_ao_insn_write(comedi_device *dev,
+static int me4000_ao_insn_write(struct comedi_device *dev,
comedi_subdevice *s, comedi_insn *insn, unsigned int *data);
-static int me4000_ao_insn_read(comedi_device *dev,
+static int me4000_ao_insn_read(struct comedi_device *dev,
comedi_subdevice *s, comedi_insn *insn, unsigned int *data);
/*-----------------------------------------------------------------------------
Meilhaus inline functions
---------------------------------------------------------------------------*/
-static inline void me4000_outb(comedi_device *dev, unsigned char value,
+static inline void me4000_outb(struct comedi_device *dev, unsigned char value,
unsigned long port)
{
PORT_PDEBUG("--> 0x%02X port 0x%04lX\n", value, port);
outb(value, port);
}
-static inline void me4000_outl(comedi_device *dev, unsigned long value,
+static inline void me4000_outl(struct comedi_device *dev, unsigned long value,
unsigned long port)
{
PORT_PDEBUG("--> 0x%08lX port 0x%04lX\n", value, port);
outl(value, port);
}
-static inline unsigned long me4000_inl(comedi_device *dev, unsigned long port)
+static inline unsigned long me4000_inl(struct comedi_device *dev, unsigned long port)
{
unsigned long value;
value = inl(port);
@@ -222,7 +222,7 @@ static inline unsigned long me4000_inl(comedi_device *dev, unsigned long port)
return value;
}
-static inline unsigned char me4000_inb(comedi_device *dev, unsigned long port)
+static inline unsigned char me4000_inb(struct comedi_device *dev, unsigned long port)
{
unsigned char value;
value = inb(port);
@@ -247,7 +247,7 @@ static const comedi_lrange me4000_ao_range = {
}
};
-static int me4000_attach(comedi_device *dev, comedi_devconfig *it)
+static int me4000_attach(struct comedi_device *dev, comedi_devconfig *it)
{
comedi_subdevice *s;
int result;
@@ -369,7 +369,7 @@ static int me4000_attach(comedi_device *dev, comedi_devconfig *it)
return 0;
}
-static int me4000_probe(comedi_device *dev, comedi_devconfig *it)
+static int me4000_probe(struct comedi_device *dev, comedi_devconfig *it)
{
struct pci_dev *pci_device;
int result, i;
@@ -512,7 +512,7 @@ static int me4000_probe(comedi_device *dev, comedi_devconfig *it)
return 0;
}
-static int get_registers(comedi_device *dev, struct pci_dev *pci_dev_p)
+static int get_registers(struct comedi_device *dev, struct pci_dev *pci_dev_p)
{
CALL_PDEBUG("In get_registers()\n");
@@ -564,7 +564,7 @@ static int get_registers(comedi_device *dev, struct pci_dev *pci_dev_p)
return 0;
}
-static int init_board_info(comedi_device *dev, struct pci_dev *pci_dev_p)
+static int init_board_info(struct comedi_device *dev, struct pci_dev *pci_dev_p)
{
int result;
@@ -596,7 +596,7 @@ static int init_board_info(comedi_device *dev, struct pci_dev *pci_dev_p)
return 0;
}
-static int init_ao_context(comedi_device *dev)
+static int init_ao_context(struct comedi_device *dev)
{
int i;
@@ -679,7 +679,7 @@ static int init_ao_context(comedi_device *dev)
return 0;
}
-static int init_ai_context(comedi_device *dev)
+static int init_ai_context(struct comedi_device *dev)
{
CALL_PDEBUG("In init_ai_context()\n");
@@ -713,7 +713,7 @@ static int init_ai_context(comedi_device *dev)
return 0;
}
-static int init_dio_context(comedi_device *dev)
+static int init_dio_context(struct comedi_device *dev)
{
CALL_PDEBUG("In init_dio_context()\n");
@@ -732,7 +732,7 @@ static int init_dio_context(comedi_device *dev)
return 0;
}
-static int init_cnt_context(comedi_device *dev)
+static int init_cnt_context(struct comedi_device *dev)
{
CALL_PDEBUG("In init_cnt_context()\n");
@@ -753,7 +753,7 @@ static int init_cnt_context(comedi_device *dev)
extern unsigned char *xilinx_firm;
#endif
-static int xilinx_download(comedi_device *dev)
+static int xilinx_download(struct comedi_device *dev)
{
u32 value = 0;
wait_queue_head_t queue;
@@ -835,7 +835,7 @@ static int xilinx_download(comedi_device *dev)
return 0;
}
-static int reset_board(comedi_device *dev)
+static int reset_board(struct comedi_device *dev)
{
unsigned long icr;
@@ -893,7 +893,7 @@ static int reset_board(comedi_device *dev)
return 0;
}
-static int me4000_detach(comedi_device *dev)
+static int me4000_detach(struct comedi_device *dev)
{
CALL_PDEBUG("In me4000_detach()\n");
@@ -913,7 +913,7 @@ static int me4000_detach(comedi_device *dev)
Analog input section
===========================================================================*/
-static int me4000_ai_insn_read(comedi_device *dev,
+static int me4000_ai_insn_read(struct comedi_device *dev,
comedi_subdevice *subdevice, comedi_insn *insn, unsigned int *data)
{
@@ -1037,7 +1037,7 @@ static int me4000_ai_insn_read(comedi_device *dev,
return 1;
}
-static int me4000_ai_cancel(comedi_device *dev, comedi_subdevice *s)
+static int me4000_ai_cancel(struct comedi_device *dev, comedi_subdevice *s)
{
unsigned long tmp;
@@ -1054,7 +1054,7 @@ static int me4000_ai_cancel(comedi_device *dev, comedi_subdevice *s)
return 0;
}
-static int ai_check_chanlist(comedi_device *dev,
+static int ai_check_chanlist(struct comedi_device *dev,
comedi_subdevice *s, comedi_cmd *cmd)
{
int aref;
@@ -1135,7 +1135,7 @@ static int ai_check_chanlist(comedi_device *dev,
return 0;
}
-static int ai_round_cmd_args(comedi_device *dev,
+static int ai_round_cmd_args(struct comedi_device *dev,
comedi_subdevice *s,
comedi_cmd *cmd,
unsigned int *init_ticks,
@@ -1201,7 +1201,7 @@ static int ai_round_cmd_args(comedi_device *dev,
return 0;
}
-static void ai_write_timer(comedi_device *dev,
+static void ai_write_timer(struct comedi_device *dev,
unsigned int init_ticks,
unsigned int scan_ticks, unsigned int chan_ticks)
{
@@ -1222,7 +1222,7 @@ static void ai_write_timer(comedi_device *dev,
me4000_outl(dev, chan_ticks - 1, info->ai_context.chan_timer_reg);
}
-static int ai_prepare(comedi_device *dev,
+static int ai_prepare(struct comedi_device *dev,
comedi_subdevice *s,
comedi_cmd *cmd,
unsigned int init_ticks,
@@ -1291,7 +1291,7 @@ static int ai_prepare(comedi_device *dev,
return 0;
}
-static int ai_write_chanlist(comedi_device *dev,
+static int ai_write_chanlist(struct comedi_device *dev,
comedi_subdevice *s, comedi_cmd *cmd)
{
unsigned int entry;
@@ -1331,7 +1331,7 @@ static int ai_write_chanlist(comedi_device *dev,
return 0;
}
-static int me4000_ai_do_cmd(comedi_device *dev, comedi_subdevice *s)
+static int me4000_ai_do_cmd(struct comedi_device *dev, comedi_subdevice *s)
{
int err;
unsigned int init_ticks = 0;
@@ -1375,7 +1375,7 @@ static int me4000_ai_do_cmd(comedi_device *dev, comedi_subdevice *s)
* - invalid chanlist
* So I tried to adopt this scheme.
*/
-static int me4000_ai_do_cmd_test(comedi_device *dev,
+static int me4000_ai_do_cmd_test(struct comedi_device *dev,
comedi_subdevice *s, comedi_cmd *cmd)
{
@@ -1743,7 +1743,7 @@ static int me4000_ai_do_cmd_test(comedi_device *dev,
static irqreturn_t me4000_ai_isr(int irq, void *dev_id PT_REGS_ARG)
{
unsigned int tmp;
- comedi_device *dev = dev_id;
+ struct comedi_device *dev = dev_id;
comedi_subdevice *s = dev->subdevices;
me4000_ai_context_t *ai_context = &info->ai_context;
int i;
@@ -1903,7 +1903,7 @@ static irqreturn_t me4000_ai_isr(int irq, void *dev_id PT_REGS_ARG)
Analog output section
===========================================================================*/
-static int me4000_ao_insn_write(comedi_device *dev,
+static int me4000_ao_insn_write(struct comedi_device *dev,
comedi_subdevice *s, comedi_insn *insn, unsigned int *data)
{
@@ -1961,7 +1961,7 @@ static int me4000_ao_insn_write(comedi_device *dev,
return 1;
}
-static int me4000_ao_insn_read(comedi_device *dev,
+static int me4000_ao_insn_read(struct comedi_device *dev,
comedi_subdevice *s, comedi_insn *insn, unsigned int *data)
{
int chan = CR_CHAN(insn->chanspec);
@@ -1982,7 +1982,7 @@ static int me4000_ao_insn_read(comedi_device *dev,
Digital I/O section
===========================================================================*/
-static int me4000_dio_insn_bits(comedi_device *dev,
+static int me4000_dio_insn_bits(struct comedi_device *dev,
comedi_subdevice *s, comedi_insn *insn, unsigned int *data)
{
@@ -2033,7 +2033,7 @@ static int me4000_dio_insn_bits(comedi_device *dev,
return 2;
}
-static int me4000_dio_insn_config(comedi_device *dev,
+static int me4000_dio_insn_config(struct comedi_device *dev,
comedi_subdevice *s, comedi_insn *insn, unsigned int *data)
{
unsigned long tmp;
@@ -2127,7 +2127,7 @@ static int me4000_dio_insn_config(comedi_device *dev,
Counter section
===========================================================================*/
-static int cnt_reset(comedi_device *dev, unsigned int channel)
+static int cnt_reset(struct comedi_device *dev, unsigned int channel)
{
CALL_PDEBUG("In cnt_reset()\n");
@@ -2158,7 +2158,7 @@ static int cnt_reset(comedi_device *dev, unsigned int channel)
return 0;
}
-static int cnt_config(comedi_device *dev, unsigned int channel,
+static int cnt_config(struct comedi_device *dev, unsigned int channel,
unsigned int mode)
{
int tmp = 0;
@@ -2215,7 +2215,7 @@ static int cnt_config(comedi_device *dev, unsigned int channel,
return 0;
}
-static int me4000_cnt_insn_config(comedi_device *dev,
+static int me4000_cnt_insn_config(struct comedi_device *dev,
comedi_subdevice *s, comedi_insn *insn, unsigned int *data)
{
@@ -2258,7 +2258,7 @@ static int me4000_cnt_insn_config(comedi_device *dev,
return 2;
}
-static int me4000_cnt_insn_read(comedi_device *dev,
+static int me4000_cnt_insn_read(struct comedi_device *dev,
comedi_subdevice *s, comedi_insn *insn, unsigned int *data)
{
@@ -2305,7 +2305,7 @@ static int me4000_cnt_insn_read(comedi_device *dev,
return 1;
}
-static int me4000_cnt_insn_write(comedi_device *dev,
+static int me4000_cnt_insn_write(struct comedi_device *dev,
comedi_subdevice *s, comedi_insn *insn, unsigned int *data)
{
diff --git a/drivers/staging/comedi/drivers/me_daq.c b/drivers/staging/comedi/drivers/me_daq.c
index 877920e35e1b..5e48eaaf5f28 100644
--- a/drivers/staging/comedi/drivers/me_daq.c
+++ b/drivers/staging/comedi/drivers/me_daq.c
@@ -144,8 +144,8 @@ from http://www.comedi.org
#define ME_COUNTER_VALUE_B 0x0022 /* R | - */
/* Function prototypes */
-static int me_attach(comedi_device *dev, comedi_devconfig *it);
-static int me_detach(comedi_device *dev);
+static int me_attach(struct comedi_device *dev, comedi_devconfig *it);
+static int me_detach(struct comedi_device *dev);
static const comedi_lrange me2000_ai_range = {
8,
@@ -290,7 +290,7 @@ static inline void sleep(unsigned sec)
*
* ------------------------------------------------------------------
*/
-static int me_dio_insn_config(comedi_device *dev, comedi_subdevice *s,
+static int me_dio_insn_config(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
int bits;
@@ -326,7 +326,7 @@ static int me_dio_insn_config(comedi_device *dev, comedi_subdevice *s,
}
/* Digital instant input/outputs */
-static int me_dio_insn_bits(comedi_device *dev, comedi_subdevice *s,
+static int me_dio_insn_bits(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
unsigned int mask = data[0];
@@ -362,7 +362,7 @@ static int me_dio_insn_bits(comedi_device *dev, comedi_subdevice *s,
*/
/* Analog instant input */
-static int me_ai_insn_read(comedi_device *dev, comedi_subdevice *subdevice,
+static int me_ai_insn_read(struct comedi_device *dev, comedi_subdevice *subdevice,
comedi_insn *insn, unsigned int *data)
{
unsigned short value;
@@ -436,7 +436,7 @@ static int me_ai_insn_read(comedi_device *dev, comedi_subdevice *subdevice,
*/
/* Cancel analog input autoscan */
-static int me_ai_cancel(comedi_device *dev, comedi_subdevice *s)
+static int me_ai_cancel(struct comedi_device *dev, comedi_subdevice *s)
{
/* disable interrupts */
@@ -448,14 +448,14 @@ static int me_ai_cancel(comedi_device *dev, comedi_subdevice *s)
}
/* Test analog input command */
-static int me_ai_do_cmd_test(comedi_device *dev, comedi_subdevice *s,
+static int me_ai_do_cmd_test(struct comedi_device *dev, comedi_subdevice *s,
comedi_cmd *cmd)
{
return 0;
}
/* Analog input command */
-static int me_ai_do_cmd(comedi_device *dev, comedi_subdevice *subdevice)
+static int me_ai_do_cmd(struct comedi_device *dev, comedi_subdevice *subdevice)
{
return 0;
}
@@ -469,7 +469,7 @@ static int me_ai_do_cmd(comedi_device *dev, comedi_subdevice *subdevice)
*/
/* Analog instant output */
-static int me_ao_insn_write(comedi_device *dev, comedi_subdevice *s,
+static int me_ao_insn_write(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
int chan;
@@ -519,7 +519,7 @@ static int me_ao_insn_write(comedi_device *dev, comedi_subdevice *s,
}
/* Analog output readback */
-static int me_ao_insn_read(comedi_device *dev, comedi_subdevice *s,
+static int me_ao_insn_read(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
int i;
@@ -541,7 +541,7 @@ static int me_ao_insn_read(comedi_device *dev, comedi_subdevice *s,
*/
/* Xilinx firmware download for card: ME-2600i */
-static int me2600_xilinx_download(comedi_device *dev,
+static int me2600_xilinx_download(struct comedi_device *dev,
unsigned char *me2600_firmware,
unsigned int length)
{
@@ -609,7 +609,7 @@ static int me2600_xilinx_download(comedi_device *dev,
}
/* Reset device */
-static int me_reset(comedi_device *dev)
+static int me_reset(struct comedi_device *dev)
{
/* Reset board */
writew(0x00, dev_private->me_regbase + ME_CONTROL_1);
@@ -631,7 +631,7 @@ static int me_reset(comedi_device *dev)
* - Register PCI device
* - Declare device driver capability
*/
-static int me_attach(comedi_device *dev, comedi_devconfig *it)
+static int me_attach(struct comedi_device *dev, comedi_devconfig *it)
{
struct pci_dev *pci_device;
comedi_subdevice *subdevice;
@@ -825,7 +825,7 @@ found:
}
/* Detach */
-static int me_detach(comedi_device *dev)
+static int me_detach(struct comedi_device *dev)
{
if (dev_private) {
if (dev_private->me_regbase) {
diff --git a/drivers/staging/comedi/drivers/mpc624.c b/drivers/staging/comedi/drivers/mpc624.c
index a4be0721d69f..6bbcdde62ad3 100644
--- a/drivers/staging/comedi/drivers/mpc624.c
+++ b/drivers/staging/comedi/drivers/mpc624.c
@@ -144,8 +144,8 @@ static const comedi_lrange range_mpc624_bipolar10 = {
};
//----------------------------------------------------------------------------
-static int mpc624_attach(comedi_device * dev, comedi_devconfig * it);
-static int mpc624_detach(comedi_device * dev);
+static int mpc624_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int mpc624_detach(struct comedi_device * dev);
//----------------------------------------------------------------------------
static comedi_driver driver_mpc624 = {
driver_name:"mpc624",
@@ -155,10 +155,10 @@ static comedi_driver driver_mpc624 = {
};
//----------------------------------------------------------------------------
-static int mpc624_ai_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int mpc624_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
//----------------------------------------------------------------------------
-static int mpc624_attach(comedi_device * dev, comedi_devconfig * it)
+static int mpc624_attach(struct comedi_device * dev, comedi_devconfig * it)
{
comedi_subdevice *s;
unsigned long iobase;
@@ -255,7 +255,7 @@ static int mpc624_attach(comedi_device * dev, comedi_devconfig * it)
return 1;
}
-static int mpc624_detach(comedi_device * dev)
+static int mpc624_detach(struct comedi_device * dev)
{
rt_printk("comedi%d: mpc624: remove\n", dev->minor);
@@ -268,7 +268,7 @@ static int mpc624_detach(comedi_device * dev)
// Timeout 200ms
#define TIMEOUT 200
-static int mpc624_ai_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int mpc624_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n, i;
diff --git a/drivers/staging/comedi/drivers/mpc8260cpm.c b/drivers/staging/comedi/drivers/mpc8260cpm.c
index b3a64bbbf0c3..f1f14514ff27 100644
--- a/drivers/staging/comedi/drivers/mpc8260cpm.c
+++ b/drivers/staging/comedi/drivers/mpc8260cpm.c
@@ -44,8 +44,8 @@ typedef struct {
} mpc8260cpm_private;
#define devpriv ((mpc8260cpm_private *)dev->private)
-static int mpc8260cpm_attach(comedi_device * dev, comedi_devconfig * it);
-static int mpc8260cpm_detach(comedi_device * dev);
+static int mpc8260cpm_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int mpc8260cpm_detach(struct comedi_device * dev);
static comedi_driver driver_mpc8260cpm = {
driver_name:"mpc8260cpm",
module:THIS_MODULE,
@@ -55,12 +55,12 @@ static comedi_driver driver_mpc8260cpm = {
COMEDI_INITCLEANUP(driver_mpc8260cpm);
-static int mpc8260cpm_dio_config(comedi_device * dev, comedi_subdevice * s,
+static int mpc8260cpm_dio_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int mpc8260cpm_dio_bits(comedi_device * dev, comedi_subdevice * s,
+static int mpc8260cpm_dio_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int mpc8260cpm_attach(comedi_device * dev, comedi_devconfig * it)
+static int mpc8260cpm_attach(struct comedi_device * dev, comedi_devconfig * it)
{
comedi_subdevice *s;
int i;
@@ -91,7 +91,7 @@ static int mpc8260cpm_attach(comedi_device * dev, comedi_devconfig * it)
return 1;
}
-static int mpc8260cpm_detach(comedi_device * dev)
+static int mpc8260cpm_detach(struct comedi_device * dev)
{
printk("comedi%d: mpc8260cpm: remove\n", dev->minor);
@@ -112,7 +112,7 @@ static unsigned long *cpm_pdat(int port)
}
}
-static int mpc8260cpm_dio_config(comedi_device * dev, comedi_subdevice * s,
+static int mpc8260cpm_dio_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n;
@@ -155,7 +155,7 @@ static int mpc8260cpm_dio_config(comedi_device * dev, comedi_subdevice * s,
return 1;
}
-static int mpc8260cpm_dio_bits(comedi_device * dev, comedi_subdevice * s,
+static int mpc8260cpm_dio_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int port;
diff --git a/drivers/staging/comedi/drivers/multiq3.c b/drivers/staging/comedi/drivers/multiq3.c
index dd9648d68a88..477185b33d72 100644
--- a/drivers/staging/comedi/drivers/multiq3.c
+++ b/drivers/staging/comedi/drivers/multiq3.c
@@ -82,8 +82,8 @@ Devices: [Quanser Consulting] MultiQ-3 (multiq3)
#define MULTIQ3_TIMEOUT 30
-static int multiq3_attach(comedi_device * dev, comedi_devconfig * it);
-static int multiq3_detach(comedi_device * dev);
+static int multiq3_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int multiq3_detach(struct comedi_device * dev);
static comedi_driver driver_multiq3 = {
driver_name:"multiq3",
module:THIS_MODULE,
@@ -98,7 +98,7 @@ struct multiq3_private {
};
#define devpriv ((struct multiq3_private *)dev->private)
-static int multiq3_ai_insn_read(comedi_device * dev, comedi_subdevice * s,
+static int multiq3_ai_insn_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i, n;
@@ -134,7 +134,7 @@ static int multiq3_ai_insn_read(comedi_device * dev, comedi_subdevice * s,
return n;
}
-static int multiq3_ao_insn_read(comedi_device * dev, comedi_subdevice * s,
+static int multiq3_ao_insn_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
@@ -147,7 +147,7 @@ static int multiq3_ao_insn_read(comedi_device * dev, comedi_subdevice * s,
return i;
}
-static int multiq3_ao_insn_write(comedi_device * dev, comedi_subdevice * s,
+static int multiq3_ao_insn_write(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
@@ -165,7 +165,7 @@ static int multiq3_ao_insn_write(comedi_device * dev, comedi_subdevice * s,
return i;
}
-static int multiq3_di_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int multiq3_di_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
@@ -176,7 +176,7 @@ static int multiq3_di_insn_bits(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int multiq3_do_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int multiq3_do_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
@@ -191,7 +191,7 @@ static int multiq3_do_insn_bits(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int multiq3_encoder_insn_read(comedi_device * dev, comedi_subdevice * s,
+static int multiq3_encoder_insn_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n;
@@ -212,7 +212,7 @@ static int multiq3_encoder_insn_read(comedi_device * dev, comedi_subdevice * s,
return n;
}
-static void encoder_reset(comedi_device * dev)
+static void encoder_reset(struct comedi_device * dev)
{
int chan;
for (chan = 0; chan < dev->subdevices[4].n_chan; chan++) {
@@ -235,7 +235,7 @@ static void encoder_reset(comedi_device * dev)
options[2] - number of encoder chips installed
*/
-static int multiq3_attach(comedi_device * dev, comedi_devconfig * it)
+static int multiq3_attach(struct comedi_device * dev, comedi_devconfig * it)
{
int result = 0;
unsigned long iobase;
@@ -318,7 +318,7 @@ static int multiq3_attach(comedi_device * dev, comedi_devconfig * it)
return 0;
}
-static int multiq3_detach(comedi_device * dev)
+static int multiq3_detach(struct comedi_device * dev)
{
printk("comedi%d: multiq3: remove\n", dev->minor);
diff --git a/drivers/staging/comedi/drivers/ni_6527.c b/drivers/staging/comedi/drivers/ni_6527.c
index 17c33a591fd1..bb9af22fbc44 100644
--- a/drivers/staging/comedi/drivers/ni_6527.c
+++ b/drivers/staging/comedi/drivers/ni_6527.c
@@ -75,8 +75,8 @@ Updated: Sat, 25 Jan 2003 13:24:40 -0800
#define Rising_Edge_Detection_Enable(x) (0x018+(x))
#define Falling_Edge_Detection_Enable(x) (0x020+(x))
-static int ni6527_attach(comedi_device * dev, comedi_devconfig * it);
-static int ni6527_detach(comedi_device * dev);
+static int ni6527_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int ni6527_detach(struct comedi_device * dev);
static comedi_driver driver_ni6527 = {
driver_name:"ni6527",
module:THIS_MODULE,
@@ -117,9 +117,9 @@ typedef struct {
} ni6527_private;
#define devpriv ((ni6527_private *)dev->private)
-static int ni6527_find_device(comedi_device * dev, int bus, int slot);
+static int ni6527_find_device(struct comedi_device * dev, int bus, int slot);
-static int ni6527_di_insn_config(comedi_device * dev, comedi_subdevice * s,
+static int ni6527_di_insn_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int chan = CR_CHAN(insn->chanspec);
@@ -167,7 +167,7 @@ static int ni6527_di_insn_config(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int ni6527_di_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int ni6527_di_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
@@ -180,7 +180,7 @@ static int ni6527_di_insn_bits(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int ni6527_do_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int ni6527_do_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
@@ -211,7 +211,7 @@ static int ni6527_do_insn_bits(comedi_device * dev, comedi_subdevice * s,
static irqreturn_t ni6527_interrupt(int irq, void *d PT_REGS_ARG)
{
- comedi_device *dev = d;
+ struct comedi_device *dev = d;
comedi_subdevice *s = dev->subdevices + 2;
unsigned int status;
@@ -230,7 +230,7 @@ static irqreturn_t ni6527_interrupt(int irq, void *d PT_REGS_ARG)
return IRQ_HANDLED;
}
-static int ni6527_intr_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int ni6527_intr_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
@@ -306,7 +306,7 @@ static int ni6527_intr_cmdtest(comedi_device * dev, comedi_subdevice * s,
return 0;
}
-static int ni6527_intr_cmd(comedi_device * dev, comedi_subdevice * s)
+static int ni6527_intr_cmd(struct comedi_device * dev, comedi_subdevice * s)
{
//comedi_cmd *cmd = &s->async->cmd;
@@ -319,14 +319,14 @@ static int ni6527_intr_cmd(comedi_device * dev, comedi_subdevice * s)
return 0;
}
-static int ni6527_intr_cancel(comedi_device * dev, comedi_subdevice * s)
+static int ni6527_intr_cancel(struct comedi_device * dev, comedi_subdevice * s)
{
writeb(0x00, devpriv->mite->daq_io_addr + Master_Interrupt_Control);
return 0;
}
-static int ni6527_intr_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int ni6527_intr_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n < 1)
@@ -336,7 +336,7 @@ static int ni6527_intr_insn_bits(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int ni6527_intr_insn_config(comedi_device * dev, comedi_subdevice * s,
+static int ni6527_intr_insn_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n < 1)
@@ -361,7 +361,7 @@ static int ni6527_intr_insn_config(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int ni6527_attach(comedi_device * dev, comedi_devconfig * it)
+static int ni6527_attach(struct comedi_device * dev, comedi_devconfig * it)
{
comedi_subdevice *s;
int ret;
@@ -439,7 +439,7 @@ static int ni6527_attach(comedi_device * dev, comedi_devconfig * it)
return 0;
}
-static int ni6527_detach(comedi_device * dev)
+static int ni6527_detach(struct comedi_device * dev)
{
if (devpriv && devpriv->mite && devpriv->mite->daq_io_addr) {
writeb(0x00,
@@ -457,7 +457,7 @@ static int ni6527_detach(comedi_device * dev)
return 0;
}
-static int ni6527_find_device(comedi_device * dev, int bus, int slot)
+static int ni6527_find_device(struct comedi_device * dev, int bus, int slot)
{
struct mite_struct *mite;
int i;
diff --git a/drivers/staging/comedi/drivers/ni_65xx.c b/drivers/staging/comedi/drivers/ni_65xx.c
index cc5ada875359..347925b4963b 100644
--- a/drivers/staging/comedi/drivers/ni_65xx.c
+++ b/drivers/staging/comedi/drivers/ni_65xx.c
@@ -102,8 +102,8 @@ static inline unsigned Filter_Enable(unsigned port)
#define OverflowIntEnable 0x02
#define EdgeIntEnable 0x01
-static int ni_65xx_attach(comedi_device * dev, comedi_devconfig * it);
-static int ni_65xx_detach(comedi_device * dev);
+static int ni_65xx_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int ni_65xx_detach(struct comedi_device * dev);
static comedi_driver driver_ni_65xx = {
driver_name:"ni_65xx",
module:THIS_MODULE,
@@ -239,7 +239,7 @@ static const ni_65xx_board ni_65xx_boards[] = {
};
#define n_ni_65xx_boards (sizeof(ni_65xx_boards)/sizeof(ni_65xx_boards[0]))
-static inline const ni_65xx_board *board(comedi_device * dev)
+static inline const ni_65xx_board *board(struct comedi_device * dev)
{
return dev->board_ptr;
}
@@ -287,7 +287,7 @@ typedef struct {
unsigned short output_bits[NI_65XX_MAX_NUM_PORTS];
unsigned short dio_direction[NI_65XX_MAX_NUM_PORTS];
} ni_65xx_private;
-static inline ni_65xx_private *private(comedi_device * dev)
+static inline ni_65xx_private *private(struct comedi_device * dev)
{
return dev->private;
}
@@ -308,9 +308,9 @@ static ni_65xx_subdevice_private *ni_65xx_alloc_subdevice_private(void)
return subdev_private;
}
-static int ni_65xx_find_device(comedi_device * dev, int bus, int slot);
+static int ni_65xx_find_device(struct comedi_device * dev, int bus, int slot);
-static int ni_65xx_config_filter(comedi_device * dev, comedi_subdevice * s,
+static int ni_65xx_config_filter(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
const unsigned chan = CR_CHAN(insn->chanspec);
@@ -349,7 +349,7 @@ static int ni_65xx_config_filter(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int ni_65xx_dio_insn_config(comedi_device * dev, comedi_subdevice * s,
+static int ni_65xx_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned port;
@@ -388,7 +388,7 @@ static int ni_65xx_dio_insn_config(comedi_device * dev, comedi_subdevice * s,
return -EINVAL;
}
-static int ni_65xx_dio_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int ni_65xx_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned base_bitfield_channel;
@@ -452,7 +452,7 @@ static int ni_65xx_dio_insn_bits(comedi_device * dev, comedi_subdevice * s,
static irqreturn_t ni_65xx_interrupt(int irq, void *d PT_REGS_ARG)
{
- comedi_device *dev = d;
+ struct comedi_device *dev = d;
comedi_subdevice *s = dev->subdevices + 2;
unsigned int status;
@@ -471,7 +471,7 @@ static irqreturn_t ni_65xx_interrupt(int irq, void *d PT_REGS_ARG)
return IRQ_HANDLED;
}
-static int ni_65xx_intr_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int ni_65xx_intr_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
@@ -547,7 +547,7 @@ static int ni_65xx_intr_cmdtest(comedi_device * dev, comedi_subdevice * s,
return 0;
}
-static int ni_65xx_intr_cmd(comedi_device * dev, comedi_subdevice * s)
+static int ni_65xx_intr_cmd(struct comedi_device * dev, comedi_subdevice * s)
{
//comedi_cmd *cmd = &s->async->cmd;
@@ -560,7 +560,7 @@ static int ni_65xx_intr_cmd(comedi_device * dev, comedi_subdevice * s)
return 0;
}
-static int ni_65xx_intr_cancel(comedi_device * dev, comedi_subdevice * s)
+static int ni_65xx_intr_cancel(struct comedi_device * dev, comedi_subdevice * s)
{
writeb(0x00,
private(dev)->mite->daq_io_addr + Master_Interrupt_Control);
@@ -568,7 +568,7 @@ static int ni_65xx_intr_cancel(comedi_device * dev, comedi_subdevice * s)
return 0;
}
-static int ni_65xx_intr_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int ni_65xx_intr_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n < 1)
@@ -578,7 +578,7 @@ static int ni_65xx_intr_insn_bits(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int ni_65xx_intr_insn_config(comedi_device * dev, comedi_subdevice * s,
+static int ni_65xx_intr_insn_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n < 1)
@@ -615,7 +615,7 @@ static int ni_65xx_intr_insn_config(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int ni_65xx_attach(comedi_device * dev, comedi_devconfig * it)
+static int ni_65xx_attach(struct comedi_device * dev, comedi_devconfig * it)
{
comedi_subdevice *s;
unsigned i;
@@ -748,7 +748,7 @@ static int ni_65xx_attach(comedi_device * dev, comedi_devconfig * it)
return 0;
}
-static int ni_65xx_detach(comedi_device * dev)
+static int ni_65xx_detach(struct comedi_device * dev)
{
if (private(dev) && private(dev)->mite
&& private(dev)->mite->daq_io_addr) {
@@ -776,7 +776,7 @@ static int ni_65xx_detach(comedi_device * dev)
return 0;
}
-static int ni_65xx_find_device(comedi_device * dev, int bus, int slot)
+static int ni_65xx_find_device(struct comedi_device * dev, int bus, int slot)
{
struct mite_struct *mite;
int i;
diff --git a/drivers/staging/comedi/drivers/ni_660x.c b/drivers/staging/comedi/drivers/ni_660x.c
index 896e2ea4b04d..531709724b75 100644
--- a/drivers/staging/comedi/drivers/ni_660x.c
+++ b/drivers/staging/comedi/drivers/ni_660x.c
@@ -431,23 +431,23 @@ typedef struct {
unsigned short pfi_output_selects[NUM_PFI_CHANNELS];
} ni_660x_private;
-static inline ni_660x_private *private(comedi_device * dev)
+static inline ni_660x_private *private(struct comedi_device * dev)
{
return dev->private;
}
/* initialized in ni_660x_find_device() */
-static inline const ni_660x_board *board(comedi_device * dev)
+static inline const ni_660x_board *board(struct comedi_device * dev)
{
return dev->board_ptr;
}
#define n_ni_660x_boards (sizeof(ni_660x_boards)/sizeof(ni_660x_boards[0]))
-static int ni_660x_attach(comedi_device * dev, comedi_devconfig * it);
-static int ni_660x_detach(comedi_device * dev);
-static void init_tio_chip(comedi_device * dev, int chipset);
-static void ni_660x_select_pfi_output(comedi_device * dev, unsigned pfi_channel,
+static int ni_660x_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int ni_660x_detach(struct comedi_device * dev);
+static void init_tio_chip(struct comedi_device * dev, int chipset);
+static void ni_660x_select_pfi_output(struct comedi_device * dev, unsigned pfi_channel,
unsigned output_select);
static comedi_driver driver_ni_660x = {
@@ -459,25 +459,25 @@ static comedi_driver driver_ni_660x = {
COMEDI_PCI_INITCLEANUP(driver_ni_660x, ni_660x_pci_table);
-static int ni_660x_find_device(comedi_device * dev, int bus, int slot);
-static int ni_660x_set_pfi_routing(comedi_device * dev, unsigned chan,
+static int ni_660x_find_device(struct comedi_device * dev, int bus, int slot);
+static int ni_660x_set_pfi_routing(struct comedi_device * dev, unsigned chan,
unsigned source);
/* Possible instructions for a GPCT */
-static int ni_660x_GPCT_rinsn(comedi_device * dev,
+static int ni_660x_GPCT_rinsn(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
-static int ni_660x_GPCT_insn_config(comedi_device * dev,
+static int ni_660x_GPCT_insn_config(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
-static int ni_660x_GPCT_winsn(comedi_device * dev,
+static int ni_660x_GPCT_winsn(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
/* Possible instructions for Digital IO */
-static int ni_660x_dio_insn_config(comedi_device * dev,
+static int ni_660x_dio_insn_config(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
-static int ni_660x_dio_insn_bits(comedi_device * dev,
+static int ni_660x_dio_insn_bits(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
-static inline unsigned ni_660x_num_counters(comedi_device * dev)
+static inline unsigned ni_660x_num_counters(struct comedi_device * dev)
{
return board(dev)->n_chips * counters_per_chip;
}
@@ -700,7 +700,7 @@ static NI_660x_Register ni_gpct_to_660x_register(enum ni_gpct_register reg)
return ni_660x_register;
}
-static inline void ni_660x_write_register(comedi_device * dev,
+static inline void ni_660x_write_register(struct comedi_device * dev,
unsigned chip_index, unsigned bits, NI_660x_Register reg)
{
void *const write_address =
@@ -722,7 +722,7 @@ static inline void ni_660x_write_register(comedi_device * dev,
}
}
-static inline unsigned ni_660x_read_register(comedi_device * dev,
+static inline unsigned ni_660x_read_register(struct comedi_device * dev,
unsigned chip_index, NI_660x_Register reg)
{
void *const read_address =
@@ -748,7 +748,7 @@ static inline unsigned ni_660x_read_register(comedi_device * dev,
static void ni_gpct_write_register(struct ni_gpct *counter, unsigned bits,
enum ni_gpct_register reg)
{
- comedi_device *dev = counter->counter_dev->dev;
+ struct comedi_device *dev = counter->counter_dev->dev;
NI_660x_Register ni_660x_register = ni_gpct_to_660x_register(reg);
ni_660x_write_register(dev, counter->chip_index, bits,
ni_660x_register);
@@ -757,7 +757,7 @@ static void ni_gpct_write_register(struct ni_gpct *counter, unsigned bits,
static unsigned ni_gpct_read_register(struct ni_gpct *counter,
enum ni_gpct_register reg)
{
- comedi_device *dev = counter->counter_dev->dev;
+ struct comedi_device *dev = counter->counter_dev->dev;
NI_660x_Register ni_660x_register = ni_gpct_to_660x_register(reg);
return ni_660x_read_register(dev, counter->chip_index,
ni_660x_register);
@@ -769,7 +769,7 @@ static inline struct mite_dma_descriptor_ring *mite_ring(ni_660x_private * priv,
return priv->mite_rings[counter->chip_index][counter->counter_index];
}
-static inline void ni_660x_set_dma_channel(comedi_device * dev,
+static inline void ni_660x_set_dma_channel(struct comedi_device * dev,
unsigned mite_channel, struct ni_gpct *counter)
{
unsigned long flags;
@@ -787,7 +787,7 @@ static inline void ni_660x_set_dma_channel(comedi_device * dev,
comedi_spin_unlock_irqrestore(&private(dev)->soft_reg_copy_lock, flags);
}
-static inline void ni_660x_unset_dma_channel(comedi_device * dev,
+static inline void ni_660x_unset_dma_channel(struct comedi_device * dev,
unsigned mite_channel, struct ni_gpct *counter)
{
unsigned long flags;
@@ -803,7 +803,7 @@ static inline void ni_660x_unset_dma_channel(comedi_device * dev,
comedi_spin_unlock_irqrestore(&private(dev)->soft_reg_copy_lock, flags);
}
-static int ni_660x_request_mite_channel(comedi_device * dev,
+static int ni_660x_request_mite_channel(struct comedi_device * dev,
struct ni_gpct *counter, enum comedi_io_direction direction)
{
unsigned long flags;
@@ -828,7 +828,7 @@ static int ni_660x_request_mite_channel(comedi_device * dev,
return 0;
}
-void ni_660x_release_mite_channel(comedi_device * dev, struct ni_gpct *counter)
+void ni_660x_release_mite_channel(struct comedi_device * dev, struct ni_gpct *counter)
{
unsigned long flags;
@@ -843,7 +843,7 @@ void ni_660x_release_mite_channel(comedi_device * dev, struct ni_gpct *counter)
comedi_spin_unlock_irqrestore(&private(dev)->mite_channel_lock, flags);
}
-static int ni_660x_cmd(comedi_device * dev, comedi_subdevice * s)
+static int ni_660x_cmd(struct comedi_device * dev, comedi_subdevice * s)
{
int retval;
@@ -862,7 +862,7 @@ static int ni_660x_cmd(comedi_device * dev, comedi_subdevice * s)
return retval;
}
-static int ni_660x_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int ni_660x_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd)
{
struct ni_gpct *counter = subdev_to_counter(s);
@@ -870,7 +870,7 @@ static int ni_660x_cmdtest(comedi_device * dev, comedi_subdevice * s,
return ni_tio_cmdtest(counter, cmd);
}
-static int ni_660x_cancel(comedi_device * dev, comedi_subdevice * s)
+static int ni_660x_cancel(struct comedi_device * dev, comedi_subdevice * s)
{
struct ni_gpct *counter = subdev_to_counter(s);
int retval;
@@ -880,7 +880,7 @@ static int ni_660x_cancel(comedi_device * dev, comedi_subdevice * s)
return retval;
}
-static void set_tio_counterswap(comedi_device * dev, int chipset)
+static void set_tio_counterswap(struct comedi_device * dev, int chipset)
{
/* See P. 3.5 of the Register-Level Programming manual. The
CounterSwap bit has to be set on the second chip, otherwise
@@ -893,7 +893,7 @@ static void set_tio_counterswap(comedi_device * dev, int chipset)
ni_660x_write_register(dev, chipset, 0, ClockConfigRegister);
}
-static void ni_660x_handle_gpct_interrupt(comedi_device * dev,
+static void ni_660x_handle_gpct_interrupt(struct comedi_device * dev,
comedi_subdevice * s)
{
ni_tio_handle_interrupt(subdev_to_counter(s), s);
@@ -909,7 +909,7 @@ static void ni_660x_handle_gpct_interrupt(comedi_device * dev,
static irqreturn_t ni_660x_interrupt(int irq, void *d PT_REGS_ARG)
{
- comedi_device *dev = d;
+ struct comedi_device *dev = d;
comedi_subdevice *s;
unsigned i;
@@ -923,7 +923,7 @@ static irqreturn_t ni_660x_interrupt(int irq, void *d PT_REGS_ARG)
return IRQ_HANDLED;
}
-static int ni_660x_buf_change(comedi_device * dev, comedi_subdevice * s,
+static int ni_660x_buf_change(struct comedi_device * dev, comedi_subdevice * s,
unsigned long new_size)
{
int ret;
@@ -936,7 +936,7 @@ static int ni_660x_buf_change(comedi_device * dev, comedi_subdevice * s,
return 0;
}
-static int ni_660x_allocate_private(comedi_device * dev)
+static int ni_660x_allocate_private(struct comedi_device * dev)
{
int retval;
unsigned i;
@@ -951,7 +951,7 @@ static int ni_660x_allocate_private(comedi_device * dev)
return 0;
}
-static int ni_660x_alloc_mite_rings(comedi_device * dev)
+static int ni_660x_alloc_mite_rings(struct comedi_device * dev)
{
unsigned i;
unsigned j;
@@ -968,7 +968,7 @@ static int ni_660x_alloc_mite_rings(comedi_device * dev)
return 0;
}
-static void ni_660x_free_mite_rings(comedi_device * dev)
+static void ni_660x_free_mite_rings(struct comedi_device * dev)
{
unsigned i;
unsigned j;
@@ -980,7 +980,7 @@ static void ni_660x_free_mite_rings(comedi_device * dev)
}
}
-static int ni_660x_attach(comedi_device * dev, comedi_devconfig * it)
+static int ni_660x_attach(struct comedi_device * dev, comedi_devconfig * it)
{
comedi_subdevice *s;
int ret;
@@ -1100,7 +1100,7 @@ static int ni_660x_attach(comedi_device * dev, comedi_devconfig * it)
return 0;
}
-static int ni_660x_detach(comedi_device * dev)
+static int ni_660x_detach(struct comedi_device * dev)
{
printk("comedi%d: ni_660x: remove\n", dev->minor);
@@ -1120,13 +1120,13 @@ static int ni_660x_detach(comedi_device * dev)
}
static int
-ni_660x_GPCT_rinsn(comedi_device * dev, comedi_subdevice * s,
+ni_660x_GPCT_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
return ni_tio_rinsn(subdev_to_counter(s), insn, data);
}
-static void init_tio_chip(comedi_device * dev, int chipset)
+static void init_tio_chip(struct comedi_device * dev, int chipset)
{
unsigned i;
@@ -1147,19 +1147,19 @@ static void init_tio_chip(comedi_device * dev, int chipset)
}
static int
-ni_660x_GPCT_insn_config(comedi_device * dev, comedi_subdevice * s,
+ni_660x_GPCT_insn_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
return ni_tio_insn_config(subdev_to_counter(s), insn, data);
}
-static int ni_660x_GPCT_winsn(comedi_device * dev,
+static int ni_660x_GPCT_winsn(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
return ni_tio_winsn(subdev_to_counter(s), insn, data);
}
-static int ni_660x_find_device(comedi_device * dev, int bus, int slot)
+static int ni_660x_find_device(struct comedi_device * dev, int bus, int slot)
{
struct mite_struct *mite;
int i;
@@ -1186,7 +1186,7 @@ static int ni_660x_find_device(comedi_device * dev, int bus, int slot)
return -EIO;
}
-static int ni_660x_dio_insn_bits(comedi_device * dev,
+static int ni_660x_dio_insn_bits(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
unsigned base_bitfield_channel = CR_CHAN(insn->chanspec);
@@ -1206,7 +1206,7 @@ static int ni_660x_dio_insn_bits(comedi_device * dev,
return 2;
}
-static void ni_660x_select_pfi_output(comedi_device * dev, unsigned pfi_channel,
+static void ni_660x_select_pfi_output(struct comedi_device * dev, unsigned pfi_channel,
unsigned output_select)
{
static const unsigned counter_4_7_first_pfi = 8;
@@ -1241,7 +1241,7 @@ static void ni_660x_select_pfi_output(comedi_device * dev, unsigned pfi_channel,
ni_660x_write_register(dev, active_chipset, active_bits, IOConfigReg(pfi_channel));
}
-static int ni_660x_set_pfi_routing(comedi_device * dev, unsigned chan,
+static int ni_660x_set_pfi_routing(struct comedi_device * dev, unsigned chan,
unsigned source)
{
if (source > num_pfi_output_selects)
@@ -1264,13 +1264,13 @@ static int ni_660x_set_pfi_routing(comedi_device * dev, unsigned chan,
return 0;
}
-static unsigned ni_660x_get_pfi_routing(comedi_device * dev, unsigned chan)
+static unsigned ni_660x_get_pfi_routing(struct comedi_device * dev, unsigned chan)
{
BUG_ON(chan >= NUM_PFI_CHANNELS);
return private(dev)->pfi_output_selects[chan];
}
-static void ni660x_config_filter(comedi_device * dev, unsigned pfi_channel,
+static void ni660x_config_filter(struct comedi_device * dev, unsigned pfi_channel,
enum ni_gpct_filter_select filter)
{
unsigned bits = ni_660x_read_register(dev, 0, IOConfigReg(pfi_channel));
@@ -1279,7 +1279,7 @@ static void ni660x_config_filter(comedi_device * dev, unsigned pfi_channel,
ni_660x_write_register(dev, 0, bits, IOConfigReg(pfi_channel));
}
-static int ni_660x_dio_insn_config(comedi_device * dev,
+static int ni_660x_dio_insn_config(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
int chan = CR_CHAN(insn->chanspec);
diff --git a/drivers/staging/comedi/drivers/ni_670x.c b/drivers/staging/comedi/drivers/ni_670x.c
index 5e1cb2abe870..4c0cc433312a 100644
--- a/drivers/staging/comedi/drivers/ni_670x.c
+++ b/drivers/staging/comedi/drivers/ni_670x.c
@@ -108,8 +108,8 @@ typedef struct {
#define devpriv ((ni_670x_private *)dev->private)
#define n_ni_670x_boards (sizeof(ni_670x_boards)/sizeof(ni_670x_boards[0]))
-static int ni_670x_attach(comedi_device * dev, comedi_devconfig * it);
-static int ni_670x_detach(comedi_device * dev);
+static int ni_670x_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int ni_670x_detach(struct comedi_device * dev);
static comedi_driver driver_ni_670x = {
driver_name:"ni_670x",
@@ -122,18 +122,18 @@ COMEDI_PCI_INITCLEANUP(driver_ni_670x, ni_670x_pci_table);
static comedi_lrange range_0_20mA = { 1, {RANGE_mA(0, 20)} };
-static int ni_670x_find_device(comedi_device * dev, int bus, int slot);
+static int ni_670x_find_device(struct comedi_device * dev, int bus, int slot);
-static int ni_670x_ao_winsn(comedi_device * dev, comedi_subdevice * s,
+static int ni_670x_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int ni_670x_ao_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int ni_670x_ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int ni_670x_dio_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int ni_670x_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int ni_670x_dio_insn_config(comedi_device * dev, comedi_subdevice * s,
+static int ni_670x_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int ni_670x_attach(comedi_device * dev, comedi_devconfig * it)
+static int ni_670x_attach(struct comedi_device * dev, comedi_devconfig * it)
{
comedi_subdevice *s;
int ret;
@@ -202,7 +202,7 @@ static int ni_670x_attach(comedi_device * dev, comedi_devconfig * it)
return 1;
}
-static int ni_670x_detach(comedi_device * dev)
+static int ni_670x_detach(struct comedi_device * dev)
{
printk("comedi%d: ni_670x: remove\n", dev->minor);
@@ -218,7 +218,7 @@ static int ni_670x_detach(comedi_device * dev)
return 0;
}
-static int ni_670x_ao_winsn(comedi_device * dev, comedi_subdevice * s,
+static int ni_670x_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
@@ -244,7 +244,7 @@ static int ni_670x_ao_winsn(comedi_device * dev, comedi_subdevice * s,
return i;
}
-static int ni_670x_ao_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int ni_670x_ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
@@ -256,7 +256,7 @@ static int ni_670x_ao_rinsn(comedi_device * dev, comedi_subdevice * s,
return i;
}
-static int ni_670x_dio_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int ni_670x_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
@@ -278,7 +278,7 @@ static int ni_670x_dio_insn_bits(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int ni_670x_dio_insn_config(comedi_device * dev, comedi_subdevice * s,
+static int ni_670x_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int chan = CR_CHAN(insn->chanspec);
@@ -305,7 +305,7 @@ static int ni_670x_dio_insn_config(comedi_device * dev, comedi_subdevice * s,
return insn->n;
}
-static int ni_670x_find_device(comedi_device * dev, int bus, int slot)
+static int ni_670x_find_device(struct comedi_device * dev, int bus, int slot)
{
struct mite_struct *mite;
int i;
diff --git a/drivers/staging/comedi/drivers/ni_at_a2150.c b/drivers/staging/comedi/drivers/ni_at_a2150.c
index 2d7f5528b402..bf16e1273825 100644
--- a/drivers/staging/comedi/drivers/ni_at_a2150.c
+++ b/drivers/staging/comedi/drivers/ni_at_a2150.c
@@ -167,9 +167,9 @@ typedef struct {
#define devpriv ((a2150_private *)dev->private)
-static int a2150_attach(comedi_device * dev, comedi_devconfig * it);
-static int a2150_detach(comedi_device * dev);
-static int a2150_cancel(comedi_device * dev, comedi_subdevice * s);
+static int a2150_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int a2150_detach(struct comedi_device * dev);
+static int a2150_cancel(struct comedi_device * dev, comedi_subdevice * s);
static comedi_driver driver_a2150 = {
driver_name:"ni_at_a2150",
@@ -179,15 +179,15 @@ static comedi_driver driver_a2150 = {
};
static irqreturn_t a2150_interrupt(int irq, void *d PT_REGS_ARG);
-static int a2150_ai_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int a2150_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd);
-static int a2150_ai_cmd(comedi_device * dev, comedi_subdevice * s);
-static int a2150_ai_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int a2150_ai_cmd(struct comedi_device * dev, comedi_subdevice * s);
+static int a2150_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int a2150_get_timing(comedi_device * dev, unsigned int *period,
+static int a2150_get_timing(struct comedi_device * dev, unsigned int *period,
int flags);
-static int a2150_probe(comedi_device * dev);
-static int a2150_set_chanlist(comedi_device * dev, unsigned int start_channel,
+static int a2150_probe(struct comedi_device * dev);
+static int a2150_set_chanlist(struct comedi_device * dev, unsigned int start_channel,
unsigned int num_channels);
/*
* A convenient macro that defines init_module() and cleanup_module(),
@@ -197,7 +197,7 @@ COMEDI_INITCLEANUP(driver_a2150);
#ifdef A2150_DEBUG
-static void ni_dump_regs(comedi_device * dev)
+static void ni_dump_regs(struct comedi_device * dev)
{
rt_printk("config bits 0x%x\n", devpriv->config_bits);
rt_printk("irq dma bits 0x%x\n", devpriv->irq_dma_bits);
@@ -212,7 +212,7 @@ static irqreturn_t a2150_interrupt(int irq, void *d PT_REGS_ARG)
int i;
int status;
unsigned long flags;
- comedi_device *dev = d;
+ struct comedi_device *dev = d;
comedi_subdevice *s = dev->read_subdev;
comedi_async *async;
comedi_cmd *cmd;
@@ -316,13 +316,13 @@ static irqreturn_t a2150_interrupt(int irq, void *d PT_REGS_ARG)
}
// probes board type, returns offset
-static int a2150_probe(comedi_device * dev)
+static int a2150_probe(struct comedi_device * dev)
{
int status = inw(dev->iobase + STATUS_REG);
return ID_BITS(status);
}
-static int a2150_attach(comedi_device * dev, comedi_devconfig * it)
+static int a2150_attach(struct comedi_device * dev, comedi_devconfig * it)
{
comedi_subdevice *s;
unsigned long iobase = it->options[0];
@@ -447,7 +447,7 @@ static int a2150_attach(comedi_device * dev, comedi_devconfig * it)
return 0;
};
-static int a2150_detach(comedi_device * dev)
+static int a2150_detach(struct comedi_device * dev)
{
printk("comedi%d: %s: remove\n", dev->minor, driver_a2150.driver_name);
@@ -470,7 +470,7 @@ static int a2150_detach(comedi_device * dev)
return 0;
};
-static int a2150_cancel(comedi_device * dev, comedi_subdevice * s)
+static int a2150_cancel(struct comedi_device * dev, comedi_subdevice * s)
{
// disable dma on card
devpriv->irq_dma_bits &= ~DMA_INTR_EN_BIT & ~DMA_EN_BIT;
@@ -485,7 +485,7 @@ static int a2150_cancel(comedi_device * dev, comedi_subdevice * s)
return 0;
}
-static int a2150_ai_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int a2150_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
@@ -615,7 +615,7 @@ static int a2150_ai_cmdtest(comedi_device * dev, comedi_subdevice * s,
return 0;
}
-static int a2150_ai_cmd(comedi_device * dev, comedi_subdevice * s)
+static int a2150_ai_cmd(struct comedi_device * dev, comedi_subdevice * s)
{
comedi_async *async = s->async;
comedi_cmd *cmd = &async->cmd;
@@ -726,7 +726,7 @@ static int a2150_ai_cmd(comedi_device * dev, comedi_subdevice * s)
return 0;
}
-static int a2150_ai_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int a2150_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int i, n;
@@ -800,7 +800,7 @@ static int a2150_ai_rinsn(comedi_device * dev, comedi_subdevice * s,
/* sets bits in devpriv->clock_bits to nearest approximation of requested period,
* adjusts requested period to actual timing. */
-static int a2150_get_timing(comedi_device * dev, unsigned int *period,
+static int a2150_get_timing(struct comedi_device * dev, unsigned int *period,
int flags)
{
int lub, glb, temp;
@@ -874,7 +874,7 @@ static int a2150_get_timing(comedi_device * dev, unsigned int *period,
return 0;
}
-static int a2150_set_chanlist(comedi_device * dev, unsigned int start_channel,
+static int a2150_set_chanlist(struct comedi_device * dev, unsigned int start_channel,
unsigned int num_channels)
{
if (start_channel + num_channels > 4)
diff --git a/drivers/staging/comedi/drivers/ni_at_ao.c b/drivers/staging/comedi/drivers/ni_at_ao.c
index fd259813bf54..6a8d9a5b7bf7 100644
--- a/drivers/staging/comedi/drivers/ni_at_ao.c
+++ b/drivers/staging/comedi/drivers/ni_at_ao.c
@@ -178,8 +178,8 @@ typedef struct {
} atao_private;
#define devpriv ((atao_private *)dev->private)
-static int atao_attach(comedi_device * dev, comedi_devconfig * it);
-static int atao_detach(comedi_device * dev);
+static int atao_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int atao_detach(struct comedi_device * dev);
static comedi_driver driver_atao = {
driver_name:"ni_at_ao",
module:THIS_MODULE,
@@ -192,22 +192,22 @@ static comedi_driver driver_atao = {
COMEDI_INITCLEANUP(driver_atao);
-static void atao_reset(comedi_device * dev);
+static void atao_reset(struct comedi_device * dev);
-static int atao_ao_winsn(comedi_device * dev, comedi_subdevice * s,
+static int atao_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int atao_ao_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int atao_ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int atao_dio_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int atao_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int atao_dio_insn_config(comedi_device * dev, comedi_subdevice * s,
+static int atao_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int atao_calib_insn_read(comedi_device * dev, comedi_subdevice * s,
+static int atao_calib_insn_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int atao_calib_insn_write(comedi_device * dev, comedi_subdevice * s,
+static int atao_calib_insn_write(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int atao_attach(comedi_device * dev, comedi_devconfig * it)
+static int atao_attach(struct comedi_device * dev, comedi_devconfig * it)
{
comedi_subdevice *s;
unsigned long iobase;
@@ -280,7 +280,7 @@ static int atao_attach(comedi_device * dev, comedi_devconfig * it)
return 0;
}
-static int atao_detach(comedi_device * dev)
+static int atao_detach(struct comedi_device * dev)
{
printk("comedi%d: atao: remove\n", dev->minor);
@@ -290,7 +290,7 @@ static int atao_detach(comedi_device * dev)
return 0;
}
-static void atao_reset(comedi_device * dev)
+static void atao_reset(struct comedi_device * dev)
{
/* This is the reset sequence described in the manual */
@@ -320,7 +320,7 @@ static void atao_reset(comedi_device * dev)
outw(devpriv->cfg1, dev->iobase + ATAO_CFG1);
}
-static int atao_ao_winsn(comedi_device * dev, comedi_subdevice * s,
+static int atao_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
@@ -344,7 +344,7 @@ static int atao_ao_winsn(comedi_device * dev, comedi_subdevice * s,
return i;
}
-static int atao_ao_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int atao_ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
@@ -356,7 +356,7 @@ static int atao_ao_rinsn(comedi_device * dev, comedi_subdevice * s,
return i;
}
-static int atao_dio_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int atao_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
@@ -373,7 +373,7 @@ static int atao_dio_insn_bits(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int atao_dio_insn_config(comedi_device * dev, comedi_subdevice * s,
+static int atao_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int chan = CR_CHAN(insn->chanspec);
@@ -418,7 +418,7 @@ static int atao_dio_insn_config(comedi_device * dev, comedi_subdevice * s,
* DACs. It is not explicitly stated in the manual how to access
* the caldacs, but we can guess.
*/
-static int atao_calib_insn_read(comedi_device * dev, comedi_subdevice * s,
+static int atao_calib_insn_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
@@ -428,7 +428,7 @@ static int atao_calib_insn_read(comedi_device * dev, comedi_subdevice * s,
return insn->n;
}
-static int atao_calib_insn_write(comedi_device * dev, comedi_subdevice * s,
+static int atao_calib_insn_write(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int bitstring, bit;
diff --git a/drivers/staging/comedi/drivers/ni_atmio.c b/drivers/staging/comedi/drivers/ni_atmio.c
index 4c8fe52db30c..0e30050b91e6 100644
--- a/drivers/staging/comedi/drivers/ni_atmio.c
+++ b/drivers/staging/comedi/drivers/ni_atmio.c
@@ -296,7 +296,7 @@ typedef struct {
* read/written directly in the I/O space of the board. The
* AT-MIO devices map the low 8 STC registers to iobase+addr*2. */
-static void ni_atmio_win_out(comedi_device * dev, uint16_t data, int addr)
+static void ni_atmio_win_out(struct comedi_device * dev, uint16_t data, int addr)
{
unsigned long flags;
@@ -310,7 +310,7 @@ static void ni_atmio_win_out(comedi_device * dev, uint16_t data, int addr)
comedi_spin_unlock_irqrestore(&devpriv->window_lock, flags);
}
-static uint16_t ni_atmio_win_in(comedi_device * dev, int addr)
+static uint16_t ni_atmio_win_in(struct comedi_device * dev, int addr)
{
unsigned long flags;
uint16_t ret;
@@ -338,8 +338,8 @@ static struct pnp_device_id device_ids[] = {
MODULE_DEVICE_TABLE(pnp, device_ids);
-static int ni_atmio_attach(comedi_device * dev, comedi_devconfig * it);
-static int ni_atmio_detach(comedi_device * dev);
+static int ni_atmio_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int ni_atmio_detach(struct comedi_device * dev);
static comedi_driver driver_atmio = {
driver_name:"ni_atmio",
module:THIS_MODULE,
@@ -351,10 +351,10 @@ COMEDI_INITCLEANUP(driver_atmio);
#include "ni_mio_common.c"
-static int ni_getboardtype(comedi_device * dev);
+static int ni_getboardtype(struct comedi_device * dev);
/* clean up allocated resources */
-static int ni_atmio_detach(comedi_device * dev)
+static int ni_atmio_detach(struct comedi_device * dev)
{
mio_common_detach(dev);
@@ -404,7 +404,7 @@ static int ni_isapnp_find_board(struct pnp_dev **dev)
return 0;
}
-static int ni_atmio_attach(comedi_device * dev, comedi_devconfig * it)
+static int ni_atmio_attach(struct comedi_device * dev, comedi_devconfig * it)
{
struct pnp_dev *isapnp_dev;
int ret;
@@ -492,7 +492,7 @@ static int ni_atmio_attach(comedi_device * dev, comedi_devconfig * it)
return 0;
}
-static int ni_getboardtype(comedi_device * dev)
+static int ni_getboardtype(struct comedi_device * dev)
{
int device_id = ni_read_eeprom(dev, 511);
int i;
diff --git a/drivers/staging/comedi/drivers/ni_atmio16d.c b/drivers/staging/comedi/drivers/ni_atmio16d.c
index 11581dce981f..62be3d9ec484 100644
--- a/drivers/staging/comedi/drivers/ni_atmio16d.c
+++ b/drivers/staging/comedi/drivers/ni_atmio16d.c
@@ -123,15 +123,15 @@ static const atmio16_board_t atmio16_boards[] = {
#define boardtype ((const atmio16_board_t *)dev->board_ptr)
/* function prototypes */
-static int atmio16d_attach(comedi_device * dev, comedi_devconfig * it);
-static int atmio16d_detach(comedi_device * dev);
+static int atmio16d_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int atmio16d_detach(struct comedi_device * dev);
static irqreturn_t atmio16d_interrupt(int irq, void *d PT_REGS_ARG);
-static int atmio16d_ai_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int atmio16d_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd);
-static int atmio16d_ai_cmd(comedi_device * dev, comedi_subdevice * s);
-static int atmio16d_ai_cancel(comedi_device * dev, comedi_subdevice * s);
-static void reset_counters(comedi_device * dev);
-static void reset_atmio16d(comedi_device * dev);
+static int atmio16d_ai_cmd(struct comedi_device * dev, comedi_subdevice * s);
+static int atmio16d_ai_cancel(struct comedi_device * dev, comedi_subdevice * s);
+static void reset_counters(struct comedi_device * dev);
+static void reset_atmio16d(struct comedi_device * dev);
/* main driver struct */
static comedi_driver driver_atmio16d = {
@@ -185,7 +185,7 @@ typedef struct {
unsigned int com_reg_2_state; /* current state of command register 2 */
} atmio16d_private;
-static void reset_counters(comedi_device * dev)
+static void reset_counters(struct comedi_device * dev)
{
/* Counter 2 */
outw(0xFFC2, dev->iobase + AM9513A_COM_REG);
@@ -223,7 +223,7 @@ static void reset_counters(comedi_device * dev)
outw(0, dev->iobase + AD_CLEAR_REG);
}
-static void reset_atmio16d(comedi_device * dev)
+static void reset_atmio16d(struct comedi_device * dev)
{
int i;
@@ -257,7 +257,7 @@ static void reset_atmio16d(comedi_device * dev)
static irqreturn_t atmio16d_interrupt(int irq, void *d PT_REGS_ARG)
{
- comedi_device *dev = d;
+ struct comedi_device *dev = d;
comedi_subdevice *s = dev->subdevices + 0;
// printk("atmio16d_interrupt!\n");
@@ -268,7 +268,7 @@ static irqreturn_t atmio16d_interrupt(int irq, void *d PT_REGS_ARG)
return IRQ_HANDLED;
}
-static int atmio16d_ai_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int atmio16d_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0, tmp;
@@ -369,7 +369,7 @@ static int atmio16d_ai_cmdtest(comedi_device * dev, comedi_subdevice * s,
return 0;
}
-static int atmio16d_ai_cmd(comedi_device * dev, comedi_subdevice * s)
+static int atmio16d_ai_cmd(struct comedi_device * dev, comedi_subdevice * s)
{
comedi_cmd *cmd = &s->async->cmd;
unsigned int timer, base_clock;
@@ -517,7 +517,7 @@ static int atmio16d_ai_cmd(comedi_device * dev, comedi_subdevice * s)
}
/* This will cancel a running acquisition operation */
-static int atmio16d_ai_cancel(comedi_device * dev, comedi_subdevice * s)
+static int atmio16d_ai_cancel(struct comedi_device * dev, comedi_subdevice * s)
{
reset_atmio16d(dev);
@@ -525,7 +525,7 @@ static int atmio16d_ai_cancel(comedi_device * dev, comedi_subdevice * s)
}
/* Mode 0 is used to get a single conversion on demand */
-static int atmio16d_ai_insn_read(comedi_device * dev, comedi_subdevice * s,
+static int atmio16d_ai_insn_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i, t;
@@ -584,7 +584,7 @@ static int atmio16d_ai_insn_read(comedi_device * dev, comedi_subdevice * s,
return i;
}
-static int atmio16d_ao_insn_read(comedi_device * dev, comedi_subdevice * s,
+static int atmio16d_ao_insn_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
@@ -599,7 +599,7 @@ static int atmio16d_ao_insn_read(comedi_device * dev, comedi_subdevice * s,
return i;
}
-static int atmio16d_ao_insn_write(comedi_device * dev, comedi_subdevice * s,
+static int atmio16d_ao_insn_write(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
@@ -634,7 +634,7 @@ static int atmio16d_ao_insn_write(comedi_device * dev, comedi_subdevice * s,
return i;
}
-static int atmio16d_dio_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int atmio16d_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
@@ -650,7 +650,7 @@ static int atmio16d_dio_insn_bits(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int atmio16d_dio_insn_config(comedi_device * dev, comedi_subdevice * s,
+static int atmio16d_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
@@ -704,7 +704,7 @@ static int atmio16d_dio_insn_config(comedi_device * dev, comedi_subdevice * s,
options[12] - dac1 coding
*/
-static int atmio16d_attach(comedi_device * dev, comedi_devconfig * it)
+static int atmio16d_attach(struct comedi_device * dev, comedi_devconfig * it)
{
unsigned int irq;
unsigned long iobase;
@@ -839,7 +839,7 @@ static int atmio16d_attach(comedi_device * dev, comedi_devconfig * it)
return 0;
}
-static int atmio16d_detach(comedi_device * dev)
+static int atmio16d_detach(struct comedi_device * dev)
{
printk("comedi%d: atmio16d: remove\n", dev->minor);
diff --git a/drivers/staging/comedi/drivers/ni_daq_700.c b/drivers/staging/comedi/drivers/ni_daq_700.c
index 9193f16ad14f..a83d0308a67a 100644
--- a/drivers/staging/comedi/drivers/ni_daq_700.c
+++ b/drivers/staging/comedi/drivers/ni_daq_700.c
@@ -55,8 +55,8 @@ static struct pcmcia_device *pcmcia_cur_dev = NULL;
#define DIO700_SIZE 8 // size of io region used by board
-static int dio700_attach(comedi_device * dev, comedi_devconfig * it);
-static int dio700_detach(comedi_device * dev);
+static int dio700_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int dio700_detach(struct comedi_device * dev);
enum dio700_bustype { pcmcia_bustype };
@@ -126,9 +126,9 @@ struct subdev_700_struct {
#define CALLBACK_FUNC (((struct subdev_700_struct *)s->private)->cb_func)
#define subdevpriv ((struct subdev_700_struct *)s->private)
-static void do_config(comedi_device * dev, comedi_subdevice * s);
+static void do_config(struct comedi_device * dev, comedi_subdevice * s);
-void subdev_700_interrupt(comedi_device * dev, comedi_subdevice * s)
+void subdev_700_interrupt(struct comedi_device * dev, comedi_subdevice * s)
{
short d;
@@ -153,7 +153,7 @@ static int subdev_700_cb(int dir, int port, int data, unsigned long arg)
}
}
-static int subdev_700_insn(comedi_device * dev, comedi_subdevice * s,
+static int subdev_700_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (data[0]) {
@@ -171,7 +171,7 @@ static int subdev_700_insn(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int subdev_700_insn_config(comedi_device * dev, comedi_subdevice * s,
+static int subdev_700_insn_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
@@ -194,12 +194,12 @@ static int subdev_700_insn_config(comedi_device * dev, comedi_subdevice * s,
return 1;
}
-static void do_config(comedi_device * dev, comedi_subdevice * s)
+static void do_config(struct comedi_device * dev, comedi_subdevice * s)
{ /* use powerup defaults */
return;
}
-static int subdev_700_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int subdev_700_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
@@ -274,21 +274,21 @@ static int subdev_700_cmdtest(comedi_device * dev, comedi_subdevice * s,
return 0;
}
-static int subdev_700_cmd(comedi_device * dev, comedi_subdevice * s)
+static int subdev_700_cmd(struct comedi_device * dev, comedi_subdevice * s)
{
/* FIXME */
return 0;
}
-static int subdev_700_cancel(comedi_device * dev, comedi_subdevice * s)
+static int subdev_700_cancel(struct comedi_device * dev, comedi_subdevice * s)
{
/* FIXME */
return 0;
}
-int subdev_700_init(comedi_device * dev, comedi_subdevice * s, int (*cb) (int,
+int subdev_700_init(struct comedi_device * dev, comedi_subdevice * s, int (*cb) (int,
int, int, unsigned long), unsigned long arg)
{
s->type = COMEDI_SUBD_DIO;
@@ -317,7 +317,7 @@ int subdev_700_init(comedi_device * dev, comedi_subdevice * s, int (*cb) (int,
return 0;
}
-int subdev_700_init_irq(comedi_device * dev, comedi_subdevice * s,
+int subdev_700_init_irq(struct comedi_device * dev, comedi_subdevice * s,
int (*cb) (int, int, int, unsigned long), unsigned long arg)
{
int ret;
@@ -335,7 +335,7 @@ int subdev_700_init_irq(comedi_device * dev, comedi_subdevice * s,
return 0;
}
-void subdev_700_cleanup(comedi_device * dev, comedi_subdevice * s)
+void subdev_700_cleanup(struct comedi_device * dev, comedi_subdevice * s)
{
if (s->private) {
if (subdevpriv->have_irq) {
@@ -350,7 +350,7 @@ EXPORT_SYMBOL(subdev_700_init_irq);
EXPORT_SYMBOL(subdev_700_cleanup);
EXPORT_SYMBOL(subdev_700_interrupt);
-static int dio700_attach(comedi_device * dev, comedi_devconfig * it)
+static int dio700_attach(struct comedi_device * dev, comedi_devconfig * it)
{
comedi_subdevice *s;
unsigned long iobase = 0;
@@ -413,7 +413,7 @@ static int dio700_attach(comedi_device * dev, comedi_devconfig * it)
return 0;
};
-static int dio700_detach(comedi_device * dev)
+static int dio700_detach(struct comedi_device * dev)
{
printk("comedi%d: ni_daq_700: cs-remove\n", dev->minor);
diff --git a/drivers/staging/comedi/drivers/ni_daq_dio24.c b/drivers/staging/comedi/drivers/ni_daq_dio24.c
index 477d65ab09f7..98b20304b339 100644
--- a/drivers/staging/comedi/drivers/ni_daq_dio24.c
+++ b/drivers/staging/comedi/drivers/ni_daq_dio24.c
@@ -56,8 +56,8 @@ static struct pcmcia_device *pcmcia_cur_dev = NULL;
#define DIO24_SIZE 4 // size of io region used by board
-static int dio24_attach(comedi_device * dev, comedi_devconfig * it);
-static int dio24_detach(comedi_device * dev);
+static int dio24_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int dio24_detach(struct comedi_device * dev);
enum dio24_bustype { pcmcia_bustype };
@@ -107,7 +107,7 @@ static comedi_driver driver_dio24 = {
offset:sizeof(dio24_board),
};
-static int dio24_attach(comedi_device * dev, comedi_devconfig * it)
+static int dio24_attach(struct comedi_device * dev, comedi_devconfig * it)
{
comedi_subdevice *s;
unsigned long iobase = 0;
@@ -170,7 +170,7 @@ static int dio24_attach(comedi_device * dev, comedi_devconfig * it)
return 0;
};
-static int dio24_detach(comedi_device * dev)
+static int dio24_detach(struct comedi_device * dev)
{
printk("comedi%d: ni_daq_dio24: remove\n", dev->minor);
diff --git a/drivers/staging/comedi/drivers/ni_labpc.c b/drivers/staging/comedi/drivers/ni_labpc.c
index a7688f1670aa..53a7783793e3 100644
--- a/drivers/staging/comedi/drivers/ni_labpc.c
+++ b/drivers/staging/comedi/drivers/ni_labpc.c
@@ -163,46 +163,46 @@ NI manuals:
#define INIT_A1_BITS 0x70 // put hardware conversion counter output in harmless state (a1 mode 0)
#define COUNTER_B_BASE_REG 0x18
-static int labpc_attach(comedi_device * dev, comedi_devconfig * it);
-static int labpc_cancel(comedi_device * dev, comedi_subdevice * s);
+static int labpc_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int labpc_cancel(struct comedi_device * dev, comedi_subdevice * s);
static irqreturn_t labpc_interrupt(int irq, void *d PT_REGS_ARG);
-static int labpc_drain_fifo(comedi_device * dev);
-static void labpc_drain_dma(comedi_device * dev);
-static void handle_isa_dma(comedi_device * dev);
-static void labpc_drain_dregs(comedi_device * dev);
-static int labpc_ai_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int labpc_drain_fifo(struct comedi_device * dev);
+static void labpc_drain_dma(struct comedi_device * dev);
+static void handle_isa_dma(struct comedi_device * dev);
+static void labpc_drain_dregs(struct comedi_device * dev);
+static int labpc_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd);
-static int labpc_ai_cmd(comedi_device * dev, comedi_subdevice * s);
-static int labpc_ai_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int labpc_ai_cmd(struct comedi_device * dev, comedi_subdevice * s);
+static int labpc_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int labpc_ao_winsn(comedi_device * dev, comedi_subdevice * s,
+static int labpc_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int labpc_ao_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int labpc_ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int labpc_calib_read_insn(comedi_device * dev, comedi_subdevice * s,
+static int labpc_calib_read_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int labpc_calib_write_insn(comedi_device * dev, comedi_subdevice * s,
+static int labpc_calib_write_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int labpc_eeprom_read_insn(comedi_device * dev, comedi_subdevice * s,
+static int labpc_eeprom_read_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int labpc_eeprom_write_insn(comedi_device * dev, comedi_subdevice * s,
+static int labpc_eeprom_write_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
static unsigned int labpc_suggest_transfer_size(comedi_cmd cmd);
-static void labpc_adc_timing(comedi_device * dev, comedi_cmd * cmd);
+static void labpc_adc_timing(struct comedi_device * dev, comedi_cmd * cmd);
#ifdef CONFIG_COMEDI_PCI
-static int labpc_find_device(comedi_device *dev, int bus, int slot);
+static int labpc_find_device(struct comedi_device *dev, int bus, int slot);
#endif
static int labpc_dio_mem_callback(int dir, int port, int data,
unsigned long arg);
-static void labpc_serial_out(comedi_device * dev, unsigned int value,
+static void labpc_serial_out(struct comedi_device * dev, unsigned int value,
unsigned int num_bits);
-static unsigned int labpc_serial_in(comedi_device * dev);
-static unsigned int labpc_eeprom_read(comedi_device * dev,
+static unsigned int labpc_serial_in(struct comedi_device * dev);
+static unsigned int labpc_eeprom_read(struct comedi_device * dev,
unsigned int address);
-static unsigned int labpc_eeprom_read_status(comedi_device * dev);
-static unsigned int labpc_eeprom_write(comedi_device * dev,
+static unsigned int labpc_eeprom_read_status(struct comedi_device * dev);
+static unsigned int labpc_eeprom_write(struct comedi_device * dev,
unsigned int address, unsigned int value);
-static void write_caldac(comedi_device * dev, unsigned int channel,
+static void write_caldac(struct comedi_device * dev, unsigned int channel,
unsigned int value);
enum scan_mode {
@@ -448,7 +448,7 @@ static DEFINE_PCI_DEVICE_TABLE(labpc_pci_table) = {
MODULE_DEVICE_TABLE(pci, labpc_pci_table);
#endif /* CONFIG_COMEDI_PCI */
-static inline int labpc_counter_load(comedi_device * dev,
+static inline int labpc_counter_load(struct comedi_device * dev,
unsigned long base_address, unsigned int counter_number,
unsigned int count, unsigned int mode)
{
@@ -459,7 +459,7 @@ static inline int labpc_counter_load(comedi_device * dev,
return i8254_load(base_address, 0, counter_number, count, mode);
}
-int labpc_common_attach(comedi_device * dev, unsigned long iobase,
+int labpc_common_attach(struct comedi_device * dev, unsigned long iobase,
unsigned int irq, unsigned int dma_chan)
{
comedi_subdevice *s;
@@ -643,7 +643,7 @@ int labpc_common_attach(comedi_device * dev, unsigned long iobase,
return 0;
}
-static int labpc_attach(comedi_device * dev, comedi_devconfig * it)
+static int labpc_attach(struct comedi_device * dev, comedi_devconfig * it)
{
unsigned long iobase = 0;
unsigned int irq = 0;
@@ -694,7 +694,7 @@ static int labpc_attach(comedi_device * dev, comedi_devconfig * it)
// adapted from ni_pcimio for finding mite based boards (pc-1200)
#ifdef CONFIG_COMEDI_PCI
-static int labpc_find_device(comedi_device *dev, int bus, int slot)
+static int labpc_find_device(struct comedi_device *dev, int bus, int slot)
{
struct mite_struct *mite;
int i;
@@ -724,7 +724,7 @@ static int labpc_find_device(comedi_device *dev, int bus, int slot)
}
#endif
-int labpc_common_detach(comedi_device * dev)
+int labpc_common_detach(struct comedi_device * dev)
{
printk("comedi%d: ni_labpc: detach\n", dev->minor);
@@ -748,14 +748,14 @@ int labpc_common_detach(comedi_device * dev)
return 0;
};
-static void labpc_clear_adc_fifo(const comedi_device * dev)
+static void labpc_clear_adc_fifo(const struct comedi_device * dev)
{
devpriv->write_byte(0x1, dev->iobase + ADC_CLEAR_REG);
devpriv->read_byte(dev->iobase + ADC_FIFO_REG);
devpriv->read_byte(dev->iobase + ADC_FIFO_REG);
}
-static int labpc_cancel(comedi_device * dev, comedi_subdevice * s)
+static int labpc_cancel(struct comedi_device * dev, comedi_subdevice * s)
{
unsigned long flags;
@@ -793,7 +793,7 @@ static enum scan_mode labpc_ai_scan_mode(const comedi_cmd * cmd)
return 0;
}
-static int labpc_ai_chanlist_invalid(const comedi_device * dev,
+static int labpc_ai_chanlist_invalid(const struct comedi_device * dev,
const comedi_cmd * cmd)
{
int mode, channel, range, aref, i;
@@ -926,7 +926,7 @@ static void labpc_set_ai_scan_period(comedi_cmd * cmd, unsigned int ns)
cmd->scan_begin_arg = ns;
}
-static int labpc_ai_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int labpc_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
@@ -1063,7 +1063,7 @@ static int labpc_ai_cmdtest(comedi_device * dev, comedi_subdevice * s,
return 0;
}
-static int labpc_ai_cmd(comedi_device * dev, comedi_subdevice * s)
+static int labpc_ai_cmd(struct comedi_device * dev, comedi_subdevice * s)
{
int channel, range, aref;
unsigned long irq_flags;
@@ -1311,7 +1311,7 @@ static int labpc_ai_cmd(comedi_device * dev, comedi_subdevice * s)
/* interrupt service routine */
static irqreturn_t labpc_interrupt(int irq, void *d PT_REGS_ARG)
{
- comedi_device *dev = d;
+ struct comedi_device *dev = d;
comedi_subdevice *s = dev->read_subdev;
comedi_async *async;
comedi_cmd *cmd;
@@ -1393,7 +1393,7 @@ static irqreturn_t labpc_interrupt(int irq, void *d PT_REGS_ARG)
}
// read all available samples from ai fifo
-static int labpc_drain_fifo(comedi_device * dev)
+static int labpc_drain_fifo(struct comedi_device * dev)
{
unsigned int lsb, msb;
short data;
@@ -1427,7 +1427,7 @@ static int labpc_drain_fifo(comedi_device * dev)
return 0;
}
-static void labpc_drain_dma(comedi_device * dev)
+static void labpc_drain_dma(struct comedi_device * dev)
{
comedi_subdevice *s = dev->read_subdev;
comedi_async *async = s->async;
@@ -1480,7 +1480,7 @@ static void labpc_drain_dma(comedi_device * dev)
async->events |= COMEDI_CB_BLOCK;
}
-static void handle_isa_dma(comedi_device * dev)
+static void handle_isa_dma(struct comedi_device * dev)
{
labpc_drain_dma(dev);
@@ -1492,7 +1492,7 @@ static void handle_isa_dma(comedi_device * dev)
/* makes sure all data aquired by board is transfered to comedi (used
* when aquisition is terminated by stop_src == TRIG_EXT). */
-static void labpc_drain_dregs(comedi_device * dev)
+static void labpc_drain_dregs(struct comedi_device * dev)
{
if (devpriv->current_transfer == isa_dma_transfer)
labpc_drain_dma(dev);
@@ -1500,7 +1500,7 @@ static void labpc_drain_dregs(comedi_device * dev)
labpc_drain_fifo(dev);
}
-static int labpc_ai_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int labpc_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i, n;
@@ -1586,7 +1586,7 @@ static int labpc_ai_rinsn(comedi_device * dev, comedi_subdevice * s,
}
// analog output insn
-static int labpc_ao_winsn(comedi_device * dev, comedi_subdevice * s,
+static int labpc_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int channel, range;
@@ -1627,7 +1627,7 @@ static int labpc_ao_winsn(comedi_device * dev, comedi_subdevice * s,
}
// analog output readback insn
-static int labpc_ao_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int labpc_ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
data[0] = devpriv->ao_value[CR_CHAN(insn->chanspec)];
@@ -1635,7 +1635,7 @@ static int labpc_ao_rinsn(comedi_device * dev, comedi_subdevice * s,
return 1;
}
-static int labpc_calib_read_insn(comedi_device * dev, comedi_subdevice * s,
+static int labpc_calib_read_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
data[0] = devpriv->caldac[CR_CHAN(insn->chanspec)];
@@ -1643,7 +1643,7 @@ static int labpc_calib_read_insn(comedi_device * dev, comedi_subdevice * s,
return 1;
}
-static int labpc_calib_write_insn(comedi_device * dev, comedi_subdevice * s,
+static int labpc_calib_write_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int channel = CR_CHAN(insn->chanspec);
@@ -1652,7 +1652,7 @@ static int labpc_calib_write_insn(comedi_device * dev, comedi_subdevice * s,
return 1;
}
-static int labpc_eeprom_read_insn(comedi_device * dev, comedi_subdevice * s,
+static int labpc_eeprom_read_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
data[0] = devpriv->eeprom_data[CR_CHAN(insn->chanspec)];
@@ -1660,7 +1660,7 @@ static int labpc_eeprom_read_insn(comedi_device * dev, comedi_subdevice * s,
return 1;
}
-static int labpc_eeprom_write_insn(comedi_device * dev, comedi_subdevice * s,
+static int labpc_eeprom_write_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int channel = CR_CHAN(insn->chanspec);
@@ -1704,7 +1704,7 @@ static unsigned int labpc_suggest_transfer_size(comedi_cmd cmd)
}
// figures out what counter values to use based on command
-static void labpc_adc_timing(comedi_device * dev, comedi_cmd * cmd)
+static void labpc_adc_timing(struct comedi_device * dev, comedi_cmd * cmd)
{
const int max_counter_value = 0x10000; // max value for 16 bit counter in mode 2
const int min_counter_value = 2; // min value for 16 bit counter in mode 2
@@ -1796,7 +1796,7 @@ static int labpc_dio_mem_callback(int dir, int port, int data,
}
// lowlevel write to eeprom/dac
-static void labpc_serial_out(comedi_device * dev, unsigned int value,
+static void labpc_serial_out(struct comedi_device * dev, unsigned int value,
unsigned int value_width)
{
int i;
@@ -1821,7 +1821,7 @@ static void labpc_serial_out(comedi_device * dev, unsigned int value,
}
// lowlevel read from eeprom
-static unsigned int labpc_serial_in(comedi_device * dev)
+static unsigned int labpc_serial_in(struct comedi_device * dev)
{
unsigned int value = 0;
int i;
@@ -1850,7 +1850,7 @@ static unsigned int labpc_serial_in(comedi_device * dev)
return value;
}
-static unsigned int labpc_eeprom_read(comedi_device * dev, unsigned int address)
+static unsigned int labpc_eeprom_read(struct comedi_device * dev, unsigned int address)
{
unsigned int value;
const int read_instruction = 0x3; // bits to tell eeprom to expect a read
@@ -1879,7 +1879,7 @@ static unsigned int labpc_eeprom_read(comedi_device * dev, unsigned int address)
return value;
}
-static unsigned int labpc_eeprom_write(comedi_device * dev,
+static unsigned int labpc_eeprom_write(struct comedi_device * dev,
unsigned int address, unsigned int value)
{
const int write_enable_instruction = 0x6;
@@ -1937,7 +1937,7 @@ static unsigned int labpc_eeprom_write(comedi_device * dev,
return 0;
}
-static unsigned int labpc_eeprom_read_status(comedi_device * dev)
+static unsigned int labpc_eeprom_read_status(struct comedi_device * dev)
{
unsigned int value;
const int read_status_instruction = 0x5;
@@ -1965,7 +1965,7 @@ static unsigned int labpc_eeprom_read_status(comedi_device * dev)
}
// writes to 8 bit calibration dacs
-static void write_caldac(comedi_device * dev, unsigned int channel,
+static void write_caldac(struct comedi_device * dev, unsigned int channel,
unsigned int value)
{
if (value == devpriv->caldac[channel])
diff --git a/drivers/staging/comedi/drivers/ni_labpc.h b/drivers/staging/comedi/drivers/ni_labpc.h
index 8264fb19288d..d80f05eae52f 100644
--- a/drivers/staging/comedi/drivers/ni_labpc.h
+++ b/drivers/staging/comedi/drivers/ni_labpc.h
@@ -74,9 +74,9 @@ typedef struct {
void (*write_byte) (unsigned int byte, unsigned long address);
} labpc_private;
-int labpc_common_attach(comedi_device * dev, unsigned long iobase,
+int labpc_common_attach(struct comedi_device * dev, unsigned long iobase,
unsigned int irq, unsigned int dma);
-int labpc_common_detach(comedi_device * dev);
+int labpc_common_detach(struct comedi_device * dev);
extern const int labpc_1200_is_unipolar[];
extern const int labpc_1200_ai_gain_bits[];
diff --git a/drivers/staging/comedi/drivers/ni_labpc_cs.c b/drivers/staging/comedi/drivers/ni_labpc_cs.c
index e9098ce6f9dd..f41d39b75df9 100644
--- a/drivers/staging/comedi/drivers/ni_labpc_cs.c
+++ b/drivers/staging/comedi/drivers/ni_labpc_cs.c
@@ -79,7 +79,7 @@ NI manuals:
static struct pcmcia_device *pcmcia_cur_dev = NULL;
-static int labpc_attach(comedi_device * dev, comedi_devconfig * it);
+static int labpc_attach(struct comedi_device * dev, comedi_devconfig * it);
static const labpc_board labpc_cs_boards[] = {
{
@@ -126,7 +126,7 @@ static comedi_driver driver_labpc_cs = {
.offset = sizeof(labpc_board),
};
-static int labpc_attach(comedi_device * dev, comedi_devconfig * it)
+static int labpc_attach(struct comedi_device * dev, comedi_devconfig * it)
{
unsigned long iobase = 0;
unsigned int irq = 0;
diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c b/drivers/staging/comedi/drivers/ni_mio_common.c
index bb2c378cf68a..f702cc9064ba 100644
--- a/drivers/staging/comedi/drivers/ni_mio_common.c
+++ b/drivers/staging/comedi/drivers/ni_mio_common.c
@@ -193,49 +193,49 @@ static const comedi_lrange *const ni_range_lkup[] = {
[ai_gain_6143] = &range_ni_S_ai_6143
};
-static int ni_dio_insn_config(comedi_device * dev, comedi_subdevice * s,
+static int ni_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int ni_dio_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int ni_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int ni_cdio_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int ni_cdio_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd);
-static int ni_cdio_cmd(comedi_device * dev, comedi_subdevice * s);
-static int ni_cdio_cancel(comedi_device * dev, comedi_subdevice * s);
-static void handle_cdio_interrupt(comedi_device * dev);
-static int ni_cdo_inttrig(comedi_device * dev, comedi_subdevice * s,
+static int ni_cdio_cmd(struct comedi_device * dev, comedi_subdevice * s);
+static int ni_cdio_cancel(struct comedi_device * dev, comedi_subdevice * s);
+static void handle_cdio_interrupt(struct comedi_device * dev);
+static int ni_cdo_inttrig(struct comedi_device * dev, comedi_subdevice * s,
unsigned int trignum);
-static int ni_serial_insn_config(comedi_device * dev, comedi_subdevice * s,
+static int ni_serial_insn_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int ni_serial_hw_readwrite8(comedi_device * dev, comedi_subdevice * s,
+static int ni_serial_hw_readwrite8(struct comedi_device * dev, comedi_subdevice * s,
unsigned char data_out, unsigned char *data_in);
-static int ni_serial_sw_readwrite8(comedi_device * dev, comedi_subdevice * s,
+static int ni_serial_sw_readwrite8(struct comedi_device * dev, comedi_subdevice * s,
unsigned char data_out, unsigned char *data_in);
-static int ni_calib_insn_read(comedi_device * dev, comedi_subdevice * s,
+static int ni_calib_insn_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int ni_calib_insn_write(comedi_device * dev, comedi_subdevice * s,
+static int ni_calib_insn_write(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int ni_eeprom_insn_read(comedi_device * dev, comedi_subdevice * s,
+static int ni_eeprom_insn_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int ni_m_series_eeprom_insn_read(comedi_device * dev,
+static int ni_m_series_eeprom_insn_read(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
-static int ni_pfi_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int ni_pfi_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int ni_pfi_insn_config(comedi_device * dev, comedi_subdevice * s,
+static int ni_pfi_insn_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static unsigned ni_old_get_pfi_routing(comedi_device * dev, unsigned chan);
+static unsigned ni_old_get_pfi_routing(struct comedi_device * dev, unsigned chan);
-static void ni_rtsi_init(comedi_device * dev);
-static int ni_rtsi_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static void ni_rtsi_init(struct comedi_device * dev);
+static int ni_rtsi_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int ni_rtsi_insn_config(comedi_device * dev, comedi_subdevice * s,
+static int ni_rtsi_insn_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static void caldac_setup(comedi_device * dev, comedi_subdevice * s);
-static int ni_read_eeprom(comedi_device * dev, int addr);
+static void caldac_setup(struct comedi_device * dev, comedi_subdevice * s);
+static int ni_read_eeprom(struct comedi_device * dev, int addr);
#ifdef DEBUG_STATUS_A
static void ni_mio_print_status_a(int status);
@@ -248,58 +248,58 @@ static void ni_mio_print_status_b(int status);
#define ni_mio_print_status_b(a)
#endif
-static int ni_ai_reset(comedi_device * dev, comedi_subdevice * s);
+static int ni_ai_reset(struct comedi_device * dev, comedi_subdevice * s);
#ifndef PCIDMA
-static void ni_handle_fifo_half_full(comedi_device * dev);
-static int ni_ao_fifo_half_empty(comedi_device * dev, comedi_subdevice * s);
+static void ni_handle_fifo_half_full(struct comedi_device * dev);
+static int ni_ao_fifo_half_empty(struct comedi_device * dev, comedi_subdevice * s);
#endif
-static void ni_handle_fifo_dregs(comedi_device * dev);
-static int ni_ai_inttrig(comedi_device * dev, comedi_subdevice * s,
+static void ni_handle_fifo_dregs(struct comedi_device * dev);
+static int ni_ai_inttrig(struct comedi_device * dev, comedi_subdevice * s,
unsigned int trignum);
-static void ni_load_channelgain_list(comedi_device * dev, unsigned int n_chan,
+static void ni_load_channelgain_list(struct comedi_device * dev, unsigned int n_chan,
unsigned int *list);
-static void shutdown_ai_command(comedi_device * dev);
+static void shutdown_ai_command(struct comedi_device * dev);
-static int ni_ao_inttrig(comedi_device * dev, comedi_subdevice * s,
+static int ni_ao_inttrig(struct comedi_device * dev, comedi_subdevice * s,
unsigned int trignum);
-static int ni_ao_reset(comedi_device * dev, comedi_subdevice * s);
+static int ni_ao_reset(struct comedi_device * dev, comedi_subdevice * s);
static int ni_8255_callback(int dir, int port, int data, unsigned long arg);
-static int ni_gpct_insn_write(comedi_device * dev, comedi_subdevice * s,
+static int ni_gpct_insn_write(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int ni_gpct_insn_read(comedi_device * dev, comedi_subdevice * s,
+static int ni_gpct_insn_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int ni_gpct_insn_config(comedi_device * dev, comedi_subdevice * s,
+static int ni_gpct_insn_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int ni_gpct_cmd(comedi_device * dev, comedi_subdevice * s);
-static int ni_gpct_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int ni_gpct_cmd(struct comedi_device * dev, comedi_subdevice * s);
+static int ni_gpct_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd);
-static int ni_gpct_cancel(comedi_device * dev, comedi_subdevice * s);
-static void handle_gpct_interrupt(comedi_device * dev,
+static int ni_gpct_cancel(struct comedi_device * dev, comedi_subdevice * s);
+static void handle_gpct_interrupt(struct comedi_device * dev,
unsigned short counter_index);
-static int init_cs5529(comedi_device * dev);
-static int cs5529_do_conversion(comedi_device * dev, unsigned short *data);
-static int cs5529_ai_insn_read(comedi_device * dev, comedi_subdevice * s,
+static int init_cs5529(struct comedi_device * dev);
+static int cs5529_do_conversion(struct comedi_device * dev, unsigned short *data);
+static int cs5529_ai_insn_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
#ifdef NI_CS5529_DEBUG
-static unsigned int cs5529_config_read(comedi_device * dev,
+static unsigned int cs5529_config_read(struct comedi_device * dev,
unsigned int reg_select_bits);
#endif
-static void cs5529_config_write(comedi_device * dev, unsigned int value,
+static void cs5529_config_write(struct comedi_device * dev, unsigned int value,
unsigned int reg_select_bits);
-static int ni_m_series_pwm_config(comedi_device * dev, comedi_subdevice * s,
+static int ni_m_series_pwm_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int ni_6143_pwm_config(comedi_device * dev, comedi_subdevice * s,
+static int ni_6143_pwm_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int ni_set_master_clock(comedi_device * dev, unsigned source,
+static int ni_set_master_clock(struct comedi_device * dev, unsigned source,
unsigned period_ns);
-static void ack_a_interrupt(comedi_device * dev, unsigned short a_status);
-static void ack_b_interrupt(comedi_device * dev, unsigned short b_status);
+static void ack_a_interrupt(struct comedi_device * dev, unsigned short a_status);
+static void ack_b_interrupt(struct comedi_device * dev, unsigned short b_status);
enum aimodes {
AIMODE_NONE = 0,
@@ -353,14 +353,14 @@ enum timebase_nanoseconds {
static const int num_adc_stages_611x = 3;
-static void handle_a_interrupt(comedi_device * dev, unsigned short status,
+static void handle_a_interrupt(struct comedi_device * dev, unsigned short status,
unsigned ai_mite_status);
-static void handle_b_interrupt(comedi_device * dev, unsigned short status,
+static void handle_b_interrupt(struct comedi_device * dev, unsigned short status,
unsigned ao_mite_status);
-static void get_last_sample_611x(comedi_device * dev);
-static void get_last_sample_6143(comedi_device * dev);
+static void get_last_sample_611x(struct comedi_device * dev);
+static void get_last_sample_6143(struct comedi_device * dev);
-static inline void ni_set_bitfield(comedi_device * dev, int reg,
+static inline void ni_set_bitfield(struct comedi_device * dev, int reg,
unsigned bit_mask, unsigned bit_values)
{
unsigned long flags;
@@ -406,12 +406,12 @@ static inline void ni_set_bitfield(comedi_device * dev, int reg,
}
#ifdef PCIDMA
-static int ni_ai_drain_dma(comedi_device * dev);
+static int ni_ai_drain_dma(struct comedi_device * dev);
/* DMA channel setup */
// negative channel means no channel
-static inline void ni_set_ai_dma_channel(comedi_device * dev, int channel)
+static inline void ni_set_ai_dma_channel(struct comedi_device * dev, int channel)
{
unsigned bitfield;
@@ -426,7 +426,7 @@ static inline void ni_set_ai_dma_channel(comedi_device * dev, int channel)
}
// negative channel means no channel
-static inline void ni_set_ao_dma_channel(comedi_device * dev, int channel)
+static inline void ni_set_ao_dma_channel(struct comedi_device * dev, int channel)
{
unsigned bitfield;
@@ -441,7 +441,7 @@ static inline void ni_set_ao_dma_channel(comedi_device * dev, int channel)
}
// negative mite_channel means no channel
-static inline void ni_set_gpct_dma_channel(comedi_device * dev,
+static inline void ni_set_gpct_dma_channel(struct comedi_device * dev,
unsigned gpct_index, int mite_channel)
{
unsigned bitfield;
@@ -456,7 +456,7 @@ static inline void ni_set_gpct_dma_channel(comedi_device * dev,
}
// negative mite_channel means no channel
-static inline void ni_set_cdo_dma_channel(comedi_device * dev, int mite_channel)
+static inline void ni_set_cdo_dma_channel(struct comedi_device * dev, int mite_channel)
{
unsigned long flags;
@@ -475,7 +475,7 @@ static inline void ni_set_cdo_dma_channel(comedi_device * dev, int mite_channel)
comedi_spin_unlock_irqrestore(&devpriv->soft_reg_copy_lock, flags);
}
-static int ni_request_ai_mite_channel(comedi_device * dev)
+static int ni_request_ai_mite_channel(struct comedi_device * dev)
{
unsigned long flags;
@@ -496,7 +496,7 @@ static int ni_request_ai_mite_channel(comedi_device * dev)
return 0;
}
-static int ni_request_ao_mite_channel(comedi_device * dev)
+static int ni_request_ao_mite_channel(struct comedi_device * dev)
{
unsigned long flags;
@@ -517,7 +517,7 @@ static int ni_request_ao_mite_channel(comedi_device * dev)
return 0;
}
-static int ni_request_gpct_mite_channel(comedi_device * dev,
+static int ni_request_gpct_mite_channel(struct comedi_device * dev,
unsigned gpct_index, enum comedi_io_direction direction)
{
unsigned long flags;
@@ -546,7 +546,7 @@ static int ni_request_gpct_mite_channel(comedi_device * dev,
#endif // PCIDMA
-static int ni_request_cdo_mite_channel(comedi_device * dev)
+static int ni_request_cdo_mite_channel(struct comedi_device * dev)
{
#ifdef PCIDMA
unsigned long flags;
@@ -569,7 +569,7 @@ static int ni_request_cdo_mite_channel(comedi_device * dev)
return 0;
}
-static void ni_release_ai_mite_channel(comedi_device * dev)
+static void ni_release_ai_mite_channel(struct comedi_device * dev)
{
#ifdef PCIDMA
unsigned long flags;
@@ -584,7 +584,7 @@ static void ni_release_ai_mite_channel(comedi_device * dev)
#endif // PCIDMA
}
-static void ni_release_ao_mite_channel(comedi_device * dev)
+static void ni_release_ao_mite_channel(struct comedi_device * dev)
{
#ifdef PCIDMA
unsigned long flags;
@@ -599,7 +599,7 @@ static void ni_release_ao_mite_channel(comedi_device * dev)
#endif // PCIDMA
}
-void ni_release_gpct_mite_channel(comedi_device * dev, unsigned gpct_index)
+void ni_release_gpct_mite_channel(struct comedi_device * dev, unsigned gpct_index)
{
#ifdef PCIDMA
unsigned long flags;
@@ -619,7 +619,7 @@ void ni_release_gpct_mite_channel(comedi_device * dev, unsigned gpct_index)
#endif // PCIDMA
}
-static void ni_release_cdo_mite_channel(comedi_device * dev)
+static void ni_release_cdo_mite_channel(struct comedi_device * dev)
{
#ifdef PCIDMA
unsigned long flags;
@@ -636,7 +636,7 @@ static void ni_release_cdo_mite_channel(comedi_device * dev)
// e-series boards use the second irq signals to generate dma requests for their counters
#ifdef PCIDMA
-static void ni_e_series_enable_second_irq(comedi_device * dev,
+static void ni_e_series_enable_second_irq(struct comedi_device * dev,
unsigned gpct_index, short enable)
{
if (boardtype.reg_type & ni_reg_m_series_mask)
@@ -667,7 +667,7 @@ static void ni_e_series_enable_second_irq(comedi_device * dev,
}
#endif // PCIDMA
-static void ni_clear_ai_fifo(comedi_device * dev)
+static void ni_clear_ai_fifo(struct comedi_device * dev)
{
if (boardtype.reg_type == ni_reg_6143) {
// Flush the 6143 data FIFO
@@ -693,13 +693,13 @@ static void ni_clear_ai_fifo(comedi_device * dev)
}
}
-static void win_out2(comedi_device * dev, uint32_t data, int reg)
+static void win_out2(struct comedi_device * dev, uint32_t data, int reg)
{
devpriv->stc_writew(dev, data >> 16, reg);
devpriv->stc_writew(dev, data & 0xffff, reg + 1);
}
-static uint32_t win_in2(comedi_device * dev, int reg)
+static uint32_t win_in2(struct comedi_device * dev, int reg)
{
uint32_t bits;
bits = devpriv->stc_readw(dev, reg) << 16;
@@ -708,7 +708,7 @@ static uint32_t win_in2(comedi_device * dev, int reg)
}
#define ao_win_out(data,addr) ni_ao_win_outw(dev,data,addr)
-static inline void ni_ao_win_outw(comedi_device * dev, uint16_t data, int addr)
+static inline void ni_ao_win_outw(struct comedi_device * dev, uint16_t data, int addr)
{
unsigned long flags;
@@ -718,7 +718,7 @@ static inline void ni_ao_win_outw(comedi_device * dev, uint16_t data, int addr)
comedi_spin_unlock_irqrestore(&devpriv->window_lock, flags);
}
-static inline void ni_ao_win_outl(comedi_device * dev, uint32_t data, int addr)
+static inline void ni_ao_win_outl(struct comedi_device * dev, uint32_t data, int addr)
{
unsigned long flags;
@@ -728,7 +728,7 @@ static inline void ni_ao_win_outl(comedi_device * dev, uint32_t data, int addr)
comedi_spin_unlock_irqrestore(&devpriv->window_lock, flags);
}
-static inline unsigned short ni_ao_win_inw(comedi_device * dev, int addr)
+static inline unsigned short ni_ao_win_inw(struct comedi_device * dev, int addr)
{
unsigned long flags;
unsigned short data;
@@ -750,7 +750,7 @@ static inline unsigned short ni_ao_win_inw(comedi_device * dev, int addr)
*
* value should only be 1 or 0.
*/
-static inline void ni_set_bits(comedi_device * dev, int reg, unsigned bits,
+static inline void ni_set_bits(struct comedi_device * dev, int reg, unsigned bits,
unsigned value)
{
unsigned bit_values;
@@ -764,7 +764,7 @@ static inline void ni_set_bits(comedi_device * dev, int reg, unsigned bits,
static irqreturn_t ni_E_interrupt(int irq, void *d PT_REGS_ARG)
{
- comedi_device *dev = d;
+ struct comedi_device *dev = d;
unsigned short a_status;
unsigned short b_status;
unsigned int ai_mite_status = 0;
@@ -823,7 +823,7 @@ static irqreturn_t ni_E_interrupt(int irq, void *d PT_REGS_ARG)
}
#ifdef PCIDMA
-static void ni_sync_ai_dma(comedi_device * dev)
+static void ni_sync_ai_dma(struct comedi_device * dev)
{
comedi_subdevice *s = dev->subdevices + NI_AI_SUBDEV;
unsigned long flags;
@@ -834,7 +834,7 @@ static void ni_sync_ai_dma(comedi_device * dev)
comedi_spin_unlock_irqrestore(&devpriv->mite_channel_lock, flags);
}
-static void mite_handle_b_linkc(struct mite_struct *mite, comedi_device * dev)
+static void mite_handle_b_linkc(struct mite_struct *mite, struct comedi_device * dev)
{
comedi_subdevice *s = dev->subdevices + NI_AO_SUBDEV;
unsigned long flags;
@@ -846,7 +846,7 @@ static void mite_handle_b_linkc(struct mite_struct *mite, comedi_device * dev)
comedi_spin_unlock_irqrestore(&devpriv->mite_channel_lock, flags);
}
-static int ni_ao_wait_for_dma_load(comedi_device * dev)
+static int ni_ao_wait_for_dma_load(struct comedi_device * dev)
{
static const int timeout = 10000;
int i;
@@ -868,7 +868,7 @@ static int ni_ao_wait_for_dma_load(comedi_device * dev)
}
#endif //PCIDMA
-static void ni_handle_eos(comedi_device * dev, comedi_subdevice * s)
+static void ni_handle_eos(struct comedi_device * dev, comedi_subdevice * s)
{
if (devpriv->aimode == AIMODE_SCAN) {
#ifdef PCIDMA
@@ -892,7 +892,7 @@ static void ni_handle_eos(comedi_device * dev, comedi_subdevice * s)
}
}
-static void shutdown_ai_command(comedi_device * dev)
+static void shutdown_ai_command(struct comedi_device * dev)
{
comedi_subdevice *s = dev->subdevices + NI_AI_SUBDEV;
@@ -906,7 +906,7 @@ static void shutdown_ai_command(comedi_device * dev)
s->async->events |= COMEDI_CB_EOA;
}
-static void ni_event(comedi_device * dev, comedi_subdevice * s)
+static void ni_event(struct comedi_device * dev, comedi_subdevice * s)
{
if (s->async->
events & (COMEDI_CB_ERROR | COMEDI_CB_OVERFLOW | COMEDI_CB_EOA))
@@ -932,7 +932,7 @@ static void ni_event(comedi_device * dev, comedi_subdevice * s)
comedi_event(dev, s);
}
-static void handle_gpct_interrupt(comedi_device * dev,
+static void handle_gpct_interrupt(struct comedi_device * dev,
unsigned short counter_index)
{
#ifdef PCIDMA
@@ -945,7 +945,7 @@ static void handle_gpct_interrupt(comedi_device * dev,
#endif
}
-static void ack_a_interrupt(comedi_device * dev, unsigned short a_status)
+static void ack_a_interrupt(struct comedi_device * dev, unsigned short a_status)
{
unsigned short ack = 0;
@@ -966,7 +966,7 @@ static void ack_a_interrupt(comedi_device * dev, unsigned short a_status)
devpriv->stc_writew(dev, ack, Interrupt_A_Ack_Register);
}
-static void handle_a_interrupt(comedi_device * dev, unsigned short status,
+static void handle_a_interrupt(struct comedi_device * dev, unsigned short status,
unsigned ai_mite_status)
{
comedi_subdevice *s = dev->subdevices + NI_AI_SUBDEV;
@@ -1070,7 +1070,7 @@ static void handle_a_interrupt(comedi_device * dev, unsigned short status,
#endif
}
-static void ack_b_interrupt(comedi_device * dev, unsigned short b_status)
+static void ack_b_interrupt(struct comedi_device * dev, unsigned short b_status)
{
unsigned short ack = 0;
if (b_status & AO_BC_TC_St) {
@@ -1098,7 +1098,7 @@ static void ack_b_interrupt(comedi_device * dev, unsigned short b_status)
devpriv->stc_writew(dev, ack, Interrupt_B_Ack_Register);
}
-static void handle_b_interrupt(comedi_device * dev, unsigned short b_status,
+static void handle_b_interrupt(struct comedi_device * dev, unsigned short b_status,
unsigned ao_mite_status)
{
comedi_subdevice *s = dev->subdevices + NI_AO_SUBDEV;
@@ -1204,7 +1204,7 @@ static void ni_mio_print_status_b(int status)
#ifndef PCIDMA
-static void ni_ao_fifo_load(comedi_device * dev, comedi_subdevice * s, int n)
+static void ni_ao_fifo_load(struct comedi_device * dev, comedi_subdevice * s, int n)
{
comedi_async *async = s->async;
comedi_cmd *cmd = &async->cmd;
@@ -1263,7 +1263,7 @@ static void ni_ao_fifo_load(comedi_device * dev, comedi_subdevice * s, int n)
* RT code, as RT code might purposely be running close to the
* metal. Needs to be fixed eventually.
*/
-static int ni_ao_fifo_half_empty(comedi_device * dev, comedi_subdevice * s)
+static int ni_ao_fifo_half_empty(struct comedi_device * dev, comedi_subdevice * s)
{
int n;
@@ -1284,7 +1284,7 @@ static int ni_ao_fifo_half_empty(comedi_device * dev, comedi_subdevice * s)
return 1;
}
-static int ni_ao_prep_fifo(comedi_device * dev, comedi_subdevice * s)
+static int ni_ao_prep_fifo(struct comedi_device * dev, comedi_subdevice * s)
{
int n;
@@ -1307,7 +1307,7 @@ static int ni_ao_prep_fifo(comedi_device * dev, comedi_subdevice * s)
return n;
}
-static void ni_ai_fifo_read(comedi_device * dev, comedi_subdevice * s, int n)
+static void ni_ai_fifo_read(struct comedi_device * dev, comedi_subdevice * s, int n)
{
comedi_async *async = s->async;
int i;
@@ -1364,7 +1364,7 @@ static void ni_ai_fifo_read(comedi_device * dev, comedi_subdevice * s, int n)
}
}
-static void ni_handle_fifo_half_full(comedi_device * dev)
+static void ni_handle_fifo_half_full(struct comedi_device * dev)
{
int n;
comedi_subdevice *s = dev->subdevices + NI_AI_SUBDEV;
@@ -1376,7 +1376,7 @@ static void ni_handle_fifo_half_full(comedi_device * dev)
#endif
#ifdef PCIDMA
-static int ni_ai_drain_dma(comedi_device * dev)
+static int ni_ai_drain_dma(struct comedi_device * dev)
{
int i;
static const int timeout = 10000;
@@ -1414,7 +1414,7 @@ static int ni_ai_drain_dma(comedi_device * dev)
/*
Empties the AI fifo
*/
-static void ni_handle_fifo_dregs(comedi_device * dev)
+static void ni_handle_fifo_dregs(struct comedi_device * dev)
{
comedi_subdevice *s = dev->subdevices + NI_AI_SUBDEV;
short data[2];
@@ -1476,7 +1476,7 @@ static void ni_handle_fifo_dregs(comedi_device * dev)
}
}
-static void get_last_sample_611x(comedi_device * dev)
+static void get_last_sample_611x(struct comedi_device * dev)
{
comedi_subdevice *s = dev->subdevices + NI_AI_SUBDEV;
short data;
@@ -1493,7 +1493,7 @@ static void get_last_sample_611x(comedi_device * dev)
}
}
-static void get_last_sample_6143(comedi_device * dev)
+static void get_last_sample_6143(struct comedi_device * dev)
{
comedi_subdevice *s = dev->subdevices + NI_AI_SUBDEV;
short data;
@@ -1513,7 +1513,7 @@ static void get_last_sample_6143(comedi_device * dev)
}
}
-static void ni_ai_munge(comedi_device * dev, comedi_subdevice * s,
+static void ni_ai_munge(struct comedi_device * dev, comedi_subdevice * s,
void *data, unsigned int num_bytes, unsigned int chan_index)
{
comedi_async *async = s->async;
@@ -1539,7 +1539,7 @@ static void ni_ai_munge(comedi_device * dev, comedi_subdevice * s,
#ifdef PCIDMA
-static int ni_ai_setup_MITE_dma(comedi_device * dev)
+static int ni_ai_setup_MITE_dma(struct comedi_device * dev)
{
comedi_subdevice *s = dev->subdevices + NI_AI_SUBDEV;
int retval;
@@ -1579,7 +1579,7 @@ static int ni_ai_setup_MITE_dma(comedi_device * dev)
return 0;
}
-static int ni_ao_setup_MITE_dma(comedi_device * dev)
+static int ni_ao_setup_MITE_dma(struct comedi_device * dev)
{
comedi_subdevice *s = dev->subdevices + NI_AO_SUBDEV;
int retval;
@@ -1617,7 +1617,7 @@ static int ni_ao_setup_MITE_dma(comedi_device * dev)
this is pretty harsh for a cancel, but it works...
*/
-static int ni_ai_reset(comedi_device * dev, comedi_subdevice * s)
+static int ni_ai_reset(struct comedi_device * dev, comedi_subdevice * s)
{
ni_release_ai_mite_channel(dev);
/* ai configuration */
@@ -1698,7 +1698,7 @@ static int ni_ai_reset(comedi_device * dev, comedi_subdevice * s)
return 0;
}
-static int ni_ai_poll(comedi_device * dev, comedi_subdevice * s)
+static int ni_ai_poll(struct comedi_device * dev, comedi_subdevice * s)
{
unsigned long flags = 0;
int count;
@@ -1718,7 +1718,7 @@ static int ni_ai_poll(comedi_device * dev, comedi_subdevice * s)
return count;
}
-static int ni_ai_insn_read(comedi_device * dev, comedi_subdevice * s,
+static int ni_ai_insn_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i, n;
@@ -1814,7 +1814,7 @@ static int ni_ai_insn_read(comedi_device * dev, comedi_subdevice * s,
return insn->n;
}
-void ni_prime_channelgain_list(comedi_device * dev)
+void ni_prime_channelgain_list(struct comedi_device * dev)
{
int i;
devpriv->stc_writew(dev, AI_CONVERT_Pulse, AI_Command_1_Register);
@@ -1830,7 +1830,7 @@ void ni_prime_channelgain_list(comedi_device * dev)
rt_printk("ni_mio_common: timeout loading channel/gain list\n");
}
-static void ni_m_series_load_channelgain_list(comedi_device * dev,
+static void ni_m_series_load_channelgain_list(struct comedi_device * dev,
unsigned int n_chan, unsigned int *list)
{
unsigned int chan, range, aref;
@@ -1935,7 +1935,7 @@ static void ni_m_series_load_channelgain_list(comedi_device * dev,
* bits 0-2: channel
* valid channels are 0-3
*/
-static void ni_load_channelgain_list(comedi_device * dev, unsigned int n_chan,
+static void ni_load_channelgain_list(struct comedi_device * dev, unsigned int n_chan,
unsigned int *list)
{
unsigned int chan, range, aref;
@@ -2055,7 +2055,7 @@ static void ni_load_channelgain_list(comedi_device * dev, unsigned int n_chan,
}
}
-static int ni_ns_to_timer(const comedi_device * dev, unsigned nanosec,
+static int ni_ns_to_timer(const struct comedi_device * dev, unsigned nanosec,
int round_mode)
{
int divider;
@@ -2074,12 +2074,12 @@ static int ni_ns_to_timer(const comedi_device * dev, unsigned nanosec,
return divider - 1;
}
-static unsigned ni_timer_to_ns(const comedi_device * dev, int timer)
+static unsigned ni_timer_to_ns(const struct comedi_device * dev, int timer)
{
return devpriv->clock_ns * (timer + 1);
}
-static unsigned ni_min_ai_scan_period_ns(comedi_device * dev,
+static unsigned ni_min_ai_scan_period_ns(struct comedi_device * dev,
unsigned num_channels)
{
switch (boardtype.reg_type) {
@@ -2095,7 +2095,7 @@ static unsigned ni_min_ai_scan_period_ns(comedi_device * dev,
return boardtype.ai_speed * num_channels;
}
-static int ni_ai_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int ni_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
@@ -2308,7 +2308,7 @@ static int ni_ai_cmdtest(comedi_device * dev, comedi_subdevice * s,
return 0;
}
-static int ni_ai_cmd(comedi_device * dev, comedi_subdevice * s)
+static int ni_ai_cmd(struct comedi_device * dev, comedi_subdevice * s)
{
const comedi_cmd *cmd = &s->async->cmd;
int timer;
@@ -2612,7 +2612,7 @@ static int ni_ai_cmd(comedi_device * dev, comedi_subdevice * s)
return 0;
}
-static int ni_ai_inttrig(comedi_device * dev, comedi_subdevice * s,
+static int ni_ai_inttrig(struct comedi_device * dev, comedi_subdevice * s,
unsigned int trignum)
{
if (trignum != 0)
@@ -2625,10 +2625,10 @@ static int ni_ai_inttrig(comedi_device * dev, comedi_subdevice * s,
return 1;
}
-static int ni_ai_config_analog_trig(comedi_device * dev, comedi_subdevice * s,
+static int ni_ai_config_analog_trig(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int ni_ai_insn_config(comedi_device * dev, comedi_subdevice * s,
+static int ni_ai_insn_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n < 1)
@@ -2679,7 +2679,7 @@ static int ni_ai_insn_config(comedi_device * dev, comedi_subdevice * s,
return -EINVAL;
}
-static int ni_ai_config_analog_trig(comedi_device * dev, comedi_subdevice * s,
+static int ni_ai_config_analog_trig(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int a, b, modebits;
@@ -2777,7 +2777,7 @@ static int ni_ai_config_analog_trig(comedi_device * dev, comedi_subdevice * s,
}
/* munge data from unsigned to 2's complement for analog output bipolar modes */
-static void ni_ao_munge(comedi_device * dev, comedi_subdevice * s,
+static void ni_ao_munge(struct comedi_device * dev, comedi_subdevice * s,
void *data, unsigned int num_bytes, unsigned int chan_index)
{
comedi_async *async = s->async;
@@ -2800,7 +2800,7 @@ static void ni_ao_munge(comedi_device * dev, comedi_subdevice * s,
}
}
-static int ni_m_series_ao_config_chanlist(comedi_device * dev,
+static int ni_m_series_ao_config_chanlist(struct comedi_device * dev,
comedi_subdevice * s, unsigned int chanspec[], unsigned int n_chans,
int timed)
{
@@ -2869,7 +2869,7 @@ static int ni_m_series_ao_config_chanlist(comedi_device * dev,
return invert;
}
-static int ni_old_ao_config_chanlist(comedi_device * dev, comedi_subdevice * s,
+static int ni_old_ao_config_chanlist(struct comedi_device * dev, comedi_subdevice * s,
unsigned int chanspec[], unsigned int n_chans)
{
unsigned int range;
@@ -2912,7 +2912,7 @@ static int ni_old_ao_config_chanlist(comedi_device * dev, comedi_subdevice * s,
return invert;
}
-static int ni_ao_config_chanlist(comedi_device * dev, comedi_subdevice * s,
+static int ni_ao_config_chanlist(struct comedi_device * dev, comedi_subdevice * s,
unsigned int chanspec[], unsigned int n_chans, int timed)
{
if (boardtype.reg_type & ni_reg_m_series_mask)
@@ -2921,7 +2921,7 @@ static int ni_ao_config_chanlist(comedi_device * dev, comedi_subdevice * s,
else
return ni_old_ao_config_chanlist(dev, s, chanspec, n_chans);
}
-static int ni_ao_insn_read(comedi_device * dev, comedi_subdevice * s,
+static int ni_ao_insn_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
data[0] = devpriv->ao[CR_CHAN(insn->chanspec)];
@@ -2929,7 +2929,7 @@ static int ni_ao_insn_read(comedi_device * dev, comedi_subdevice * s,
return 1;
}
-static int ni_ao_insn_write(comedi_device * dev, comedi_subdevice * s,
+static int ni_ao_insn_write(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int chan = CR_CHAN(insn->chanspec);
@@ -2948,7 +2948,7 @@ static int ni_ao_insn_write(comedi_device * dev, comedi_subdevice * s,
return 1;
}
-static int ni_ao_insn_write_671x(comedi_device * dev, comedi_subdevice * s,
+static int ni_ao_insn_write_671x(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int chan = CR_CHAN(insn->chanspec);
@@ -2965,7 +2965,7 @@ static int ni_ao_insn_write_671x(comedi_device * dev, comedi_subdevice * s,
return 1;
}
-static int ni_ao_insn_config(comedi_device * dev, comedi_subdevice * s,
+static int ni_ao_insn_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
switch (data[0]) {
@@ -2991,7 +2991,7 @@ static int ni_ao_insn_config(comedi_device * dev, comedi_subdevice * s,
return -EINVAL;
}
-static int ni_ao_inttrig(comedi_device * dev, comedi_subdevice * s,
+static int ni_ao_inttrig(struct comedi_device * dev, comedi_subdevice * s,
unsigned int trignum)
{
int ret;
@@ -3062,7 +3062,7 @@ static int ni_ao_inttrig(comedi_device * dev, comedi_subdevice * s,
return 0;
}
-static int ni_ao_cmd(comedi_device * dev, comedi_subdevice * s)
+static int ni_ao_cmd(struct comedi_device * dev, comedi_subdevice * s)
{
const comedi_cmd *cmd = &s->async->cmd;
int bits;
@@ -3261,7 +3261,7 @@ static int ni_ao_cmd(comedi_device * dev, comedi_subdevice * s)
return 0;
}
-static int ni_ao_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int ni_ao_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
@@ -3384,7 +3384,7 @@ static int ni_ao_cmdtest(comedi_device * dev, comedi_subdevice * s,
return 0;
}
-static int ni_ao_reset(comedi_device * dev, comedi_subdevice * s)
+static int ni_ao_reset(struct comedi_device * dev, comedi_subdevice * s)
{
//devpriv->ao0p=0x0000;
//ni_writew(devpriv->ao0p,AO_Configuration);
@@ -3436,7 +3436,7 @@ static int ni_ao_reset(comedi_device * dev, comedi_subdevice * s)
// digital io
-static int ni_dio_insn_config(comedi_device * dev, comedi_subdevice * s,
+static int ni_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
#ifdef DEBUG_DIO
@@ -3468,7 +3468,7 @@ static int ni_dio_insn_config(comedi_device * dev, comedi_subdevice * s,
return 1;
}
-static int ni_dio_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int ni_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
#ifdef DEBUG_DIO
@@ -3495,7 +3495,7 @@ static int ni_dio_insn_bits(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int ni_m_series_dio_insn_config(comedi_device * dev,
+static int ni_m_series_dio_insn_config(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
#ifdef DEBUG_DIO
@@ -3525,7 +3525,7 @@ static int ni_m_series_dio_insn_config(comedi_device * dev,
return 1;
}
-static int ni_m_series_dio_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int ni_m_series_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
#ifdef DEBUG_DIO
@@ -3544,7 +3544,7 @@ static int ni_m_series_dio_insn_bits(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int ni_cdio_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int ni_cdio_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
@@ -3653,7 +3653,7 @@ static int ni_cdio_cmdtest(comedi_device * dev, comedi_subdevice * s,
return 0;
}
-static int ni_cdio_cmd(comedi_device * dev, comedi_subdevice * s)
+static int ni_cdio_cmd(struct comedi_device * dev, comedi_subdevice * s)
{
const comedi_cmd *cmd = &s->async->cmd;
unsigned cdo_mode_bits = CDO_FIFO_Mode_Bit | CDO_Halt_On_Error_Bit;
@@ -3690,7 +3690,7 @@ static int ni_cdio_cmd(comedi_device * dev, comedi_subdevice * s)
return 0;
}
-static int ni_cdo_inttrig(comedi_device * dev, comedi_subdevice * s,
+static int ni_cdo_inttrig(struct comedi_device * dev, comedi_subdevice * s,
unsigned int trignum)
{
#ifdef PCIDMA
@@ -3736,7 +3736,7 @@ static int ni_cdo_inttrig(comedi_device * dev, comedi_subdevice * s,
return retval;
}
-static int ni_cdio_cancel(comedi_device * dev, comedi_subdevice * s)
+static int ni_cdio_cancel(struct comedi_device * dev, comedi_subdevice * s)
{
ni_writel(CDO_Disarm_Bit | CDO_Error_Interrupt_Enable_Clear_Bit |
CDO_Empty_FIFO_Interrupt_Enable_Clear_Bit |
@@ -3749,7 +3749,7 @@ static int ni_cdio_cancel(comedi_device * dev, comedi_subdevice * s)
return 0;
}
-static void handle_cdio_interrupt(comedi_device * dev)
+static void handle_cdio_interrupt(struct comedi_device * dev)
{
unsigned cdio_status;
comedi_subdevice *s = dev->subdevices + NI_DIO_SUBDEV;
@@ -3790,7 +3790,7 @@ static void handle_cdio_interrupt(comedi_device * dev)
ni_event(dev, s);
}
-static int ni_serial_insn_config(comedi_device * dev, comedi_subdevice * s,
+static int ni_serial_insn_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int err = insn->n;
@@ -3884,7 +3884,7 @@ static int ni_serial_insn_config(comedi_device * dev, comedi_subdevice * s,
}
-static int ni_serial_hw_readwrite8(comedi_device * dev, comedi_subdevice * s,
+static int ni_serial_hw_readwrite8(struct comedi_device * dev, comedi_subdevice * s,
unsigned char data_out, unsigned char *data_in)
{
unsigned int status1;
@@ -3940,7 +3940,7 @@ static int ni_serial_hw_readwrite8(comedi_device * dev, comedi_subdevice * s,
return err;
}
-static int ni_serial_sw_readwrite8(comedi_device * dev, comedi_subdevice * s,
+static int ni_serial_sw_readwrite8(struct comedi_device * dev, comedi_subdevice * s,
unsigned char data_out, unsigned char *data_in)
{
unsigned char mask, input = 0;
@@ -3993,7 +3993,7 @@ static int ni_serial_sw_readwrite8(comedi_device * dev, comedi_subdevice * s,
return 0;
}
-static void mio_common_detach(comedi_device * dev)
+static void mio_common_detach(struct comedi_device * dev)
{
if (dev->private) {
if (devpriv->counter_dev) {
@@ -4004,7 +4004,7 @@ static void mio_common_detach(comedi_device * dev)
subdev_8255_cleanup(dev, dev->subdevices + NI_8255_DIO_SUBDEV);
}
-static void init_ao_67xx(comedi_device * dev, comedi_subdevice * s)
+static void init_ao_67xx(struct comedi_device * dev, comedi_subdevice * s)
{
int i;
@@ -4111,7 +4111,7 @@ static unsigned ni_gpct_to_stc_register(enum ni_gpct_register reg)
static void ni_gpct_write_register(struct ni_gpct *counter, unsigned bits,
enum ni_gpct_register reg)
{
- comedi_device *dev = counter->counter_dev->dev;
+ struct comedi_device *dev = counter->counter_dev->dev;
unsigned stc_register;
/* bits in the join reset register which are relevant to counters */
static const unsigned gpct_joint_reset_mask = G0_Reset | G1_Reset;
@@ -4179,7 +4179,7 @@ static void ni_gpct_write_register(struct ni_gpct *counter, unsigned bits,
static unsigned ni_gpct_read_register(struct ni_gpct *counter,
enum ni_gpct_register reg)
{
- comedi_device *dev = counter->counter_dev->dev;
+ struct comedi_device *dev = counter->counter_dev->dev;
unsigned stc_register;
switch (reg) {
/* m-series only registers */
@@ -4208,14 +4208,14 @@ static unsigned ni_gpct_read_register(struct ni_gpct *counter,
return 0;
}
-static int ni_freq_out_insn_read(comedi_device * dev,
+static int ni_freq_out_insn_read(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
data[0] = devpriv->clock_and_fout & FOUT_Divider_mask;
return 1;
}
-static int ni_freq_out_insn_write(comedi_device * dev,
+static int ni_freq_out_insn_write(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
devpriv->clock_and_fout &= ~FOUT_Enable;
@@ -4229,7 +4229,7 @@ static int ni_freq_out_insn_write(comedi_device * dev,
return insn->n;
}
-static int ni_set_freq_out_clock(comedi_device * dev, unsigned int clock_source)
+static int ni_set_freq_out_clock(struct comedi_device * dev, unsigned int clock_source)
{
switch (clock_source) {
case NI_FREQ_OUT_TIMEBASE_1_DIV_2_CLOCK_SRC:
@@ -4246,7 +4246,7 @@ static int ni_set_freq_out_clock(comedi_device * dev, unsigned int clock_source)
return 3;
}
-static void ni_get_freq_out_clock(comedi_device * dev, unsigned int * clock_source,
+static void ni_get_freq_out_clock(struct comedi_device * dev, unsigned int * clock_source,
unsigned int * clock_period_ns)
{
if (devpriv->clock_and_fout & FOUT_Timebase_Select) {
@@ -4258,7 +4258,7 @@ static void ni_get_freq_out_clock(comedi_device * dev, unsigned int * clock_sour
}
}
-static int ni_freq_out_insn_config(comedi_device * dev, comedi_subdevice * s,
+static int ni_freq_out_insn_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
switch (data[0]) {
@@ -4274,7 +4274,7 @@ static int ni_freq_out_insn_config(comedi_device * dev, comedi_subdevice * s,
return -EINVAL;
}
-static int ni_alloc_private(comedi_device * dev)
+static int ni_alloc_private(struct comedi_device * dev)
{
int ret;
@@ -4289,7 +4289,7 @@ static int ni_alloc_private(comedi_device * dev)
return 0;
};
-static int ni_E_init(comedi_device * dev, comedi_devconfig * it)
+static int ni_E_init(struct comedi_device * dev, comedi_devconfig * it)
{
comedi_subdevice *s;
unsigned j;
@@ -4609,7 +4609,7 @@ static int ni_E_init(comedi_device * dev, comedi_devconfig * it)
static int ni_8255_callback(int dir, int port, int data, unsigned long arg)
{
- comedi_device *dev = (comedi_device *) arg;
+ struct comedi_device *dev = (struct comedi_device *) arg;
if (dir) {
ni_writeb(data, Port_A + 2 * port);
@@ -4623,7 +4623,7 @@ static int ni_8255_callback(int dir, int port, int data, unsigned long arg)
presents the EEPROM as a subdevice
*/
-static int ni_eeprom_insn_read(comedi_device * dev, comedi_subdevice * s,
+static int ni_eeprom_insn_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
data[0] = ni_read_eeprom(dev, CR_CHAN(insn->chanspec));
@@ -4635,7 +4635,7 @@ static int ni_eeprom_insn_read(comedi_device * dev, comedi_subdevice * s,
reads bytes out of eeprom
*/
-static int ni_read_eeprom(comedi_device * dev, int addr)
+static int ni_read_eeprom(struct comedi_device * dev, int addr)
{
int bit;
int bitstring;
@@ -4659,7 +4659,7 @@ static int ni_read_eeprom(comedi_device * dev, int addr)
return bitstring;
}
-static int ni_m_series_eeprom_insn_read(comedi_device * dev,
+static int ni_m_series_eeprom_insn_read(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
data[0] = devpriv->eeprom_buffer[CR_CHAN(insn->chanspec)];
@@ -4667,14 +4667,14 @@ static int ni_m_series_eeprom_insn_read(comedi_device * dev,
return 1;
}
-static int ni_get_pwm_config(comedi_device * dev, unsigned int * data)
+static int ni_get_pwm_config(struct comedi_device * dev, unsigned int * data)
{
data[1] = devpriv->pwm_up_count * devpriv->clock_ns;
data[2] = devpriv->pwm_down_count * devpriv->clock_ns;
return 3;
}
-static int ni_m_series_pwm_config(comedi_device * dev, comedi_subdevice * s,
+static int ni_m_series_pwm_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned up_count, down_count;
@@ -4739,7 +4739,7 @@ static int ni_m_series_pwm_config(comedi_device * dev, comedi_subdevice * s,
return 0;
}
-static int ni_6143_pwm_config(comedi_device * dev, comedi_subdevice * s,
+static int ni_6143_pwm_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned up_count, down_count;
@@ -4802,11 +4802,11 @@ static int ni_6143_pwm_config(comedi_device * dev, comedi_subdevice * s,
return 0;
}
-static void ni_write_caldac(comedi_device * dev, int addr, int val);
+static void ni_write_caldac(struct comedi_device * dev, int addr, int val);
/*
calibration subdevice
*/
-static int ni_calib_insn_write(comedi_device * dev, comedi_subdevice * s,
+static int ni_calib_insn_write(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
ni_write_caldac(dev, CR_CHAN(insn->chanspec), data[0]);
@@ -4814,7 +4814,7 @@ static int ni_calib_insn_write(comedi_device * dev, comedi_subdevice * s,
return 1;
}
-static int ni_calib_insn_read(comedi_device * dev, comedi_subdevice * s,
+static int ni_calib_insn_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
data[0] = devpriv->caldacs[CR_CHAN(insn->chanspec)];
@@ -4845,7 +4845,7 @@ static struct caldac_struct caldacs[] = {
[ad8804_debug] = {16, 8, pack_ad8804},
};
-static void caldac_setup(comedi_device * dev, comedi_subdevice * s)
+static void caldac_setup(struct comedi_device * dev, comedi_subdevice * s)
{
int i, j;
int n_dacs;
@@ -4898,7 +4898,7 @@ static void caldac_setup(comedi_device * dev, comedi_subdevice * s)
}
}
-static void ni_write_caldac(comedi_device * dev, int addr, int val)
+static void ni_write_caldac(struct comedi_device * dev, int addr, int val)
{
unsigned int loadbit = 0, bits = 0, bit, bitstring = 0;
int i;
@@ -4985,7 +4985,7 @@ static int pack_ad8842(int addr, int val, int *bitstring)
/*
* Read the GPCTs current value.
*/
-static int GPCT_G_Watch(comedi_device * dev, int chan)
+static int GPCT_G_Watch(struct comedi_device * dev, int chan)
{
unsigned int hi1, hi2, lo;
@@ -5008,7 +5008,7 @@ static int GPCT_G_Watch(comedi_device * dev, int chan)
return (hi1 << 16) | lo;
}
-static void GPCT_Reset(comedi_device * dev, int chan)
+static void GPCT_Reset(struct comedi_device * dev, int chan)
{
int temp_ack_reg = 0;
@@ -5070,28 +5070,28 @@ static void GPCT_Reset(comedi_device * dev, int chan)
#endif
-static int ni_gpct_insn_config(comedi_device * dev, comedi_subdevice * s,
+static int ni_gpct_insn_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
struct ni_gpct *counter = s->private;
return ni_tio_insn_config(counter, insn, data);
}
-static int ni_gpct_insn_read(comedi_device * dev, comedi_subdevice * s,
+static int ni_gpct_insn_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
struct ni_gpct *counter = s->private;
return ni_tio_rinsn(counter, insn, data);
}
-static int ni_gpct_insn_write(comedi_device * dev, comedi_subdevice * s,
+static int ni_gpct_insn_write(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
struct ni_gpct *counter = s->private;
return ni_tio_winsn(counter, insn, data);
}
-static int ni_gpct_cmd(comedi_device * dev, comedi_subdevice * s)
+static int ni_gpct_cmd(struct comedi_device * dev, comedi_subdevice * s)
{
int retval;
#ifdef PCIDMA
@@ -5114,7 +5114,7 @@ static int ni_gpct_cmd(comedi_device * dev, comedi_subdevice * s)
return retval;
}
-static int ni_gpct_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int ni_gpct_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd)
{
#ifdef PCIDMA
@@ -5126,7 +5126,7 @@ static int ni_gpct_cmdtest(comedi_device * dev, comedi_subdevice * s,
#endif
}
-static int ni_gpct_cancel(comedi_device * dev, comedi_subdevice * s)
+static int ni_gpct_cancel(struct comedi_device * dev, comedi_subdevice * s)
{
#ifdef PCIDMA
struct ni_gpct *counter = s->private;
@@ -5147,7 +5147,7 @@ static int ni_gpct_cancel(comedi_device * dev, comedi_subdevice * s)
*
*/
-static int ni_m_series_set_pfi_routing(comedi_device * dev, unsigned chan,
+static int ni_m_series_set_pfi_routing(struct comedi_device * dev, unsigned chan,
unsigned source)
{
unsigned pfi_reg_index;
@@ -5165,7 +5165,7 @@ static int ni_m_series_set_pfi_routing(comedi_device * dev, unsigned chan,
return 2;
}
-static int ni_old_set_pfi_routing(comedi_device * dev, unsigned chan,
+static int ni_old_set_pfi_routing(struct comedi_device * dev, unsigned chan,
unsigned source)
{
// pre-m-series boards have fixed signals on pfi pins
@@ -5174,7 +5174,7 @@ static int ni_old_set_pfi_routing(comedi_device * dev, unsigned chan,
return 2;
}
-static int ni_set_pfi_routing(comedi_device * dev, unsigned chan,
+static int ni_set_pfi_routing(struct comedi_device * dev, unsigned chan,
unsigned source)
{
if (boardtype.reg_type & ni_reg_m_series_mask)
@@ -5183,14 +5183,14 @@ static int ni_set_pfi_routing(comedi_device * dev, unsigned chan,
return ni_old_set_pfi_routing(dev, chan, source);
}
-static unsigned ni_m_series_get_pfi_routing(comedi_device * dev, unsigned chan)
+static unsigned ni_m_series_get_pfi_routing(struct comedi_device * dev, unsigned chan)
{
const unsigned array_offset = chan / 3;
return MSeries_PFI_Output_Select_Source(chan,
devpriv->pfi_output_select_reg[array_offset]);
}
-static unsigned ni_old_get_pfi_routing(comedi_device * dev, unsigned chan)
+static unsigned ni_old_get_pfi_routing(struct comedi_device * dev, unsigned chan)
{
// pre-m-series boards have fixed signals on pfi pins
switch (chan) {
@@ -5231,7 +5231,7 @@ static unsigned ni_old_get_pfi_routing(comedi_device * dev, unsigned chan)
return 0;
}
-static unsigned ni_get_pfi_routing(comedi_device * dev, unsigned chan)
+static unsigned ni_get_pfi_routing(struct comedi_device * dev, unsigned chan)
{
if (boardtype.reg_type & ni_reg_m_series_mask)
return ni_m_series_get_pfi_routing(dev, chan);
@@ -5239,7 +5239,7 @@ static unsigned ni_get_pfi_routing(comedi_device * dev, unsigned chan)
return ni_old_get_pfi_routing(dev, chan);
}
-static int ni_config_filter(comedi_device * dev, unsigned pfi_channel,
+static int ni_config_filter(struct comedi_device * dev, unsigned pfi_channel,
enum ni_pfi_filter_select filter)
{
unsigned bits;
@@ -5253,7 +5253,7 @@ static int ni_config_filter(comedi_device * dev, unsigned pfi_channel,
return 0;
}
-static int ni_pfi_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int ni_pfi_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if ((boardtype.reg_type & ni_reg_m_series_mask) == 0) {
@@ -5268,7 +5268,7 @@ static int ni_pfi_insn_bits(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int ni_pfi_insn_config(comedi_device * dev, comedi_subdevice * s,
+static int ni_pfi_insn_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int chan;
@@ -5312,7 +5312,7 @@ static int ni_pfi_insn_config(comedi_device * dev, comedi_subdevice * s,
* NI RTSI Bus Functions
*
*/
-static void ni_rtsi_init(comedi_device * dev)
+static void ni_rtsi_init(struct comedi_device * dev)
{
// Initialises the RTSI bus signal switch to a default state
@@ -5345,7 +5345,7 @@ static void ni_rtsi_init(comedi_device * dev)
// devpriv->stc_writew(dev, 0x0000, RTSI_Board_Register);
}
-static int ni_rtsi_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int ni_rtsi_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
@@ -5401,7 +5401,7 @@ static int ni_mseries_get_pll_parameters(unsigned reference_period_ns,
return 0;
}
-static inline unsigned num_configurable_rtsi_channels(comedi_device * dev)
+static inline unsigned num_configurable_rtsi_channels(struct comedi_device * dev)
{
if (boardtype.reg_type & ni_reg_m_series_mask)
return 8;
@@ -5409,7 +5409,7 @@ static inline unsigned num_configurable_rtsi_channels(comedi_device * dev)
return 7;
}
-static int ni_mseries_set_pll_master_clock(comedi_device * dev, unsigned source,
+static int ni_mseries_set_pll_master_clock(struct comedi_device * dev, unsigned source,
unsigned period_ns)
{
static const unsigned min_period_ns = 50;
@@ -5504,7 +5504,7 @@ static int ni_mseries_set_pll_master_clock(comedi_device * dev, unsigned source,
return 3;
}
-static int ni_set_master_clock(comedi_device * dev, unsigned source,
+static int ni_set_master_clock(struct comedi_device * dev, unsigned source,
unsigned period_ns)
{
if (source == NI_MIO_INTERNAL_CLOCK) {
@@ -5548,7 +5548,7 @@ static int ni_set_master_clock(comedi_device * dev, unsigned source,
return 3;
}
-static int ni_valid_rtsi_output_source(comedi_device * dev, unsigned chan,
+static int ni_valid_rtsi_output_source(struct comedi_device * dev, unsigned chan,
unsigned source)
{
if (chan >= num_configurable_rtsi_channels(dev)) {
@@ -5589,7 +5589,7 @@ static int ni_valid_rtsi_output_source(comedi_device * dev, unsigned chan,
}
}
-static int ni_set_rtsi_routing(comedi_device * dev, unsigned chan,
+static int ni_set_rtsi_routing(struct comedi_device * dev, unsigned chan,
unsigned source)
{
if (ni_valid_rtsi_output_source(dev, chan, source) == 0)
@@ -5610,7 +5610,7 @@ static int ni_set_rtsi_routing(comedi_device * dev, unsigned chan,
return 2;
}
-static unsigned ni_get_rtsi_routing(comedi_device * dev, unsigned chan)
+static unsigned ni_get_rtsi_routing(struct comedi_device * dev, unsigned chan)
{
if (chan < 4) {
return RTSI_Trig_Output_Source(chan,
@@ -5626,7 +5626,7 @@ static unsigned ni_get_rtsi_routing(comedi_device * dev, unsigned chan)
}
}
-static int ni_rtsi_insn_config(comedi_device * dev, comedi_subdevice * s,
+static int ni_rtsi_insn_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int chan = CR_CHAN(insn->chanspec);
@@ -5698,7 +5698,7 @@ static int ni_rtsi_insn_config(comedi_device * dev, comedi_subdevice * s,
return 1;
}
-static int cs5529_wait_for_idle(comedi_device * dev)
+static int cs5529_wait_for_idle(struct comedi_device * dev)
{
unsigned short status;
const int timeout = HZ;
@@ -5722,7 +5722,7 @@ static int cs5529_wait_for_idle(comedi_device * dev)
return 0;
}
-static void cs5529_command(comedi_device * dev, unsigned short value)
+static void cs5529_command(struct comedi_device * dev, unsigned short value)
{
static const int timeout = 100;
int i;
@@ -5744,7 +5744,7 @@ static void cs5529_command(comedi_device * dev, unsigned short value)
}
/* write to cs5529 register */
-static void cs5529_config_write(comedi_device * dev, unsigned int value,
+static void cs5529_config_write(struct comedi_device * dev, unsigned int value,
unsigned int reg_select_bits)
{
ni_ao_win_outw(dev, ((value >> 16) & 0xff),
@@ -5759,7 +5759,7 @@ static void cs5529_config_write(comedi_device * dev, unsigned int value,
#ifdef NI_CS5529_DEBUG
/* read from cs5529 register */
-static unsigned int cs5529_config_read(comedi_device * dev,
+static unsigned int cs5529_config_read(struct comedi_device * dev,
unsigned int reg_select_bits)
{
unsigned int value;
@@ -5775,7 +5775,7 @@ static unsigned int cs5529_config_read(comedi_device * dev,
}
#endif
-static int cs5529_do_conversion(comedi_device * dev, unsigned short *data)
+static int cs5529_do_conversion(struct comedi_device * dev, unsigned short *data)
{
int retval;
unsigned short status;
@@ -5805,7 +5805,7 @@ static int cs5529_do_conversion(comedi_device * dev, unsigned short *data)
return 0;
}
-static int cs5529_ai_insn_read(comedi_device * dev, comedi_subdevice * s,
+static int cs5529_ai_insn_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n, retval;
@@ -5831,7 +5831,7 @@ static int cs5529_ai_insn_read(comedi_device * dev, comedi_subdevice * s,
return insn->n;
}
-static int init_cs5529(comedi_device * dev)
+static int init_cs5529(struct comedi_device * dev)
{
unsigned int config_bits =
CSCFG_PORT_MODE | CSCFG_WORD_RATE_2180_CYCLES;
diff --git a/drivers/staging/comedi/drivers/ni_mio_cs.c b/drivers/staging/comedi/drivers/ni_mio_cs.c
index 258613fafa3a..4891bc2805f8 100644
--- a/drivers/staging/comedi/drivers/ni_mio_cs.c
+++ b/drivers/staging/comedi/drivers/ni_mio_cs.c
@@ -194,7 +194,7 @@ typedef struct {
* read/written directly in the I/O space of the board. The
* DAQCard devices map the low 8 STC registers to iobase+addr*2. */
-static void mio_cs_win_out(comedi_device * dev, uint16_t data, int addr)
+static void mio_cs_win_out(struct comedi_device * dev, uint16_t data, int addr)
{
unsigned long flags;
@@ -208,7 +208,7 @@ static void mio_cs_win_out(comedi_device * dev, uint16_t data, int addr)
comedi_spin_unlock_irqrestore(&devpriv->window_lock, flags);
}
-static uint16_t mio_cs_win_in(comedi_device * dev, int addr)
+static uint16_t mio_cs_win_in(struct comedi_device * dev, int addr)
{
unsigned long flags;
uint16_t ret;
@@ -225,8 +225,8 @@ static uint16_t mio_cs_win_in(comedi_device * dev, int addr)
return ret;
}
-static int mio_cs_attach(comedi_device * dev, comedi_devconfig * it);
-static int mio_cs_detach(comedi_device * dev);
+static int mio_cs_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int mio_cs_detach(struct comedi_device * dev);
static comedi_driver driver_ni_mio_cs = {
driver_name:"ni_mio_cs",
module:THIS_MODULE,
@@ -236,11 +236,11 @@ static comedi_driver driver_ni_mio_cs = {
#include "ni_mio_common.c"
-static int ni_getboardtype(comedi_device * dev, struct pcmcia_device *link);
+static int ni_getboardtype(struct comedi_device * dev, struct pcmcia_device *link);
/* clean up allocated resources */
/* called when driver is removed */
-static int mio_cs_detach(comedi_device * dev)
+static int mio_cs_detach(struct comedi_device * dev)
{
mio_common_detach(dev);
@@ -401,7 +401,7 @@ static void mio_cs_config(struct pcmcia_device *link)
link->dev_node = &dev_node;
}
-static int mio_cs_attach(comedi_device * dev, comedi_devconfig * it)
+static int mio_cs_attach(struct comedi_device * dev, comedi_devconfig * it)
{
struct pcmcia_device *link;
unsigned int irq;
@@ -466,7 +466,7 @@ static int mio_cs_attach(comedi_device * dev, comedi_devconfig * it)
return 0;
}
-static int get_prodid(comedi_device * dev, struct pcmcia_device *link)
+static int get_prodid(struct comedi_device * dev, struct pcmcia_device *link)
{
tuple_t tuple;
u_short buf[128];
@@ -485,7 +485,7 @@ static int get_prodid(comedi_device * dev, struct pcmcia_device *link)
return prodid;
}
-static int ni_getboardtype(comedi_device * dev, struct pcmcia_device *link)
+static int ni_getboardtype(struct comedi_device * dev, struct pcmcia_device *link)
{
int id;
int i;
diff --git a/drivers/staging/comedi/drivers/ni_pcidio.c b/drivers/staging/comedi/drivers/ni_pcidio.c
index 289d7b921513..b236d88e4e4e 100644
--- a/drivers/staging/comedi/drivers/ni_pcidio.c
+++ b/drivers/staging/comedi/drivers/ni_pcidio.c
@@ -287,9 +287,9 @@ enum FPGA_Control_Bits {
#define IntEn (TransferReady|CountExpired|Waited|PrimaryTC|SecondaryTC)
#endif
-static int nidio_attach(comedi_device * dev, comedi_devconfig * it);
-static int nidio_detach(comedi_device * dev);
-static int ni_pcidio_cancel(comedi_device * dev, comedi_subdevice * s);
+static int nidio_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int nidio_detach(struct comedi_device * dev);
+static int ni_pcidio_cancel(struct comedi_device * dev, comedi_subdevice * s);
static comedi_driver driver_pcidio = {
driver_name:"ni_pcidio",
@@ -399,14 +399,14 @@ typedef struct {
} nidio96_private;
#define devpriv ((nidio96_private *)dev->private)
-static int ni_pcidio_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int ni_pcidio_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd);
-static int ni_pcidio_cmd(comedi_device * dev, comedi_subdevice * s);
-static int ni_pcidio_inttrig(comedi_device * dev, comedi_subdevice * s,
+static int ni_pcidio_cmd(struct comedi_device * dev, comedi_subdevice * s);
+static int ni_pcidio_inttrig(struct comedi_device * dev, comedi_subdevice * s,
unsigned int trignum);
-static int nidio_find_device(comedi_device * dev, int bus, int slot);
+static int nidio_find_device(struct comedi_device * dev, int bus, int slot);
static int ni_pcidio_ns_to_timer(int *nanosec, int round_mode);
-static int setup_mite_dma(comedi_device * dev, comedi_subdevice * s);
+static int setup_mite_dma(struct comedi_device * dev, comedi_subdevice * s);
#ifdef DEBUG_FLAGS
static void ni_pcidio_print_flags(unsigned int flags);
@@ -416,7 +416,7 @@ static void ni_pcidio_print_status(unsigned int status);
#define ni_pcidio_print_status(x)
#endif
-static int ni_pcidio_request_di_mite_channel(comedi_device * dev)
+static int ni_pcidio_request_di_mite_channel(struct comedi_device * dev)
{
unsigned long flags;
@@ -439,7 +439,7 @@ static int ni_pcidio_request_di_mite_channel(comedi_device * dev)
return 0;
}
-static void ni_pcidio_release_di_mite_channel(comedi_device * dev)
+static void ni_pcidio_release_di_mite_channel(struct comedi_device * dev)
{
unsigned long flags;
@@ -467,7 +467,7 @@ static int nidio96_8255_cb(int dir, int port, int data, unsigned long iobase)
}
}
-void ni_pcidio_event(comedi_device * dev, comedi_subdevice * s)
+void ni_pcidio_event(struct comedi_device * dev, comedi_subdevice * s)
{
if (s->async->
events & (COMEDI_CB_EOA | COMEDI_CB_ERROR | COMEDI_CB_OVERFLOW))
@@ -479,7 +479,7 @@ void ni_pcidio_event(comedi_device * dev, comedi_subdevice * s)
static irqreturn_t nidio_interrupt(int irq, void *d PT_REGS_ARG)
{
- comedi_device *dev = d;
+ struct comedi_device *dev = d;
comedi_subdevice *s = dev->subdevices;
comedi_async *async = s->async;
struct mite_struct *mite = devpriv->mite;
@@ -673,7 +673,7 @@ static void ni_pcidio_print_status(unsigned int flags)
#endif
#ifdef unused
-static void debug_int(comedi_device * dev)
+static void debug_int(struct comedi_device * dev)
{
int a, b;
static int n_int = 0;
@@ -702,7 +702,7 @@ static void debug_int(comedi_device * dev)
}
#endif
-static int ni_pcidio_insn_config(comedi_device * dev, comedi_subdevice * s,
+static int ni_pcidio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 1)
@@ -729,7 +729,7 @@ static int ni_pcidio_insn_config(comedi_device * dev, comedi_subdevice * s,
return 1;
}
-static int ni_pcidio_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int ni_pcidio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
@@ -744,7 +744,7 @@ static int ni_pcidio_insn_bits(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int ni_pcidio_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int ni_pcidio_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
@@ -876,7 +876,7 @@ static int ni_pcidio_ns_to_timer(int *nanosec, int round_mode)
return divider;
}
-static int ni_pcidio_cmd(comedi_device * dev, comedi_subdevice * s)
+static int ni_pcidio_cmd(struct comedi_device * dev, comedi_subdevice * s)
{
comedi_cmd *cmd = &s->async->cmd;
@@ -986,7 +986,7 @@ static int ni_pcidio_cmd(comedi_device * dev, comedi_subdevice * s)
return 0;
}
-static int setup_mite_dma(comedi_device * dev, comedi_subdevice * s)
+static int setup_mite_dma(struct comedi_device * dev, comedi_subdevice * s)
{
int retval;
@@ -1002,7 +1002,7 @@ static int setup_mite_dma(comedi_device * dev, comedi_subdevice * s)
return 0;
}
-static int ni_pcidio_inttrig(comedi_device * dev, comedi_subdevice * s,
+static int ni_pcidio_inttrig(struct comedi_device * dev, comedi_subdevice * s,
unsigned int trignum)
{
if (trignum != 0)
@@ -1014,7 +1014,7 @@ static int ni_pcidio_inttrig(comedi_device * dev, comedi_subdevice * s,
return 1;
}
-static int ni_pcidio_cancel(comedi_device * dev, comedi_subdevice * s)
+static int ni_pcidio_cancel(struct comedi_device * dev, comedi_subdevice * s)
{
writeb(0x00,
devpriv->mite->daq_io_addr + Master_DMA_And_Interrupt_Control);
@@ -1023,7 +1023,7 @@ static int ni_pcidio_cancel(comedi_device * dev, comedi_subdevice * s)
return 0;
}
-static int ni_pcidio_change(comedi_device * dev, comedi_subdevice * s,
+static int ni_pcidio_change(struct comedi_device * dev, comedi_subdevice * s,
unsigned long new_size)
{
int ret;
@@ -1037,7 +1037,7 @@ static int ni_pcidio_change(comedi_device * dev, comedi_subdevice * s,
return 0;
}
-static int pci_6534_load_fpga(comedi_device * dev, int fpga_index, u8 * data,
+static int pci_6534_load_fpga(struct comedi_device * dev, int fpga_index, u8 * data,
int data_len)
{
static const int timeout = 1000;
@@ -1090,12 +1090,12 @@ static int pci_6534_load_fpga(comedi_device * dev, int fpga_index, u8 * data,
return 0;
}
-static int pci_6534_reset_fpga(comedi_device * dev, int fpga_index)
+static int pci_6534_reset_fpga(struct comedi_device * dev, int fpga_index)
{
return pci_6534_load_fpga(dev, fpga_index, NULL, 0);
}
-static int pci_6534_reset_fpgas(comedi_device * dev)
+static int pci_6534_reset_fpgas(struct comedi_device * dev)
{
int ret;
int i;
@@ -1109,7 +1109,7 @@ static int pci_6534_reset_fpgas(comedi_device * dev)
return ret;
}
-static void pci_6534_init_main_fpga(comedi_device * dev)
+static void pci_6534_init_main_fpga(struct comedi_device * dev)
{
writel(0, devpriv->mite->daq_io_addr + FPGA_Control1_Register);
writel(0, devpriv->mite->daq_io_addr + FPGA_Control2_Register);
@@ -1119,7 +1119,7 @@ static void pci_6534_init_main_fpga(comedi_device * dev)
writel(0, devpriv->mite->daq_io_addr + FPGA_SCBMS_Counter_Register);
}
-static int pci_6534_upload_firmware(comedi_device * dev, int options[])
+static int pci_6534_upload_firmware(struct comedi_device * dev, int options[])
{
int ret;
void *main_fpga_data, *scarab_a_data, *scarab_b_data;
@@ -1149,7 +1149,7 @@ static int pci_6534_upload_firmware(comedi_device * dev, int options[])
return 0;
}
-static int nidio_attach(comedi_device * dev, comedi_devconfig * it)
+static int nidio_attach(struct comedi_device * dev, comedi_devconfig * it)
{
comedi_subdevice *s;
int i;
@@ -1246,7 +1246,7 @@ static int nidio_attach(comedi_device * dev, comedi_devconfig * it)
return 0;
}
-static int nidio_detach(comedi_device * dev)
+static int nidio_detach(struct comedi_device * dev)
{
int i;
@@ -1270,7 +1270,7 @@ static int nidio_detach(comedi_device * dev)
return 0;
}
-static int nidio_find_device(comedi_device * dev, int bus, int slot)
+static int nidio_find_device(struct comedi_device * dev, int bus, int slot)
{
struct mite_struct *mite;
int i;
diff --git a/drivers/staging/comedi/drivers/ni_pcimio.c b/drivers/staging/comedi/drivers/ni_pcimio.c
index 8d83fb41c3b2..cca0383fc775 100644
--- a/drivers/staging/comedi/drivers/ni_pcimio.c
+++ b/drivers/staging/comedi/drivers/ni_pcimio.c
@@ -1207,8 +1207,8 @@ static const ni_board ni_boards[] = {
#define n_pcimio_boards ((sizeof(ni_boards)/sizeof(ni_boards[0])))
-static int pcimio_attach(comedi_device * dev, comedi_devconfig * it);
-static int pcimio_detach(comedi_device * dev);
+static int pcimio_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int pcimio_detach(struct comedi_device * dev);
static comedi_driver driver_pcimio = {
driver_name: DRV_NAME,
module:THIS_MODULE,
@@ -1241,7 +1241,7 @@ NI_PRIVATE_COMMON} ni_private;
/* However, the 611x boards still aren't working, so I'm disabling
* non-windowed STC access temporarily */
-static void e_series_win_out(comedi_device * dev, uint16_t data, int reg)
+static void e_series_win_out(struct comedi_device * dev, uint16_t data, int reg)
{
unsigned long flags;
@@ -1251,7 +1251,7 @@ static void e_series_win_out(comedi_device * dev, uint16_t data, int reg)
comedi_spin_unlock_irqrestore(&devpriv->window_lock, flags);
}
-static uint16_t e_series_win_in(comedi_device * dev, int reg)
+static uint16_t e_series_win_in(struct comedi_device * dev, int reg)
{
unsigned long flags;
uint16_t ret;
@@ -1264,7 +1264,7 @@ static uint16_t e_series_win_in(comedi_device * dev, int reg)
return ret;
}
-static void m_series_stc_writew(comedi_device * dev, uint16_t data, int reg)
+static void m_series_stc_writew(struct comedi_device * dev, uint16_t data, int reg)
{
unsigned offset;
switch (reg) {
@@ -1419,7 +1419,7 @@ static void m_series_stc_writew(comedi_device * dev, uint16_t data, int reg)
ni_writew(data, offset);
}
-static uint16_t m_series_stc_readw(comedi_device * dev, int reg)
+static uint16_t m_series_stc_readw(struct comedi_device * dev, int reg)
{
unsigned offset;
switch (reg) {
@@ -1454,7 +1454,7 @@ static uint16_t m_series_stc_readw(comedi_device * dev, int reg)
return ni_readw(offset);
}
-static void m_series_stc_writel(comedi_device * dev, uint32_t data, int reg)
+static void m_series_stc_writel(struct comedi_device * dev, uint32_t data, int reg)
{
unsigned offset;
switch (reg) {
@@ -1495,7 +1495,7 @@ static void m_series_stc_writel(comedi_device * dev, uint32_t data, int reg)
ni_writel(data, offset);
}
-static uint32_t m_series_stc_readl(comedi_device * dev, int reg)
+static uint32_t m_series_stc_readl(struct comedi_device * dev, int reg)
{
unsigned offset;
switch (reg) {
@@ -1528,19 +1528,19 @@ static uint32_t m_series_stc_readl(comedi_device * dev, int reg)
#include "ni_mio_common.c"
-static int pcimio_find_device(comedi_device * dev, int bus, int slot);
-static int pcimio_ai_change(comedi_device * dev, comedi_subdevice * s,
+static int pcimio_find_device(struct comedi_device * dev, int bus, int slot);
+static int pcimio_ai_change(struct comedi_device * dev, comedi_subdevice * s,
unsigned long new_size);
-static int pcimio_ao_change(comedi_device * dev, comedi_subdevice * s,
+static int pcimio_ao_change(struct comedi_device * dev, comedi_subdevice * s,
unsigned long new_size);
-static int pcimio_gpct0_change(comedi_device * dev, comedi_subdevice * s,
+static int pcimio_gpct0_change(struct comedi_device * dev, comedi_subdevice * s,
unsigned long new_size);
-static int pcimio_gpct1_change(comedi_device * dev, comedi_subdevice * s,
+static int pcimio_gpct1_change(struct comedi_device * dev, comedi_subdevice * s,
unsigned long new_size);
-static int pcimio_dio_change(comedi_device * dev, comedi_subdevice * s,
+static int pcimio_dio_change(struct comedi_device * dev, comedi_subdevice * s,
unsigned long new_size);
-static void m_series_init_eeprom_buffer(comedi_device * dev)
+static void m_series_init_eeprom_buffer(struct comedi_device * dev)
{
static const int Start_Cal_EEPROM = 0x400;
static const unsigned window_size = 10;
@@ -1577,7 +1577,7 @@ static void m_series_init_eeprom_buffer(comedi_device * dev)
writel(0x0, devpriv->mite->mite_io_addr + 0x30);
}
-static void init_6143(comedi_device * dev)
+static void init_6143(struct comedi_device * dev)
{
// Disable interrupts
devpriv->stc_writew(dev, 0, Interrupt_Control_Register);
@@ -1597,7 +1597,7 @@ static void init_6143(comedi_device * dev)
}
/* cleans up allocated resources */
-static int pcimio_detach(comedi_device * dev)
+static int pcimio_detach(struct comedi_device * dev)
{
mio_common_detach(dev);
if (dev->irq) {
@@ -1616,7 +1616,7 @@ static int pcimio_detach(comedi_device * dev)
return 0;
}
-static int pcimio_attach(comedi_device * dev, comedi_devconfig * it)
+static int pcimio_attach(struct comedi_device * dev, comedi_devconfig * it)
{
int ret;
@@ -1699,7 +1699,7 @@ static int pcimio_attach(comedi_device * dev, comedi_devconfig * it)
return ret;
}
-static int pcimio_find_device(comedi_device * dev, int bus, int slot)
+static int pcimio_find_device(struct comedi_device * dev, int bus, int slot)
{
struct mite_struct *mite;
int i;
@@ -1727,7 +1727,7 @@ static int pcimio_find_device(comedi_device * dev, int bus, int slot)
return -EIO;
}
-static int pcimio_ai_change(comedi_device * dev, comedi_subdevice * s,
+static int pcimio_ai_change(struct comedi_device * dev, comedi_subdevice * s,
unsigned long new_size)
{
int ret;
@@ -1739,7 +1739,7 @@ static int pcimio_ai_change(comedi_device * dev, comedi_subdevice * s,
return 0;
}
-static int pcimio_ao_change(comedi_device * dev, comedi_subdevice * s,
+static int pcimio_ao_change(struct comedi_device * dev, comedi_subdevice * s,
unsigned long new_size)
{
int ret;
@@ -1751,7 +1751,7 @@ static int pcimio_ao_change(comedi_device * dev, comedi_subdevice * s,
return 0;
}
-static int pcimio_gpct0_change(comedi_device * dev, comedi_subdevice * s,
+static int pcimio_gpct0_change(struct comedi_device * dev, comedi_subdevice * s,
unsigned long new_size)
{
int ret;
@@ -1763,7 +1763,7 @@ static int pcimio_gpct0_change(comedi_device * dev, comedi_subdevice * s,
return 0;
}
-static int pcimio_gpct1_change(comedi_device * dev, comedi_subdevice * s,
+static int pcimio_gpct1_change(struct comedi_device * dev, comedi_subdevice * s,
unsigned long new_size)
{
int ret;
@@ -1775,7 +1775,7 @@ static int pcimio_gpct1_change(comedi_device * dev, comedi_subdevice * s,
return 0;
}
-static int pcimio_dio_change(comedi_device * dev, comedi_subdevice * s,
+static int pcimio_dio_change(struct comedi_device * dev, comedi_subdevice * s,
unsigned long new_size)
{
int ret;
diff --git a/drivers/staging/comedi/drivers/ni_stc.h b/drivers/staging/comedi/drivers/ni_stc.h
index d76ef024131d..2c0929147585 100644
--- a/drivers/staging/comedi/drivers/ni_stc.h
+++ b/drivers/staging/comedi/drivers/ni_stc.h
@@ -1411,10 +1411,10 @@ typedef struct ni_board_struct {
#define NUM_GPCT 2
#define NI_PRIVATE_COMMON \
- uint16_t (*stc_readw)(comedi_device *dev, int register); \
- uint32_t (*stc_readl)(comedi_device *dev, int register); \
- void (*stc_writew)(comedi_device *dev, uint16_t value, int register); \
- void (*stc_writel)(comedi_device *dev, uint32_t value, int register); \
+ uint16_t (*stc_readw)(struct comedi_device *dev, int register); \
+ uint32_t (*stc_readl)(struct comedi_device *dev, int register); \
+ void (*stc_writew)(struct comedi_device *dev, uint16_t value, int register); \
+ void (*stc_writel)(struct comedi_device *dev, uint32_t value, int register); \
\
unsigned short dio_output; \
unsigned short dio_control; \
diff --git a/drivers/staging/comedi/drivers/ni_tio.c b/drivers/staging/comedi/drivers/ni_tio.c
index efa9cf5546f5..f5385b903d41 100644
--- a/drivers/staging/comedi/drivers/ni_tio.c
+++ b/drivers/staging/comedi/drivers/ni_tio.c
@@ -278,7 +278,7 @@ static void __exit ni_tio_cleanup_module(void)
module_exit(ni_tio_cleanup_module);
-struct ni_gpct_device *ni_gpct_device_construct(comedi_device * dev,
+struct ni_gpct_device *ni_gpct_device_construct(struct comedi_device * dev,
void (*write_register) (struct ni_gpct * counter, unsigned bits,
enum ni_gpct_register reg),
unsigned (*read_register) (struct ni_gpct * counter,
diff --git a/drivers/staging/comedi/drivers/ni_tio.h b/drivers/staging/comedi/drivers/ni_tio.h
index 39f85ec8485b..eb611e1fb34b 100644
--- a/drivers/staging/comedi/drivers/ni_tio.h
+++ b/drivers/staging/comedi/drivers/ni_tio.h
@@ -119,7 +119,7 @@ struct ni_gpct {
};
struct ni_gpct_device {
- comedi_device *dev;
+ struct comedi_device *dev;
void (*write_register) (struct ni_gpct * counter, unsigned bits,
enum ni_gpct_register reg);
unsigned (*read_register) (struct ni_gpct * counter,
@@ -131,7 +131,7 @@ struct ni_gpct_device {
spinlock_t regs_lock;
};
-extern struct ni_gpct_device *ni_gpct_device_construct(comedi_device * dev,
+extern struct ni_gpct_device *ni_gpct_device_construct(struct comedi_device * dev,
void (*write_register) (struct ni_gpct * counter, unsigned bits,
enum ni_gpct_register reg),
unsigned (*read_register) (struct ni_gpct * counter,
diff --git a/drivers/staging/comedi/drivers/ni_tiocmd.c b/drivers/staging/comedi/drivers/ni_tiocmd.c
index e4cc5c59f0c5..e28bc754f672 100644
--- a/drivers/staging/comedi/drivers/ni_tiocmd.c
+++ b/drivers/staging/comedi/drivers/ni_tiocmd.c
@@ -96,7 +96,7 @@ static void ni_tio_configure_dma(struct ni_gpct *counter, short enable,
}
}
-static int ni_tio_input_inttrig(comedi_device * dev, comedi_subdevice * s,
+static int ni_tio_input_inttrig(struct comedi_device * dev, comedi_subdevice * s,
unsigned int trignum)
{
unsigned long flags;
diff --git a/drivers/staging/comedi/drivers/pcl711.c b/drivers/staging/comedi/drivers/pcl711.c
index d54e55fe963f..6542b6fd06f2 100644
--- a/drivers/staging/comedi/drivers/pcl711.c
+++ b/drivers/staging/comedi/drivers/pcl711.c
@@ -154,8 +154,8 @@ static const boardtype boardtypes[] = {
#define n_boardtypes (sizeof(boardtypes)/sizeof(boardtype))
#define this_board ((const boardtype *)dev->board_ptr)
-static int pcl711_attach(comedi_device * dev, comedi_devconfig * it);
-static int pcl711_detach(comedi_device * dev);
+static int pcl711_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int pcl711_detach(struct comedi_device * dev);
static comedi_driver driver_pcl711 = {
driver_name:"pcl711",
module:THIS_MODULE,
@@ -185,7 +185,7 @@ static irqreturn_t pcl711_interrupt(int irq, void *d PT_REGS_ARG)
{
int lo, hi;
int data;
- comedi_device *dev = d;
+ struct comedi_device *dev = d;
comedi_subdevice *s = dev->subdevices + 0;
if (!dev->attached) {
@@ -213,7 +213,7 @@ static irqreturn_t pcl711_interrupt(int irq, void *d PT_REGS_ARG)
return IRQ_HANDLED;
}
-static void pcl711_set_changain(comedi_device * dev, int chan)
+static void pcl711_set_changain(struct comedi_device * dev, int chan)
{
int chan_register;
@@ -240,7 +240,7 @@ static void pcl711_set_changain(comedi_device * dev, int chan)
}
}
-static int pcl711_ai_insn(comedi_device * dev, comedi_subdevice * s,
+static int pcl711_ai_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i, n;
@@ -279,7 +279,7 @@ static int pcl711_ai_insn(comedi_device * dev, comedi_subdevice * s,
return n;
}
-static int pcl711_ai_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int pcl711_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd)
{
int tmp;
@@ -381,7 +381,7 @@ static int pcl711_ai_cmdtest(comedi_device * dev, comedi_subdevice * s,
return 0;
}
-static int pcl711_ai_cmd(comedi_device * dev, comedi_subdevice * s)
+static int pcl711_ai_cmd(struct comedi_device * dev, comedi_subdevice * s)
{
int timer1, timer2;
comedi_cmd *cmd = &s->async->cmd;
@@ -427,7 +427,7 @@ static int pcl711_ai_cmd(comedi_device * dev, comedi_subdevice * s)
/*
analog output
*/
-static int pcl711_ao_insn(comedi_device * dev, comedi_subdevice * s,
+static int pcl711_ao_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n;
@@ -445,7 +445,7 @@ static int pcl711_ao_insn(comedi_device * dev, comedi_subdevice * s,
return n;
}
-static int pcl711_ao_insn_read(comedi_device * dev, comedi_subdevice * s,
+static int pcl711_ao_insn_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n;
@@ -460,7 +460,7 @@ static int pcl711_ao_insn_read(comedi_device * dev, comedi_subdevice * s,
}
/* Digital port read - Untested on 8112 */
-static int pcl711_di_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int pcl711_di_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
@@ -473,7 +473,7 @@ static int pcl711_di_insn_bits(comedi_device * dev, comedi_subdevice * s,
}
/* Digital port write - Untested on 8112 */
-static int pcl711_do_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int pcl711_do_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
@@ -494,7 +494,7 @@ static int pcl711_do_insn_bits(comedi_device * dev, comedi_subdevice * s,
}
/* Free any resources that we have claimed */
-static int pcl711_detach(comedi_device * dev)
+static int pcl711_detach(struct comedi_device * dev)
{
printk("comedi%d: pcl711: remove\n", dev->minor);
@@ -508,7 +508,7 @@ static int pcl711_detach(comedi_device * dev)
}
/* Initialization */
-static int pcl711_attach(comedi_device * dev, comedi_devconfig * it)
+static int pcl711_attach(struct comedi_device * dev, comedi_devconfig * it)
{
int ret;
unsigned long iobase;
diff --git a/drivers/staging/comedi/drivers/pcl724.c b/drivers/staging/comedi/drivers/pcl724.c
index 047bebbb4a07..a65bcfb1043b 100644
--- a/drivers/staging/comedi/drivers/pcl724.c
+++ b/drivers/staging/comedi/drivers/pcl724.c
@@ -56,8 +56,8 @@ See the source for configuration details.
// #define PCL724_IRQ 1 /* no IRQ support now */
-static int pcl724_attach(comedi_device * dev, comedi_devconfig * it);
-static int pcl724_detach(comedi_device * dev);
+static int pcl724_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int pcl724_detach(struct comedi_device * dev);
typedef struct {
const char *name; // board name
@@ -122,7 +122,7 @@ static int subdev_8255mapped_cb(int dir, int port, int data,
}
}
-static int pcl724_attach(comedi_device * dev, comedi_devconfig * it)
+static int pcl724_attach(struct comedi_device * dev, comedi_devconfig * it)
{
unsigned long iobase;
unsigned int iorange;
@@ -198,7 +198,7 @@ static int pcl724_attach(comedi_device * dev, comedi_devconfig * it)
return 0;
}
-static int pcl724_detach(comedi_device * dev)
+static int pcl724_detach(struct comedi_device * dev)
{
int i;
diff --git a/drivers/staging/comedi/drivers/pcl725.c b/drivers/staging/comedi/drivers/pcl725.c
index a252defade5b..afe51b7f4ef1 100644
--- a/drivers/staging/comedi/drivers/pcl725.c
+++ b/drivers/staging/comedi/drivers/pcl725.c
@@ -20,8 +20,8 @@ Devices: [Advantech] PCL-725 (pcl725)
#define PCL725_DO 0
#define PCL725_DI 1
-static int pcl725_attach(comedi_device * dev, comedi_devconfig * it);
-static int pcl725_detach(comedi_device * dev);
+static int pcl725_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int pcl725_detach(struct comedi_device * dev);
static comedi_driver driver_pcl725 = {
driver_name:"pcl725",
module:THIS_MODULE,
@@ -31,7 +31,7 @@ static comedi_driver driver_pcl725 = {
COMEDI_INITCLEANUP(driver_pcl725);
-static int pcl725_do_insn(comedi_device * dev, comedi_subdevice * s,
+static int pcl725_do_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
@@ -48,7 +48,7 @@ static int pcl725_do_insn(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int pcl725_di_insn(comedi_device * dev, comedi_subdevice * s,
+static int pcl725_di_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
@@ -59,7 +59,7 @@ static int pcl725_di_insn(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int pcl725_attach(comedi_device * dev, comedi_devconfig * it)
+static int pcl725_attach(struct comedi_device * dev, comedi_devconfig * it)
{
comedi_subdevice *s;
unsigned long iobase;
@@ -100,7 +100,7 @@ static int pcl725_attach(comedi_device * dev, comedi_devconfig * it)
return 0;
}
-static int pcl725_detach(comedi_device * dev)
+static int pcl725_detach(struct comedi_device * dev)
{
printk("comedi%d: pcl725: remove\n", dev->minor);
diff --git a/drivers/staging/comedi/drivers/pcl726.c b/drivers/staging/comedi/drivers/pcl726.c
index 61097184e3cc..373c1a7f2368 100644
--- a/drivers/staging/comedi/drivers/pcl726.c
+++ b/drivers/staging/comedi/drivers/pcl726.c
@@ -111,8 +111,8 @@ static const comedi_lrange *const rangelist_728[] = {
&range_4_20mA, &range_0_20mA
};
-static int pcl726_attach(comedi_device * dev, comedi_devconfig * it);
-static int pcl726_detach(comedi_device * dev);
+static int pcl726_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int pcl726_detach(struct comedi_device * dev);
typedef struct {
const char *name; // driver name
@@ -168,7 +168,7 @@ typedef struct {
} pcl726_private;
#define devpriv ((pcl726_private *)dev->private)
-static int pcl726_ao_insn(comedi_device * dev, comedi_subdevice * s,
+static int pcl726_ao_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int hi, lo;
@@ -193,7 +193,7 @@ static int pcl726_ao_insn(comedi_device * dev, comedi_subdevice * s,
return n;
}
-static int pcl726_ao_insn_read(comedi_device * dev, comedi_subdevice * s,
+static int pcl726_ao_insn_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int chan = CR_CHAN(insn->chanspec);
@@ -205,7 +205,7 @@ static int pcl726_ao_insn_read(comedi_device * dev, comedi_subdevice * s,
return n;
}
-static int pcl726_di_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int pcl726_di_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
@@ -217,7 +217,7 @@ static int pcl726_di_insn_bits(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int pcl726_do_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int pcl726_do_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
@@ -237,7 +237,7 @@ static int pcl726_do_insn_bits(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int pcl726_attach(comedi_device * dev, comedi_devconfig * it)
+static int pcl726_attach(struct comedi_device * dev, comedi_devconfig * it)
{
comedi_subdevice *s;
unsigned long iobase;
@@ -356,7 +356,7 @@ static int pcl726_attach(comedi_device * dev, comedi_devconfig * it)
return 0;
}
-static int pcl726_detach(comedi_device * dev)
+static int pcl726_detach(struct comedi_device * dev)
{
// printk("comedi%d: pcl726: remove\n",dev->minor);
diff --git a/drivers/staging/comedi/drivers/pcl730.c b/drivers/staging/comedi/drivers/pcl730.c
index a33ff0850c48..63f38738c47a 100644
--- a/drivers/staging/comedi/drivers/pcl730.c
+++ b/drivers/staging/comedi/drivers/pcl730.c
@@ -26,8 +26,8 @@ The ACL-7130 card have an 8254 timer/counter not supported by this driver.
#define PCL730_DIO_LO 2 /* TTL Digital I/O low byte (D0-D7) */
#define PCL730_DIO_HI 3 /* TTL Digital I/O high byte (D8-D15) */
-static int pcl730_attach(comedi_device * dev, comedi_devconfig * it);
-static int pcl730_detach(comedi_device * dev);
+static int pcl730_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int pcl730_detach(struct comedi_device * dev);
typedef struct {
const char *name; // board name
@@ -55,7 +55,7 @@ static comedi_driver driver_pcl730 = {
COMEDI_INITCLEANUP(driver_pcl730);
-static int pcl730_do_insn(comedi_device * dev, comedi_subdevice * s,
+static int pcl730_do_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
@@ -77,7 +77,7 @@ static int pcl730_do_insn(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int pcl730_di_insn(comedi_device * dev, comedi_subdevice * s,
+static int pcl730_di_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
@@ -89,7 +89,7 @@ static int pcl730_di_insn(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int pcl730_attach(comedi_device * dev, comedi_devconfig * it)
+static int pcl730_attach(struct comedi_device * dev, comedi_devconfig * it)
{
comedi_subdevice *s;
unsigned long iobase;
@@ -155,7 +155,7 @@ static int pcl730_attach(comedi_device * dev, comedi_devconfig * it)
return 0;
}
-static int pcl730_detach(comedi_device * dev)
+static int pcl730_detach(struct comedi_device * dev)
{
printk("comedi%d: pcl730: remove\n", dev->minor);
diff --git a/drivers/staging/comedi/drivers/pcl812.c b/drivers/staging/comedi/drivers/pcl812.c
index b3d24cb588a0..0c8e03d66594 100644
--- a/drivers/staging/comedi/drivers/pcl812.c
+++ b/drivers/staging/comedi/drivers/pcl812.c
@@ -292,8 +292,8 @@ static const comedi_lrange range_a821pgh_ai = { 4, {
}
};
-static int pcl812_attach(comedi_device * dev, comedi_devconfig * it);
-static int pcl812_detach(comedi_device * dev);
+static int pcl812_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int pcl812_detach(struct comedi_device * dev);
typedef struct {
const char *name; // board name
@@ -425,15 +425,15 @@ typedef struct {
/*
==============================================================================
*/
-static void start_pacer(comedi_device * dev, int mode, unsigned int divisor1,
+static void start_pacer(struct comedi_device * dev, int mode, unsigned int divisor1,
unsigned int divisor2);
-static void setup_range_channel(comedi_device * dev, comedi_subdevice * s,
+static void setup_range_channel(struct comedi_device * dev, comedi_subdevice * s,
unsigned int rangechan, char wait);
-static int pcl812_ai_cancel(comedi_device * dev, comedi_subdevice * s);
+static int pcl812_ai_cancel(struct comedi_device * dev, comedi_subdevice * s);
/*
==============================================================================
*/
-static int pcl812_ai_insn_read(comedi_device * dev, comedi_subdevice * s,
+static int pcl812_ai_insn_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n;
@@ -467,7 +467,7 @@ static int pcl812_ai_insn_read(comedi_device * dev, comedi_subdevice * s,
/*
==============================================================================
*/
-static int acl8216_ai_insn_read(comedi_device * dev, comedi_subdevice * s,
+static int acl8216_ai_insn_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n;
@@ -503,7 +503,7 @@ static int acl8216_ai_insn_read(comedi_device * dev, comedi_subdevice * s,
/*
==============================================================================
*/
-static int pcl812_ao_insn_write(comedi_device * dev, comedi_subdevice * s,
+static int pcl812_ao_insn_write(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int chan = CR_CHAN(insn->chanspec);
@@ -523,7 +523,7 @@ static int pcl812_ao_insn_write(comedi_device * dev, comedi_subdevice * s,
/*
==============================================================================
*/
-static int pcl812_ao_insn_read(comedi_device * dev, comedi_subdevice * s,
+static int pcl812_ao_insn_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int chan = CR_CHAN(insn->chanspec);
@@ -539,7 +539,7 @@ static int pcl812_ao_insn_read(comedi_device * dev, comedi_subdevice * s,
/*
==============================================================================
*/
-static int pcl812_di_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int pcl812_di_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
@@ -554,7 +554,7 @@ static int pcl812_di_insn_bits(comedi_device * dev, comedi_subdevice * s,
/*
==============================================================================
*/
-static int pcl812_do_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int pcl812_do_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
@@ -591,7 +591,7 @@ static void pcl812_cmdtest_out(int e, comedi_cmd * cmd)
/*
==============================================================================
*/
-static int pcl812_ai_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int pcl812_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
@@ -770,7 +770,7 @@ static int pcl812_ai_cmdtest(comedi_device * dev, comedi_subdevice * s,
/*
==============================================================================
*/
-static int pcl812_ai_cmd(comedi_device * dev, comedi_subdevice * s)
+static int pcl812_ai_cmd(struct comedi_device * dev, comedi_subdevice * s)
{
unsigned int divisor1 = 0, divisor2 = 0, i, dma_flags, bytes;
comedi_cmd *cmd = &s->async->cmd;
@@ -922,7 +922,7 @@ static irqreturn_t interrupt_pcl812_ai_int(int irq, void *d)
{
char err = 1;
unsigned int mask, timeout;
- comedi_device *dev = d;
+ struct comedi_device *dev = d;
comedi_subdevice *s = dev->subdevices + 0;
s->async->events = 0;
@@ -980,7 +980,7 @@ static irqreturn_t interrupt_pcl812_ai_int(int irq, void *d)
/*
==============================================================================
*/
-static void transfer_from_dma_buf(comedi_device * dev, comedi_subdevice * s,
+static void transfer_from_dma_buf(struct comedi_device * dev, comedi_subdevice * s,
short * ptr, unsigned int bufptr, unsigned int len)
{
unsigned int i;
@@ -1008,7 +1008,7 @@ static void transfer_from_dma_buf(comedi_device * dev, comedi_subdevice * s,
*/
static irqreturn_t interrupt_pcl812_ai_dma(int irq, void *d)
{
- comedi_device *dev = d;
+ struct comedi_device *dev = d;
comedi_subdevice *s = dev->subdevices + 0;
unsigned long dma_flags;
int len, bufptr;
@@ -1059,7 +1059,7 @@ static irqreturn_t interrupt_pcl812_ai_dma(int irq, void *d)
*/
static irqreturn_t interrupt_pcl812(int irq, void *d PT_REGS_ARG)
{
- comedi_device *dev = d;
+ struct comedi_device *dev = d;
if (!dev->attached) {
comedi_error(dev, "spurious interrupt");
@@ -1075,7 +1075,7 @@ static irqreturn_t interrupt_pcl812(int irq, void *d PT_REGS_ARG)
/*
==============================================================================
*/
-static int pcl812_ai_poll(comedi_device * dev, comedi_subdevice * s)
+static int pcl812_ai_poll(struct comedi_device * dev, comedi_subdevice * s)
{
unsigned long flags;
unsigned int top1, top2, i;
@@ -1119,7 +1119,7 @@ static int pcl812_ai_poll(comedi_device * dev, comedi_subdevice * s)
/*
==============================================================================
*/
-static void setup_range_channel(comedi_device * dev, comedi_subdevice * s,
+static void setup_range_channel(struct comedi_device * dev, comedi_subdevice * s,
unsigned int rangechan, char wait)
{
unsigned char chan_reg = CR_CHAN(rangechan); // normal board
@@ -1155,7 +1155,7 @@ static void setup_range_channel(comedi_device * dev, comedi_subdevice * s,
/*
==============================================================================
*/
-static void start_pacer(comedi_device * dev, int mode, unsigned int divisor1,
+static void start_pacer(struct comedi_device * dev, int mode, unsigned int divisor1,
unsigned int divisor2)
{
#ifdef PCL812_EXTDEBUG
@@ -1180,7 +1180,7 @@ static void start_pacer(comedi_device * dev, int mode, unsigned int divisor1,
/*
==============================================================================
*/
-static void free_resources(comedi_device * dev)
+static void free_resources(struct comedi_device * dev)
{
if (dev->private) {
@@ -1200,7 +1200,7 @@ static void free_resources(comedi_device * dev)
/*
==============================================================================
*/
-static int pcl812_ai_cancel(comedi_device * dev, comedi_subdevice * s)
+static int pcl812_ai_cancel(struct comedi_device * dev, comedi_subdevice * s)
{
#ifdef PCL812_EXTDEBUG
rt_printk("pcl812 EDBG: BGN: pcl812_ai_cancel(...)\n");
@@ -1220,7 +1220,7 @@ static int pcl812_ai_cancel(comedi_device * dev, comedi_subdevice * s)
/*
==============================================================================
*/
-static void pcl812_reset(comedi_device * dev)
+static void pcl812_reset(struct comedi_device * dev)
{
#ifdef PCL812_EXTDEBUG
rt_printk("pcl812 EDBG: BGN: pcl812_reset(...)\n");
@@ -1262,7 +1262,7 @@ static void pcl812_reset(comedi_device * dev)
/*
==============================================================================
*/
-static int pcl812_attach(comedi_device * dev, comedi_devconfig * it)
+static int pcl812_attach(struct comedi_device * dev, comedi_devconfig * it)
{
int ret, subdev;
unsigned long iobase;
@@ -1590,7 +1590,7 @@ static int pcl812_attach(comedi_device * dev, comedi_devconfig * it)
/*
==============================================================================
*/
-static int pcl812_detach(comedi_device * dev)
+static int pcl812_detach(struct comedi_device * dev)
{
#ifdef PCL812_EXTDEBUG
diff --git a/drivers/staging/comedi/drivers/pcl816.c b/drivers/staging/comedi/drivers/pcl816.c
index cb795736300d..5d8509f45a08 100644
--- a/drivers/staging/comedi/drivers/pcl816.c
+++ b/drivers/staging/comedi/drivers/pcl816.c
@@ -146,8 +146,8 @@ static const boardtype boardtypes[] = {
#define devpriv ((pcl816_private *)dev->private)
#define this_board ((const boardtype *)dev->board_ptr)
-static int pcl816_attach(comedi_device * dev, comedi_devconfig * it);
-static int pcl816_detach(comedi_device * dev);
+static int pcl816_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int pcl816_detach(struct comedi_device * dev);
#ifdef unused
static int RTC_lock = 0; /* RTC lock */
@@ -209,24 +209,24 @@ typedef struct {
/*
==============================================================================
*/
-static int check_and_setup_channel_list(comedi_device * dev,
+static int check_and_setup_channel_list(struct comedi_device * dev,
comedi_subdevice * s, unsigned int *chanlist, int chanlen);
-static int pcl816_ai_cancel(comedi_device * dev, comedi_subdevice * s);
-static void start_pacer(comedi_device * dev, int mode, unsigned int divisor1,
+static int pcl816_ai_cancel(struct comedi_device * dev, comedi_subdevice * s);
+static void start_pacer(struct comedi_device * dev, int mode, unsigned int divisor1,
unsigned int divisor2);
#ifdef unused
static int set_rtc_irq_bit(unsigned char bit);
#endif
-static int pcl816_ai_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int pcl816_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd);
-static int pcl816_ai_cmd(comedi_device * dev, comedi_subdevice * s);
+static int pcl816_ai_cmd(struct comedi_device * dev, comedi_subdevice * s);
/*
==============================================================================
ANALOG INPUT MODE0, 816 cards, slow version
*/
-static int pcl816_ai_insn_read(comedi_device * dev, comedi_subdevice * s,
+static int pcl816_ai_insn_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n;
@@ -280,7 +280,7 @@ static int pcl816_ai_insn_read(comedi_device * dev, comedi_subdevice * s,
*/
static irqreturn_t interrupt_pcl816_ai_mode13_int(int irq, void *d)
{
- comedi_device *dev = d;
+ struct comedi_device *dev = d;
comedi_subdevice *s = dev->subdevices + 0;
int low, hi;
int timeout = 50; /* wait max 50us */
@@ -330,7 +330,7 @@ static irqreturn_t interrupt_pcl816_ai_mode13_int(int irq, void *d)
==============================================================================
analog input dma mode 1 & 3, 816 cards
*/
-static void transfer_from_dma_buf(comedi_device * dev, comedi_subdevice * s,
+static void transfer_from_dma_buf(struct comedi_device * dev, comedi_subdevice * s,
short * ptr, unsigned int bufptr, unsigned int len)
{
int i;
@@ -361,7 +361,7 @@ static void transfer_from_dma_buf(comedi_device * dev, comedi_subdevice * s,
static irqreturn_t interrupt_pcl816_ai_mode13_dma(int irq, void *d)
{
- comedi_device *dev = d;
+ struct comedi_device *dev = d;
comedi_subdevice *s = dev->subdevices + 0;
int len, bufptr, this_dma_buf;
unsigned long dma_flags;
@@ -407,7 +407,7 @@ static irqreturn_t interrupt_pcl816_ai_mode13_dma(int irq, void *d)
*/
static irqreturn_t interrupt_pcl816(int irq, void *d PT_REGS_ARG)
{
- comedi_device *dev = d;
+ struct comedi_device *dev = d;
DPRINTK("<I>");
if (!dev->attached) {
@@ -458,7 +458,7 @@ static void pcl816_cmdtest_out(int e, comedi_cmd * cmd)
/*
==============================================================================
*/
-static int pcl816_ai_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int pcl816_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
@@ -593,7 +593,7 @@ static int pcl816_ai_cmdtest(comedi_device * dev, comedi_subdevice * s,
return 0;
}
-static int pcl816_ai_cmd(comedi_device * dev, comedi_subdevice * s)
+static int pcl816_ai_cmd(struct comedi_device * dev, comedi_subdevice * s)
{
unsigned int divisor1 = 0, divisor2 = 0, dma_flags, bytes, dmairq;
comedi_cmd *cmd = &s->async->cmd;
@@ -698,7 +698,7 @@ static int pcl816_ai_cmd(comedi_device * dev, comedi_subdevice * s)
return 0;
}
-static int pcl816_ai_poll(comedi_device * dev, comedi_subdevice * s)
+static int pcl816_ai_poll(struct comedi_device * dev, comedi_subdevice * s)
{
unsigned long flags;
unsigned int top1, top2, i;
@@ -741,7 +741,7 @@ static int pcl816_ai_poll(comedi_device * dev, comedi_subdevice * s)
==============================================================================
cancel any mode 1-4 AI
*/
-static int pcl816_ai_cancel(comedi_device * dev, comedi_subdevice * s)
+static int pcl816_ai_cancel(struct comedi_device * dev, comedi_subdevice * s)
{
// DEBUG(rt_printk("pcl816_ai_cancel()\n");)
@@ -809,7 +809,7 @@ static int pcl816_check(unsigned long iobase)
==============================================================================
reset whole PCL-816 cards
*/
-static void pcl816_reset(comedi_device * dev)
+static void pcl816_reset(struct comedi_device * dev)
{
// outb (0, dev->iobase + PCL818_DA_LO); // DAC=0V
// outb (0, dev->iobase + PCL818_DA_HI);
@@ -831,7 +831,7 @@ static void pcl816_reset(comedi_device * dev)
Start/stop pacer onboard pacer
*/
static void
-start_pacer(comedi_device * dev, int mode, unsigned int divisor1,
+start_pacer(struct comedi_device * dev, int mode, unsigned int divisor1,
unsigned int divisor2)
{
outb(0x32, dev->iobase + PCL816_CTRCTL);
@@ -861,7 +861,7 @@ start_pacer(comedi_device * dev, int mode, unsigned int divisor1,
If it's ok, then program scan/gain logic
*/
static int
-check_and_setup_channel_list(comedi_device * dev, comedi_subdevice * s,
+check_and_setup_channel_list(struct comedi_device * dev, comedi_subdevice * s,
unsigned int *chanlist, int chanlen)
{
unsigned int chansegment[16];
@@ -975,7 +975,7 @@ static int set_rtc_irq_bit(unsigned char bit)
==============================================================================
Free any resources that we have claimed
*/
-static void free_resources(comedi_device * dev)
+static void free_resources(struct comedi_device * dev)
{
//rt_printk("free_resource()\n");
if (dev->private) {
@@ -1011,7 +1011,7 @@ static void free_resources(comedi_device * dev)
Initialization
*/
-static int pcl816_attach(comedi_device * dev, comedi_devconfig * it)
+static int pcl816_attach(struct comedi_device * dev, comedi_devconfig * it)
{
int ret;
unsigned long iobase;
@@ -1234,7 +1234,7 @@ case COMEDI_SUBD_DO:
==============================================================================
Removes device
*/
-static int pcl816_detach(comedi_device * dev)
+static int pcl816_detach(struct comedi_device * dev)
{
DEBUG(rt_printk("comedi%d: pcl816: remove\n", dev->minor);
)
diff --git a/drivers/staging/comedi/drivers/pcl818.c b/drivers/staging/comedi/drivers/pcl818.c
index 5425c196bed1..156788916b50 100644
--- a/drivers/staging/comedi/drivers/pcl818.c
+++ b/drivers/staging/comedi/drivers/pcl818.c
@@ -244,8 +244,8 @@ static const comedi_lrange range718_bipolar0_5 = { 1, {BIP_RANGE(0.5),} };
static const comedi_lrange range718_unipolar2 = { 1, {UNI_RANGE(2),} };
static const comedi_lrange range718_unipolar1 = { 1, {BIP_RANGE(1),} };
-static int pcl818_attach(comedi_device * dev, comedi_devconfig * it);
-static int pcl818_detach(comedi_device * dev);
+static int pcl818_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int pcl818_detach(struct comedi_device * dev);
#ifdef unused
static int RTC_lock = 0; /* RTC lock */
@@ -368,13 +368,13 @@ static const unsigned int muxonechan[] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0
/*
==============================================================================
*/
-static void setup_channel_list(comedi_device * dev, comedi_subdevice * s,
+static void setup_channel_list(struct comedi_device * dev, comedi_subdevice * s,
unsigned int *chanlist, unsigned int n_chan, unsigned int seglen);
-static int check_channel_list(comedi_device * dev, comedi_subdevice * s,
+static int check_channel_list(struct comedi_device * dev, comedi_subdevice * s,
unsigned int *chanlist, unsigned int n_chan);
-static int pcl818_ai_cancel(comedi_device * dev, comedi_subdevice * s);
-static void start_pacer(comedi_device * dev, int mode, unsigned int divisor1,
+static int pcl818_ai_cancel(struct comedi_device * dev, comedi_subdevice * s);
+static void start_pacer(struct comedi_device * dev, int mode, unsigned int divisor1,
unsigned int divisor2);
#ifdef unused
@@ -387,7 +387,7 @@ static int rtc_setfreq_irq(int freq);
==============================================================================
ANALOG INPUT MODE0, 818 cards, slow version
*/
-static int pcl818_ai_insn_read(comedi_device * dev, comedi_subdevice * s,
+static int pcl818_ai_insn_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n;
@@ -434,7 +434,7 @@ static int pcl818_ai_insn_read(comedi_device * dev, comedi_subdevice * s,
ANALOG OUTPUT MODE0, 818 cards
only one sample per call is supported
*/
-static int pcl818_ao_insn_read(comedi_device * dev, comedi_subdevice * s,
+static int pcl818_ao_insn_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n;
@@ -447,7 +447,7 @@ static int pcl818_ao_insn_read(comedi_device * dev, comedi_subdevice * s,
return n;
}
-static int pcl818_ao_insn_write(comedi_device * dev, comedi_subdevice * s,
+static int pcl818_ao_insn_write(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n;
@@ -470,7 +470,7 @@ static int pcl818_ao_insn_write(comedi_device * dev, comedi_subdevice * s,
only one sample per call is supported
*/
-static int pcl818_di_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int pcl818_di_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
@@ -488,7 +488,7 @@ static int pcl818_di_insn_bits(comedi_device * dev, comedi_subdevice * s,
only one sample per call is supported
*/
-static int pcl818_do_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int pcl818_do_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
@@ -512,7 +512,7 @@ static int pcl818_do_insn_bits(comedi_device * dev, comedi_subdevice * s,
*/
static irqreturn_t interrupt_pcl818_ai_mode13_int(int irq, void *d)
{
- comedi_device *dev = d;
+ struct comedi_device *dev = d;
comedi_subdevice *s = dev->subdevices + 0;
int low;
int timeout = 50; /* wait max 50us */
@@ -565,7 +565,7 @@ static irqreturn_t interrupt_pcl818_ai_mode13_int(int irq, void *d)
*/
static irqreturn_t interrupt_pcl818_ai_mode13_dma(int irq, void *d)
{
- comedi_device *dev = d;
+ struct comedi_device *dev = d;
comedi_subdevice *s = dev->subdevices + 0;
int i, len, bufptr;
unsigned long flags;
@@ -640,7 +640,7 @@ static irqreturn_t interrupt_pcl818_ai_mode13_dma(int irq, void *d)
*/
static irqreturn_t interrupt_pcl818_ai_mode13_dma_rtc(int irq, void *d)
{
- comedi_device *dev = d;
+ struct comedi_device *dev = d;
comedi_subdevice *s = dev->subdevices + 0;
unsigned long tmp;
unsigned int top1, top2, i, bufptr;
@@ -738,7 +738,7 @@ static irqreturn_t interrupt_pcl818_ai_mode13_dma_rtc(int irq, void *d)
*/
static irqreturn_t interrupt_pcl818_ai_mode13_fifo(int irq, void *d)
{
- comedi_device *dev = d;
+ struct comedi_device *dev = d;
comedi_subdevice *s = dev->subdevices + 0;
int i, len, lo;
@@ -808,7 +808,7 @@ static irqreturn_t interrupt_pcl818_ai_mode13_fifo(int irq, void *d)
*/
static irqreturn_t interrupt_pcl818(int irq, void *d PT_REGS_ARG)
{
- comedi_device *dev = d;
+ struct comedi_device *dev = d;
if (!dev->attached) {
comedi_error(dev, "premature interrupt");
@@ -870,7 +870,7 @@ static irqreturn_t interrupt_pcl818(int irq, void *d PT_REGS_ARG)
==============================================================================
ANALOG INPUT MODE 1 or 3 DMA , 818 cards
*/
-static void pcl818_ai_mode13dma_int(int mode, comedi_device * dev,
+static void pcl818_ai_mode13dma_int(int mode, struct comedi_device * dev,
comedi_subdevice * s)
{
unsigned int flags;
@@ -911,7 +911,7 @@ static void pcl818_ai_mode13dma_int(int mode, comedi_device * dev,
==============================================================================
ANALOG INPUT MODE 1 or 3 DMA rtc, 818 cards
*/
-static void pcl818_ai_mode13dma_rtc(int mode, comedi_device * dev,
+static void pcl818_ai_mode13dma_rtc(int mode, struct comedi_device * dev,
comedi_subdevice * s)
{
unsigned int flags;
@@ -952,7 +952,7 @@ static void pcl818_ai_mode13dma_rtc(int mode, comedi_device * dev,
==============================================================================
ANALOG INPUT MODE 1 or 3, 818 cards
*/
-static int pcl818_ai_cmd_mode(int mode, comedi_device * dev,
+static int pcl818_ai_cmd_mode(int mode, struct comedi_device * dev,
comedi_subdevice * s)
{
comedi_cmd *cmd = &s->async->cmd;
@@ -1063,7 +1063,7 @@ static int pcl818_ai_cmd_mode(int mode, comedi_device * dev,
ANALOG OUTPUT MODE 1 or 3, 818 cards
*/
#ifdef PCL818_MODE13_AO
-static int pcl818_ao_mode13(int mode, comedi_device * dev, comedi_subdevice * s,
+static int pcl818_ao_mode13(int mode, struct comedi_device * dev, comedi_subdevice * s,
comedi_trig * it)
{
int divisor1, divisor2;
@@ -1116,7 +1116,7 @@ static int pcl818_ao_mode13(int mode, comedi_device * dev, comedi_subdevice * s,
==============================================================================
ANALOG OUTPUT MODE 1, 818 cards
*/
-static int pcl818_ao_mode1(comedi_device * dev, comedi_subdevice * s,
+static int pcl818_ao_mode1(struct comedi_device * dev, comedi_subdevice * s,
comedi_trig * it)
{
return pcl818_ao_mode13(1, dev, s, it);
@@ -1126,7 +1126,7 @@ static int pcl818_ao_mode1(comedi_device * dev, comedi_subdevice * s,
==============================================================================
ANALOG OUTPUT MODE 3, 818 cards
*/
-static int pcl818_ao_mode3(comedi_device * dev, comedi_subdevice * s,
+static int pcl818_ao_mode3(struct comedi_device * dev, comedi_subdevice * s,
comedi_trig * it)
{
return pcl818_ao_mode13(3, dev, s, it);
@@ -1138,7 +1138,7 @@ static int pcl818_ao_mode3(comedi_device * dev, comedi_subdevice * s,
==============================================================================
Start/stop pacer onboard pacer
*/
-static void start_pacer(comedi_device * dev, int mode, unsigned int divisor1,
+static void start_pacer(struct comedi_device * dev, int mode, unsigned int divisor1,
unsigned int divisor2)
{
outb(0xb4, dev->iobase + PCL818_CTRCTL);
@@ -1158,7 +1158,7 @@ static void start_pacer(comedi_device * dev, int mode, unsigned int divisor1,
Check if channel list from user is builded correctly
If it's ok, then program scan/gain logic
*/
-static int check_channel_list(comedi_device * dev, comedi_subdevice * s,
+static int check_channel_list(struct comedi_device * dev, comedi_subdevice * s,
unsigned int *chanlist, unsigned int n_chan)
{
unsigned int chansegment[16];
@@ -1214,7 +1214,7 @@ static int check_channel_list(comedi_device * dev, comedi_subdevice * s,
return seglen;
}
-static void setup_channel_list(comedi_device * dev, comedi_subdevice * s,
+static void setup_channel_list(struct comedi_device * dev, comedi_subdevice * s,
unsigned int *chanlist, unsigned int n_chan, unsigned int seglen)
{
int i;
@@ -1251,7 +1251,7 @@ static int check_single_ended(unsigned int port)
/*
==============================================================================
*/
-static int ai_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
@@ -1396,7 +1396,7 @@ static int ai_cmdtest(comedi_device * dev, comedi_subdevice * s,
/*
==============================================================================
*/
-static int ai_cmd(comedi_device * dev, comedi_subdevice * s)
+static int ai_cmd(struct comedi_device * dev, comedi_subdevice * s)
{
comedi_cmd *cmd = &s->async->cmd;
int retval;
@@ -1435,7 +1435,7 @@ static int ai_cmd(comedi_device * dev, comedi_subdevice * s)
==============================================================================
cancel any mode 1-4 AI
*/
-static int pcl818_ai_cancel(comedi_device * dev, comedi_subdevice * s)
+static int pcl818_ai_cancel(struct comedi_device * dev, comedi_subdevice * s)
{
if (devpriv->irq_blocked > 0) {
rt_printk("pcl818_ai_cancel()\n");
@@ -1516,7 +1516,7 @@ static int pcl818_check(unsigned long iobase)
==============================================================================
reset whole PCL-818 cards
*/
-static void pcl818_reset(comedi_device * dev)
+static void pcl818_reset(struct comedi_device * dev)
{
if (devpriv->usefifo) { // FIFO shutdown
outb(0, dev->iobase + PCL818_FI_INTCLR);
@@ -1586,7 +1586,7 @@ static int set_rtc_irq_bit(unsigned char bit)
*/
static void rtc_dropped_irq(unsigned long data)
{
- comedi_device *dev = (void *)data;
+ struct comedi_device *dev = (void *)data;
unsigned long flags, tmp;
switch (devpriv->int818_mode) {
@@ -1637,7 +1637,7 @@ static int rtc_setfreq_irq(int freq)
==============================================================================
Free any resources that we have claimed
*/
-static void free_resources(comedi_device * dev)
+static void free_resources(struct comedi_device * dev)
{
//rt_printk("free_resource()\n");
if (dev->private) {
@@ -1675,7 +1675,7 @@ static void free_resources(comedi_device * dev)
Initialization
*/
-static int pcl818_attach(comedi_device * dev, comedi_devconfig * it)
+static int pcl818_attach(struct comedi_device * dev, comedi_devconfig * it)
{
int ret;
unsigned long iobase;
@@ -1976,7 +1976,7 @@ static int pcl818_attach(comedi_device * dev, comedi_devconfig * it)
==============================================================================
Removes device
*/
-static int pcl818_detach(comedi_device * dev)
+static int pcl818_detach(struct comedi_device * dev)
{
// rt_printk("comedi%d: pcl818: remove\n", dev->minor);
free_resources(dev);
diff --git a/drivers/staging/comedi/drivers/pcm3724.c b/drivers/staging/comedi/drivers/pcm3724.c
index c4458442d5be..aa4ecddcf2a1 100644
--- a/drivers/staging/comedi/drivers/pcm3724.c
+++ b/drivers/staging/comedi/drivers/pcm3724.c
@@ -62,8 +62,8 @@ Copy/pasted/hacked from pcm724.c
#define CR_A_MODE(a) ((a)<<5)
#define CR_CW 0x80
-static int pcm3724_attach(comedi_device * dev, comedi_devconfig * it);
-static int pcm3724_detach(comedi_device * dev);
+static int pcm3724_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int pcm3724_detach(struct comedi_device * dev);
typedef struct {
const char *name; // driver name
@@ -142,7 +142,7 @@ static int compute_buffer(int config, int devno, comedi_subdevice * s)
return config;
}
-static void do_3724_config(comedi_device * dev, comedi_subdevice * s,
+static void do_3724_config(struct comedi_device * dev, comedi_subdevice * s,
int chanspec)
{
int config;
@@ -176,7 +176,7 @@ static void do_3724_config(comedi_device * dev, comedi_subdevice * s,
outb(config, port_8255_cfg);
}
-static void enable_chan(comedi_device * dev, comedi_subdevice * s, int chanspec)
+static void enable_chan(struct comedi_device * dev, comedi_subdevice * s, int chanspec)
{
unsigned int mask;
int gatecfg;
@@ -214,7 +214,7 @@ static void enable_chan(comedi_device * dev, comedi_subdevice * s, int chanspec)
}
/* overriding the 8255 insn config */
-static int subdev_3724_insn_config(comedi_device * dev, comedi_subdevice * s,
+static int subdev_3724_insn_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
unsigned int mask;
@@ -251,7 +251,7 @@ static int subdev_3724_insn_config(comedi_device * dev, comedi_subdevice * s,
return 1;
}
-static int pcm3724_attach(comedi_device * dev, comedi_devconfig * it)
+static int pcm3724_attach(struct comedi_device * dev, comedi_devconfig * it)
{
unsigned long iobase;
unsigned int iorange;
@@ -289,7 +289,7 @@ static int pcm3724_attach(comedi_device * dev, comedi_devconfig * it)
return 0;
}
-static int pcm3724_detach(comedi_device * dev)
+static int pcm3724_detach(struct comedi_device * dev)
{
int i;
diff --git a/drivers/staging/comedi/drivers/pcm3730.c b/drivers/staging/comedi/drivers/pcm3730.c
index 1283be635ef8..c7d275f1fcbb 100644
--- a/drivers/staging/comedi/drivers/pcm3730.c
+++ b/drivers/staging/comedi/drivers/pcm3730.c
@@ -28,8 +28,8 @@ Configuration options:
#define PCM3730_DIB 2
#define PCM3730_DIC 3
-static int pcm3730_attach(comedi_device * dev, comedi_devconfig * it);
-static int pcm3730_detach(comedi_device * dev);
+static int pcm3730_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int pcm3730_detach(struct comedi_device * dev);
static comedi_driver driver_pcm3730 = {
driver_name:"pcm3730",
module:THIS_MODULE,
@@ -39,7 +39,7 @@ static comedi_driver driver_pcm3730 = {
COMEDI_INITCLEANUP(driver_pcm3730);
-static int pcm3730_do_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int pcm3730_do_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
@@ -54,7 +54,7 @@ static int pcm3730_do_insn_bits(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int pcm3730_di_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int pcm3730_di_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
@@ -63,7 +63,7 @@ static int pcm3730_di_insn_bits(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int pcm3730_attach(comedi_device * dev, comedi_devconfig * it)
+static int pcm3730_attach(struct comedi_device * dev, comedi_devconfig * it)
{
comedi_subdevice *s;
unsigned long iobase;
@@ -141,7 +141,7 @@ static int pcm3730_attach(comedi_device * dev, comedi_devconfig * it)
return 0;
}
-static int pcm3730_detach(comedi_device * dev)
+static int pcm3730_detach(struct comedi_device * dev)
{
printk("comedi%d: pcm3730: remove\n", dev->minor);
diff --git a/drivers/staging/comedi/drivers/pcmad.c b/drivers/staging/comedi/drivers/pcmad.c
index 1a371da6f828..08fe79ab59f3 100644
--- a/drivers/staging/comedi/drivers/pcmad.c
+++ b/drivers/staging/comedi/drivers/pcmad.c
@@ -76,8 +76,8 @@ struct pcmad_priv_struct {
};
#define devpriv ((struct pcmad_priv_struct *)dev->private)
-static int pcmad_attach(comedi_device * dev, comedi_devconfig * it);
-static int pcmad_detach(comedi_device * dev);
+static int pcmad_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int pcmad_detach(struct comedi_device * dev);
static comedi_driver driver_pcmad = {
driver_name:"pcmad",
module:THIS_MODULE,
@@ -92,7 +92,7 @@ COMEDI_INITCLEANUP(driver_pcmad);
#define TIMEOUT 100
-static int pcmad_ai_insn_read(comedi_device * dev, comedi_subdevice * s,
+static int pcmad_ai_insn_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
@@ -126,7 +126,7 @@ static int pcmad_ai_insn_read(comedi_device * dev, comedi_subdevice * s,
* 2 0=single ended 1=differential
* 3 0=straight binary 1=two's comp
*/
-static int pcmad_attach(comedi_device * dev, comedi_devconfig * it)
+static int pcmad_attach(struct comedi_device * dev, comedi_devconfig * it)
{
int ret;
comedi_subdevice *s;
@@ -159,7 +159,7 @@ static int pcmad_attach(comedi_device * dev, comedi_devconfig * it)
return 0;
}
-static int pcmad_detach(comedi_device * dev)
+static int pcmad_detach(struct comedi_device * dev)
{
printk("comedi%d: pcmad: remove\n", dev->minor);
diff --git a/drivers/staging/comedi/drivers/pcmda12.c b/drivers/staging/comedi/drivers/pcmda12.c
index c8963cdf5a5f..6a3a22ed726f 100644
--- a/drivers/staging/comedi/drivers/pcmda12.c
+++ b/drivers/staging/comedi/drivers/pcmda12.c
@@ -105,10 +105,10 @@ typedef struct {
* the board, and also about the kernel module that contains
* the device code.
*/
-static int pcmda12_attach(comedi_device * dev, comedi_devconfig * it);
-static int pcmda12_detach(comedi_device * dev);
+static int pcmda12_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int pcmda12_detach(struct comedi_device * dev);
-static void zero_chans(comedi_device * dev);
+static void zero_chans(struct comedi_device * dev);
static comedi_driver driver = {
driver_name:"pcmda12",
@@ -138,9 +138,9 @@ static comedi_driver driver = {
num_names:sizeof(pcmda12_boards) / sizeof(pcmda12_board),
};
-static int ao_winsn(comedi_device * dev, comedi_subdevice * s,
+static int ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int ao_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
/*
@@ -149,7 +149,7 @@ static int ao_rinsn(comedi_device * dev, comedi_subdevice * s,
* in the driver structure, dev->board_ptr contains that
* address.
*/
-static int pcmda12_attach(comedi_device * dev, comedi_devconfig * it)
+static int pcmda12_attach(struct comedi_device * dev, comedi_devconfig * it)
{
comedi_subdevice *s;
unsigned long iobase;
@@ -218,7 +218,7 @@ static int pcmda12_attach(comedi_device * dev, comedi_devconfig * it)
* allocated by _attach(). dev->private and dev->subdevices are
* deallocated automatically by the core.
*/
-static int pcmda12_detach(comedi_device * dev)
+static int pcmda12_detach(struct comedi_device * dev)
{
printk("comedi%d: %s: remove\n", dev->minor, driver.driver_name);
if (dev->iobase)
@@ -226,7 +226,7 @@ static int pcmda12_detach(comedi_device * dev)
return 0;
}
-static void zero_chans(comedi_device * dev)
+static void zero_chans(struct comedi_device * dev)
{ /* sets up an
ASIC chip to defaults */
int i;
@@ -239,7 +239,7 @@ static void zero_chans(comedi_device * dev)
inb(LSB_PORT(0)); /* update chans. */
}
-static int ao_winsn(comedi_device * dev, comedi_subdevice * s,
+static int ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
@@ -281,7 +281,7 @@ static int ao_winsn(comedi_device * dev, comedi_subdevice * s,
DAC outputs, which makes all AO channels update simultaneously.
This is useful for some control applications, I would imagine.
*/
-static int ao_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
diff --git a/drivers/staging/comedi/drivers/pcmmio.c b/drivers/staging/comedi/drivers/pcmmio.c
index 739959cd2cfd..77f62cddddb3 100644
--- a/drivers/staging/comedi/drivers/pcmmio.c
+++ b/drivers/staging/comedi/drivers/pcmmio.c
@@ -139,14 +139,14 @@ Configuration Options:
#define PAGE_ENAB 2
#define PAGE_INT_ID 3
-typedef int (*comedi_insn_fn_t) (comedi_device *, comedi_subdevice *,
+typedef int (*comedi_insn_fn_t) (struct comedi_device *, comedi_subdevice *,
comedi_insn *, unsigned int *);
-static int ai_rinsn(comedi_device *, comedi_subdevice *, comedi_insn *,
+static int ai_rinsn(struct comedi_device *, comedi_subdevice *, comedi_insn *,
unsigned int *);
-static int ao_rinsn(comedi_device *, comedi_subdevice *, comedi_insn *,
+static int ao_rinsn(struct comedi_device *, comedi_subdevice *, comedi_insn *,
unsigned int *);
-static int ao_winsn(comedi_device *, comedi_subdevice *, comedi_insn *,
+static int ao_winsn(struct comedi_device *, comedi_subdevice *, comedi_insn *,
unsigned int *);
/*
@@ -237,7 +237,7 @@ typedef struct {
/* this structure is for data unique to this hardware driver. If
several hardware drivers keep similar information in this structure,
- feel free to suggest moving the variable to the comedi_device struct. */
+ feel free to suggest moving the variable to the struct comedi_device struct. */
typedef struct {
/* stuff for DIO */
struct {
@@ -264,8 +264,8 @@ typedef struct {
* the board, and also about the kernel module that contains
* the device code.
*/
-static int pcmmio_attach(comedi_device * dev, comedi_devconfig * it);
-static int pcmmio_detach(comedi_device * dev);
+static int pcmmio_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int pcmmio_detach(struct comedi_device * dev);
static comedi_driver driver = {
driver_name:"pcmmio",
@@ -295,24 +295,24 @@ static comedi_driver driver = {
num_names:sizeof(pcmmio_boards) / sizeof(pcmmio_board),
};
-static int pcmmio_dio_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int pcmmio_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int pcmmio_dio_insn_config(comedi_device * dev, comedi_subdevice * s,
+static int pcmmio_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
static irqreturn_t interrupt_pcmmio(int irq, void *d PT_REGS_ARG);
-static void pcmmio_stop_intr(comedi_device *, comedi_subdevice *);
-static int pcmmio_cancel(comedi_device * dev, comedi_subdevice * s);
-static int pcmmio_cmd(comedi_device * dev, comedi_subdevice * s);
-static int pcmmio_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static void pcmmio_stop_intr(struct comedi_device *, comedi_subdevice *);
+static int pcmmio_cancel(struct comedi_device * dev, comedi_subdevice * s);
+static int pcmmio_cmd(struct comedi_device * dev, comedi_subdevice * s);
+static int pcmmio_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd);
/* some helper functions to deal with specifics of this device's registers */
-static void init_asics(comedi_device * dev); /* sets up/clears ASIC chips to defaults */
-static void switch_page(comedi_device * dev, int asic, int page);
+static void init_asics(struct comedi_device * dev); /* sets up/clears ASIC chips to defaults */
+static void switch_page(struct comedi_device * dev, int asic, int page);
#ifdef notused
-static void lock_port(comedi_device * dev, int asic, int port);
-static void unlock_port(comedi_device * dev, int asic, int port);
+static void lock_port(struct comedi_device * dev, int asic, int port);
+static void unlock_port(struct comedi_device * dev, int asic, int port);
#endif
/*
@@ -321,7 +321,7 @@ static void unlock_port(comedi_device * dev, int asic, int port);
* in the driver structure, dev->board_ptr contains that
* address.
*/
-static int pcmmio_attach(comedi_device * dev, comedi_devconfig * it)
+static int pcmmio_attach(struct comedi_device * dev, comedi_devconfig * it)
{
comedi_subdevice *s;
int sdev_no, chans_left, n_dio_subdevs, n_subdevs, port, asic,
@@ -526,7 +526,7 @@ static int pcmmio_attach(comedi_device * dev, comedi_devconfig * it)
* allocated by _attach(). dev->private and dev->subdevices are
* deallocated automatically by the core.
*/
-static int pcmmio_detach(comedi_device * dev)
+static int pcmmio_detach(struct comedi_device * dev)
{
int i;
@@ -550,7 +550,7 @@ static int pcmmio_detach(comedi_device * dev)
* useful to applications if you implement the insn_bits interface.
* This allows packed reading/writing of the DIO channels. The
* comedi core can convert between insn_bits and insn_read/write */
-static int pcmmio_dio_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int pcmmio_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int byte_no;
@@ -624,7 +624,7 @@ static int pcmmio_dio_insn_bits(comedi_device * dev, comedi_subdevice * s,
* configured by a special insn_config instruction. chanspec
* contains the channel to be changed, and data[0] contains the
* value COMEDI_INPUT or COMEDI_OUTPUT. */
-static int pcmmio_dio_insn_config(comedi_device * dev, comedi_subdevice * s,
+static int pcmmio_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int chan = CR_CHAN(insn->chanspec), byte_no = chan / 8, bit_no =
@@ -685,7 +685,7 @@ static int pcmmio_dio_insn_config(comedi_device * dev, comedi_subdevice * s,
return insn->n;
}
-static void init_asics(comedi_device * dev)
+static void init_asics(struct comedi_device * dev)
{ /* sets up an
ASIC chip to defaults */
int asic;
@@ -722,7 +722,7 @@ static void init_asics(comedi_device * dev)
}
}
-static void switch_page(comedi_device * dev, int asic, int page)
+static void switch_page(struct comedi_device * dev, int asic, int page)
{
if (asic < 0 || asic >= thisboard->dio_num_asics)
return; /* paranoia */
@@ -738,7 +738,7 @@ static void switch_page(comedi_device * dev, int asic, int page)
}
#ifdef notused
-static void lock_port(comedi_device * dev, int asic, int port)
+static void lock_port(struct comedi_device * dev, int asic, int port)
{
if (asic < 0 || asic >= thisboard->dio_num_asics)
return; /* paranoia */
@@ -752,7 +752,7 @@ static void lock_port(comedi_device * dev, int asic, int port)
return;
}
-static void unlock_port(comedi_device * dev, int asic, int port)
+static void unlock_port(struct comedi_device * dev, int asic, int port)
{
if (asic < 0 || asic >= thisboard->dio_num_asics)
return; /* paranoia */
@@ -768,7 +768,7 @@ static void unlock_port(comedi_device * dev, int asic, int port)
static irqreturn_t interrupt_pcmmio(int irq, void *d PT_REGS_ARG)
{
int asic, got1 = 0;
- comedi_device *dev = (comedi_device *) d;
+ struct comedi_device *dev = (struct comedi_device *) d;
for (asic = 0; asic < MAX_ASICS; ++asic) {
if (irq == devpriv->asics[asic].irq) {
@@ -917,7 +917,7 @@ static irqreturn_t interrupt_pcmmio(int irq, void *d PT_REGS_ARG)
return IRQ_HANDLED;
}
-static void pcmmio_stop_intr(comedi_device * dev, comedi_subdevice * s)
+static void pcmmio_stop_intr(struct comedi_device * dev, comedi_subdevice * s)
{
int nports, firstport, asic, port;
@@ -936,7 +936,7 @@ static void pcmmio_stop_intr(comedi_device * dev, comedi_subdevice * s)
}
}
-static int pcmmio_start_intr(comedi_device * dev, comedi_subdevice * s)
+static int pcmmio_start_intr(struct comedi_device * dev, comedi_subdevice * s)
{
if (!subpriv->dio.intr.continuous && subpriv->dio.intr.stop_count == 0) {
/* An empty acquisition! */
@@ -995,7 +995,7 @@ static int pcmmio_start_intr(comedi_device * dev, comedi_subdevice * s)
return 0;
}
-static int pcmmio_cancel(comedi_device * dev, comedi_subdevice * s)
+static int pcmmio_cancel(struct comedi_device * dev, comedi_subdevice * s)
{
unsigned long flags;
@@ -1011,7 +1011,7 @@ static int pcmmio_cancel(comedi_device * dev, comedi_subdevice * s)
* Internal trigger function to start acquisition for an 'INTERRUPT' subdevice.
*/
static int
-pcmmio_inttrig_start_intr(comedi_device * dev, comedi_subdevice * s,
+pcmmio_inttrig_start_intr(struct comedi_device * dev, comedi_subdevice * s,
unsigned int trignum)
{
unsigned long flags;
@@ -1037,7 +1037,7 @@ pcmmio_inttrig_start_intr(comedi_device * dev, comedi_subdevice * s,
/*
* 'do_cmd' function for an 'INTERRUPT' subdevice.
*/
-static int pcmmio_cmd(comedi_device * dev, comedi_subdevice * s)
+static int pcmmio_cmd(struct comedi_device * dev, comedi_subdevice * s)
{
comedi_cmd *cmd = &s->async->cmd;
unsigned long flags;
@@ -1082,7 +1082,7 @@ static int pcmmio_cmd(comedi_device * dev, comedi_subdevice * s)
* 'do_cmdtest' function for an 'INTERRUPT' subdevice.
*/
static int
-pcmmio_cmdtest(comedi_device * dev, comedi_subdevice * s, comedi_cmd * cmd)
+pcmmio_cmdtest(struct comedi_device * dev, comedi_subdevice * s, comedi_cmd * cmd)
{
int err = 0;
unsigned int tmp;
@@ -1194,7 +1194,7 @@ static int adc_wait_ready(unsigned long iobase)
}
/* All this is for AI and AO */
-static int ai_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n;
@@ -1258,7 +1258,7 @@ static int ai_rinsn(comedi_device * dev, comedi_subdevice * s,
return n;
}
-static int ao_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n;
@@ -1288,7 +1288,7 @@ static int wait_dac_ready(unsigned long iobase)
return 1;
}
-static int ao_winsn(comedi_device * dev, comedi_subdevice * s,
+static int ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n;
diff --git a/drivers/staging/comedi/drivers/pcmuio.c b/drivers/staging/comedi/drivers/pcmuio.c
index f40f91987e30..d2af7082c1e8 100644
--- a/drivers/staging/comedi/drivers/pcmuio.c
+++ b/drivers/staging/comedi/drivers/pcmuio.c
@@ -196,7 +196,7 @@ typedef struct {
/* this structure is for data unique to this hardware driver. If
several hardware drivers keep similar information in this structure,
- feel free to suggest moving the variable to the comedi_device struct. */
+ feel free to suggest moving the variable to the struct comedi_device struct. */
typedef struct {
struct {
unsigned char pagelock; /* current page and lock */
@@ -222,8 +222,8 @@ typedef struct {
* the board, and also about the kernel module that contains
* the device code.
*/
-static int pcmuio_attach(comedi_device * dev, comedi_devconfig * it);
-static int pcmuio_detach(comedi_device * dev);
+static int pcmuio_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int pcmuio_detach(struct comedi_device * dev);
static comedi_driver driver = {
driver_name:"pcmuio",
@@ -253,24 +253,24 @@ static comedi_driver driver = {
num_names:sizeof(pcmuio_boards) / sizeof(pcmuio_board),
};
-static int pcmuio_dio_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int pcmuio_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int pcmuio_dio_insn_config(comedi_device * dev, comedi_subdevice * s,
+static int pcmuio_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
static irqreturn_t interrupt_pcmuio(int irq, void *d PT_REGS_ARG);
-static void pcmuio_stop_intr(comedi_device *, comedi_subdevice *);
-static int pcmuio_cancel(comedi_device * dev, comedi_subdevice * s);
-static int pcmuio_cmd(comedi_device * dev, comedi_subdevice * s);
-static int pcmuio_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static void pcmuio_stop_intr(struct comedi_device *, comedi_subdevice *);
+static int pcmuio_cancel(struct comedi_device * dev, comedi_subdevice * s);
+static int pcmuio_cmd(struct comedi_device * dev, comedi_subdevice * s);
+static int pcmuio_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd);
/* some helper functions to deal with specifics of this device's registers */
-static void init_asics(comedi_device * dev); /* sets up/clears ASIC chips to defaults */
-static void switch_page(comedi_device * dev, int asic, int page);
+static void init_asics(struct comedi_device * dev); /* sets up/clears ASIC chips to defaults */
+static void switch_page(struct comedi_device * dev, int asic, int page);
#ifdef notused
-static void lock_port(comedi_device * dev, int asic, int port);
-static void unlock_port(comedi_device * dev, int asic, int port);
+static void lock_port(struct comedi_device * dev, int asic, int port);
+static void unlock_port(struct comedi_device * dev, int asic, int port);
#endif
/*
@@ -279,7 +279,7 @@ static void unlock_port(comedi_device * dev, int asic, int port);
* in the driver structure, dev->board_ptr contains that
* address.
*/
-static int pcmuio_attach(comedi_device * dev, comedi_devconfig * it)
+static int pcmuio_attach(struct comedi_device * dev, comedi_devconfig * it)
{
comedi_subdevice *s;
int sdev_no, chans_left, n_subdevs, port, asic, thisasic_chanct = 0;
@@ -450,7 +450,7 @@ static int pcmuio_attach(comedi_device * dev, comedi_devconfig * it)
* allocated by _attach(). dev->private and dev->subdevices are
* deallocated automatically by the core.
*/
-static int pcmuio_detach(comedi_device * dev)
+static int pcmuio_detach(struct comedi_device * dev)
{
int i;
@@ -474,7 +474,7 @@ static int pcmuio_detach(comedi_device * dev)
* useful to applications if you implement the insn_bits interface.
* This allows packed reading/writing of the DIO channels. The
* comedi core can convert between insn_bits and insn_read/write */
-static int pcmuio_dio_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int pcmuio_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int byte_no;
@@ -548,7 +548,7 @@ static int pcmuio_dio_insn_bits(comedi_device * dev, comedi_subdevice * s,
* configured by a special insn_config instruction. chanspec
* contains the channel to be changed, and data[0] contains the
* value COMEDI_INPUT or COMEDI_OUTPUT. */
-static int pcmuio_dio_insn_config(comedi_device * dev, comedi_subdevice * s,
+static int pcmuio_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int chan = CR_CHAN(insn->chanspec), byte_no = chan / 8, bit_no =
@@ -609,7 +609,7 @@ static int pcmuio_dio_insn_config(comedi_device * dev, comedi_subdevice * s,
return insn->n;
}
-static void init_asics(comedi_device * dev)
+static void init_asics(struct comedi_device * dev)
{ /* sets up an
ASIC chip to defaults */
int asic;
@@ -646,7 +646,7 @@ static void init_asics(comedi_device * dev)
}
}
-static void switch_page(comedi_device * dev, int asic, int page)
+static void switch_page(struct comedi_device * dev, int asic, int page)
{
if (asic < 0 || asic >= thisboard->num_asics)
return; /* paranoia */
@@ -662,7 +662,7 @@ static void switch_page(comedi_device * dev, int asic, int page)
}
#ifdef notused
-static void lock_port(comedi_device * dev, int asic, int port)
+static void lock_port(struct comedi_device * dev, int asic, int port)
{
if (asic < 0 || asic >= thisboard->num_asics)
return; /* paranoia */
@@ -675,7 +675,7 @@ static void lock_port(comedi_device * dev, int asic, int port)
dev->iobase + ASIC_IOSIZE * asic + REG_PAGELOCK);
}
-static void unlock_port(comedi_device * dev, int asic, int port)
+static void unlock_port(struct comedi_device * dev, int asic, int port)
{
if (asic < 0 || asic >= thisboard->num_asics)
return; /* paranoia */
@@ -691,7 +691,7 @@ static void unlock_port(comedi_device * dev, int asic, int port)
static irqreturn_t interrupt_pcmuio(int irq, void *d PT_REGS_ARG)
{
int asic, got1 = 0;
- comedi_device *dev = (comedi_device *) d;
+ struct comedi_device *dev = (struct comedi_device *) d;
for (asic = 0; asic < MAX_ASICS; ++asic) {
if (irq == devpriv->asics[asic].irq) {
@@ -837,7 +837,7 @@ static irqreturn_t interrupt_pcmuio(int irq, void *d PT_REGS_ARG)
return IRQ_HANDLED;
}
-static void pcmuio_stop_intr(comedi_device * dev, comedi_subdevice * s)
+static void pcmuio_stop_intr(struct comedi_device * dev, comedi_subdevice * s)
{
int nports, firstport, asic, port;
@@ -856,7 +856,7 @@ static void pcmuio_stop_intr(comedi_device * dev, comedi_subdevice * s)
}
}
-static int pcmuio_start_intr(comedi_device * dev, comedi_subdevice * s)
+static int pcmuio_start_intr(struct comedi_device * dev, comedi_subdevice * s)
{
if (!subpriv->intr.continuous && subpriv->intr.stop_count == 0) {
/* An empty acquisition! */
@@ -905,7 +905,7 @@ static int pcmuio_start_intr(comedi_device * dev, comedi_subdevice * s)
return 0;
}
-static int pcmuio_cancel(comedi_device * dev, comedi_subdevice * s)
+static int pcmuio_cancel(struct comedi_device * dev, comedi_subdevice * s)
{
unsigned long flags;
@@ -921,7 +921,7 @@ static int pcmuio_cancel(comedi_device * dev, comedi_subdevice * s)
* Internal trigger function to start acquisition for an 'INTERRUPT' subdevice.
*/
static int
-pcmuio_inttrig_start_intr(comedi_device * dev, comedi_subdevice * s,
+pcmuio_inttrig_start_intr(struct comedi_device * dev, comedi_subdevice * s,
unsigned int trignum)
{
unsigned long flags;
@@ -947,7 +947,7 @@ pcmuio_inttrig_start_intr(comedi_device * dev, comedi_subdevice * s,
/*
* 'do_cmd' function for an 'INTERRUPT' subdevice.
*/
-static int pcmuio_cmd(comedi_device * dev, comedi_subdevice * s)
+static int pcmuio_cmd(struct comedi_device * dev, comedi_subdevice * s)
{
comedi_cmd *cmd = &s->async->cmd;
unsigned long flags;
@@ -992,7 +992,7 @@ static int pcmuio_cmd(comedi_device * dev, comedi_subdevice * s)
* 'do_cmdtest' function for an 'INTERRUPT' subdevice.
*/
static int
-pcmuio_cmdtest(comedi_device * dev, comedi_subdevice * s, comedi_cmd * cmd)
+pcmuio_cmdtest(struct comedi_device * dev, comedi_subdevice * s, comedi_cmd * cmd)
{
int err = 0;
unsigned int tmp;
diff --git a/drivers/staging/comedi/drivers/poc.c b/drivers/staging/comedi/drivers/poc.c
index d9147d18882d..9cd1472a9120 100644
--- a/drivers/staging/comedi/drivers/poc.c
+++ b/drivers/staging/comedi/drivers/poc.c
@@ -41,30 +41,30 @@ Configuration options:
#include <linux/ioport.h>
-static int poc_attach(comedi_device * dev, comedi_devconfig * it);
-static int poc_detach(comedi_device * dev);
-static int readback_insn(comedi_device * dev, comedi_subdevice * s,
+static int poc_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int poc_detach(struct comedi_device * dev);
+static int readback_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int dac02_ao_winsn(comedi_device * dev, comedi_subdevice * s,
+static int dac02_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int pcl733_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int pcl733_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int pcl734_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int pcl734_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
struct boarddef_struct {
const char *name;
unsigned int iosize;
- int (*setup) (comedi_device *);
+ int (*setup) (struct comedi_device *);
int type;
int n_chan;
int n_bits;
- int (*winsn) (comedi_device *, comedi_subdevice *, comedi_insn *,
+ int (*winsn) (struct comedi_device *, comedi_subdevice *, comedi_insn *,
unsigned int *);
- int (*rinsn) (comedi_device *, comedi_subdevice *, comedi_insn *,
+ int (*rinsn) (struct comedi_device *, comedi_subdevice *, comedi_insn *,
unsigned int *);
- int (*insnbits) (comedi_device *, comedi_subdevice *, comedi_insn *,
+ int (*insnbits) (struct comedi_device *, comedi_subdevice *, comedi_insn *,
unsigned int *);
const comedi_lrange *range;
};
@@ -113,7 +113,7 @@ static comedi_driver driver_poc = {
offset:sizeof(boards[0]),
};
-static int poc_attach(comedi_device * dev, comedi_devconfig * it)
+static int poc_attach(struct comedi_device * dev, comedi_devconfig * it)
{
comedi_subdevice *s;
unsigned long iobase;
@@ -159,7 +159,7 @@ static int poc_attach(comedi_device * dev, comedi_devconfig * it)
return 0;
}
-static int poc_detach(comedi_device * dev)
+static int poc_detach(struct comedi_device * dev)
{
/* only free stuff if it has been allocated by _attach */
if (dev->iobase)
@@ -170,7 +170,7 @@ static int poc_detach(comedi_device * dev)
return 0;
}
-static int readback_insn(comedi_device * dev, comedi_subdevice * s,
+static int readback_insn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int chan;
@@ -185,7 +185,7 @@ static int readback_insn(comedi_device * dev, comedi_subdevice * s,
#define DAC02_LSB(a) (2 * a)
#define DAC02_MSB(a) (2 * a + 1)
-static int dac02_ao_winsn(comedi_device * dev, comedi_subdevice * s,
+static int dac02_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int temp;
@@ -208,7 +208,7 @@ static int dac02_ao_winsn(comedi_device * dev, comedi_subdevice * s,
return 1;
}
-static int pcl733_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int pcl733_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
@@ -222,7 +222,7 @@ static int pcl733_insn_bits(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int pcl734_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int pcl734_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
diff --git a/drivers/staging/comedi/drivers/quatech_daqp_cs.c b/drivers/staging/comedi/drivers/quatech_daqp_cs.c
index ac34c5183c0c..cc6a6daa1f9a 100644
--- a/drivers/staging/comedi/drivers/quatech_daqp_cs.c
+++ b/drivers/staging/comedi/drivers/quatech_daqp_cs.c
@@ -86,7 +86,7 @@ typedef struct local_info_t {
struct semaphore eos;
- comedi_device *dev;
+ struct comedi_device *dev;
comedi_subdevice *s;
int count;
} local_info_t;
@@ -197,8 +197,8 @@ static const comedi_lrange range_daqp_ao = { 1, {BIP_RANGE(5)} };
/* comedi interface code */
-static int daqp_attach(comedi_device * dev, comedi_devconfig * it);
-static int daqp_detach(comedi_device * dev);
+static int daqp_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int daqp_detach(struct comedi_device * dev);
static comedi_driver driver_daqp = {
driver_name:"quatech_daqp_cs",
module:THIS_MODULE,
@@ -208,7 +208,7 @@ static comedi_driver driver_daqp = {
#ifdef DAQP_DEBUG
-static void daqp_dump(comedi_device * dev)
+static void daqp_dump(struct comedi_device * dev)
{
printk("DAQP: status %02x; aux status %02x\n",
inb(dev->iobase + DAQP_STATUS), inb(dev->iobase + DAQP_AUX));
@@ -234,7 +234,7 @@ static void hex_dump(char *str, void *ptr, int len)
/* Cancel a running acquisition */
-static int daqp_ai_cancel(comedi_device * dev, comedi_subdevice * s)
+static int daqp_ai_cancel(struct comedi_device * dev, comedi_subdevice * s)
{
local_info_t *local = (local_info_t *) s->private;
@@ -265,7 +265,7 @@ static int daqp_ai_cancel(comedi_device * dev, comedi_subdevice * s)
static void daqp_interrupt(int irq, void *dev_id PT_REGS_ARG)
{
local_info_t *local = (local_info_t *) dev_id;
- comedi_device *dev;
+ struct comedi_device *dev;
comedi_subdevice *s;
int loop_limit = 10000;
int status;
@@ -284,7 +284,7 @@ static void daqp_interrupt(int irq, void *dev_id PT_REGS_ARG)
if (!dev->attached) {
printk(KERN_WARNING
- "daqp_interrupt(): comedi_device not yet attached.\n");
+ "daqp_interrupt(): struct comedi_device not yet attached.\n");
return;
}
@@ -361,7 +361,7 @@ static void daqp_interrupt(int irq, void *dev_id PT_REGS_ARG)
/* One-shot analog data acquisition routine */
-static int daqp_ai_insn_read(comedi_device * dev, comedi_subdevice * s,
+static int daqp_ai_insn_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
local_info_t *local = (local_info_t *) s->private;
@@ -467,7 +467,7 @@ static int daqp_ns_to_timer(unsigned int *ns, int round)
* the command passes.
*/
-static int daqp_ai_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int daqp_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
@@ -593,7 +593,7 @@ static int daqp_ai_cmdtest(comedi_device * dev, comedi_subdevice * s,
return 0;
}
-static int daqp_ai_cmd(comedi_device * dev, comedi_subdevice * s)
+static int daqp_ai_cmd(struct comedi_device * dev, comedi_subdevice * s)
{
local_info_t *local = (local_info_t *) s->private;
comedi_cmd *cmd = &s->async->cmd;
@@ -793,7 +793,7 @@ static int daqp_ai_cmd(comedi_device * dev, comedi_subdevice * s)
/* Single-shot analog output routine */
-static int daqp_ao_insn_write(comedi_device * dev, comedi_subdevice * s,
+static int daqp_ao_insn_write(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
local_info_t *local = (local_info_t *) s->private;
@@ -820,7 +820,7 @@ static int daqp_ao_insn_write(comedi_device * dev, comedi_subdevice * s,
/* Digital input routine */
-static int daqp_di_insn_read(comedi_device * dev, comedi_subdevice * s,
+static int daqp_di_insn_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
local_info_t *local = (local_info_t *) s->private;
@@ -836,7 +836,7 @@ static int daqp_di_insn_read(comedi_device * dev, comedi_subdevice * s,
/* Digital output routine */
-static int daqp_do_insn_write(comedi_device * dev, comedi_subdevice * s,
+static int daqp_do_insn_write(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
local_info_t *local = (local_info_t *) s->private;
@@ -856,7 +856,7 @@ static int daqp_do_insn_write(comedi_device * dev, comedi_subdevice * s,
* when it is inserted.
*/
-static int daqp_attach(comedi_device * dev, comedi_devconfig * it)
+static int daqp_attach(struct comedi_device * dev, comedi_devconfig * it)
{
int ret;
local_info_t *local = dev_table[it->options[0]];
@@ -962,7 +962,7 @@ static int daqp_attach(comedi_device * dev, comedi_devconfig * it)
* card is removed, daqp_cs_detach() is called by the pcmcia subsystem.
*/
-static int daqp_detach(comedi_device * dev)
+static int daqp_detach(struct comedi_device * dev)
{
printk("comedi%d: detaching daqp\n", dev->minor);
diff --git a/drivers/staging/comedi/drivers/rtd520.c b/drivers/staging/comedi/drivers/rtd520.c
index 571fa54c4d38..f4b1fc6fa488 100644
--- a/drivers/staging/comedi/drivers/rtd520.c
+++ b/drivers/staging/comedi/drivers/rtd520.c
@@ -680,8 +680,8 @@ struct rtdPrivate {
* the board, and also about the kernel module that contains
* the device code.
*/
-static int rtd_attach(comedi_device *dev, comedi_devconfig *it);
-static int rtd_detach(comedi_device *dev);
+static int rtd_attach(struct comedi_device *dev, comedi_devconfig *it);
+static int rtd_detach(struct comedi_device *dev);
static comedi_driver rtd520Driver = {
driver_name: DRV_NAME,
@@ -690,24 +690,24 @@ static comedi_driver rtd520Driver = {
detach : rtd_detach,
};
-static int rtd_ai_rinsn(comedi_device *dev, comedi_subdevice *s,
+static int rtd_ai_rinsn(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-static int rtd_ao_winsn(comedi_device *dev, comedi_subdevice *s,
+static int rtd_ao_winsn(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-static int rtd_ao_rinsn(comedi_device *dev, comedi_subdevice *s,
+static int rtd_ao_rinsn(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-static int rtd_dio_insn_bits(comedi_device *dev, comedi_subdevice *s,
+static int rtd_dio_insn_bits(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-static int rtd_dio_insn_config(comedi_device *dev, comedi_subdevice *s,
+static int rtd_dio_insn_config(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-static int rtd_ai_cmdtest(comedi_device *dev, comedi_subdevice *s,
+static int rtd_ai_cmdtest(struct comedi_device *dev, comedi_subdevice *s,
comedi_cmd *cmd);
-static int rtd_ai_cmd(comedi_device *dev, comedi_subdevice *s);
-static int rtd_ai_cancel(comedi_device *dev, comedi_subdevice *s);
-/* static int rtd_ai_poll (comedi_device *dev,comedi_subdevice *s); */
+static int rtd_ai_cmd(struct comedi_device *dev, comedi_subdevice *s);
+static int rtd_ai_cancel(struct comedi_device *dev, comedi_subdevice *s);
+/* static int rtd_ai_poll (struct comedi_device *dev,comedi_subdevice *s); */
static int rtd_ns_to_timer(unsigned int *ns, int roundMode);
static irqreturn_t rtd_interrupt(int irq, void *d PT_REGS_ARG);
-static int rtd520_probe_fifo_depth(comedi_device *dev);
+static int rtd520_probe_fifo_depth(struct comedi_device *dev);
/*
* Attach is called by the Comedi core to configure the driver
@@ -715,7 +715,7 @@ static int rtd520_probe_fifo_depth(comedi_device *dev);
* in the driver structure, dev->board_ptr contains that
* address.
*/
-static int rtd_attach(comedi_device *dev, comedi_devconfig *it)
+static int rtd_attach(struct comedi_device *dev, comedi_devconfig *it)
{ /* board name and options flags */
comedi_subdevice *s;
struct pci_dev *pcidev;
@@ -1060,7 +1060,7 @@ static int rtd_attach(comedi_device *dev, comedi_devconfig *it)
* allocated by _attach(). dev->private and dev->subdevices are
* deallocated automatically by the core.
*/
-static int rtd_detach(comedi_device *dev)
+static int rtd_detach(struct comedi_device *dev)
{
#ifdef USE_DMA
int index;
@@ -1140,7 +1140,7 @@ static int rtd_detach(comedi_device *dev)
/*
Convert a single comedi channel-gain entry to a RTD520 table entry
*/
-static unsigned short rtdConvertChanGain(comedi_device *dev,
+static unsigned short rtdConvertChanGain(struct comedi_device *dev,
unsigned int comediChan, int chanIndex)
{ /* index in channel list */
unsigned int chan, range, aref;
@@ -1190,7 +1190,7 @@ static unsigned short rtdConvertChanGain(comedi_device *dev,
/*
Setup the channel-gain table from a comedi list
*/
-static void rtd_load_channelgain_list(comedi_device *dev,
+static void rtd_load_channelgain_list(struct comedi_device *dev,
unsigned int n_chan, unsigned int *list)
{
if (n_chan > 1) { /* setup channel gain table */
@@ -1209,7 +1209,7 @@ static void rtd_load_channelgain_list(comedi_device *dev,
/* determine fifo size by doing adc conversions until the fifo half
empty status flag clears */
-static int rtd520_probe_fifo_depth(comedi_device *dev)
+static int rtd520_probe_fifo_depth(struct comedi_device *dev)
{
unsigned int chanspec = CR_PACK(0, 0, AREF_GROUND);
unsigned i;
@@ -1254,7 +1254,7 @@ static int rtd520_probe_fifo_depth(comedi_device *dev)
Note, we don't do any settling delays. Use a instruction list to
select, delay, then read.
*/
-static int rtd_ai_rinsn(comedi_device *dev,
+static int rtd_ai_rinsn(struct comedi_device *dev,
comedi_subdevice *s, comedi_insn *insn, unsigned int *data)
{
int n, ii;
@@ -1307,7 +1307,7 @@ static int rtd_ai_rinsn(comedi_device *dev,
The manual claims that we can do a lword read, but it doesn't work here.
*/
-static int ai_read_n(comedi_device *dev, comedi_subdevice *s, int count)
+static int ai_read_n(struct comedi_device *dev, comedi_subdevice *s, int count)
{
int ii;
@@ -1346,7 +1346,7 @@ static int ai_read_n(comedi_device *dev, comedi_subdevice *s, int count)
/*
unknown amout of data is waiting in fifo.
*/
-static int ai_read_dregs(comedi_device *dev, comedi_subdevice *s)
+static int ai_read_dregs(struct comedi_device *dev, comedi_subdevice *s)
{
while (RtdFifoStatus(dev) & FS_ADC_NOT_EMPTY) { /* 1 -> not empty */
short sample;
@@ -1375,7 +1375,7 @@ static int ai_read_dregs(comedi_device *dev, comedi_subdevice *s)
/*
Terminate a DMA transfer and wait for everything to quiet down
*/
-void abort_dma(comedi_device *dev, unsigned int channel)
+void abort_dma(struct comedi_device *dev, unsigned int channel)
{ /* DMA channel 0, 1 */
unsigned long dma_cs_addr; /* the control/status register */
uint8_t status;
@@ -1434,7 +1434,7 @@ void abort_dma(comedi_device *dev, unsigned int channel)
Process what is in the DMA transfer buffer and pass to comedi
Note: this is not re-entrant
*/
-static int ai_process_dma(comedi_device *dev, comedi_subdevice *s)
+static int ai_process_dma(struct comedi_device *dev, comedi_subdevice *s)
{
int ii, n;
s16 *dp;
@@ -1497,7 +1497,7 @@ static irqreturn_t rtd_interrupt(int irq, /* interrupt number (ignored) */
void *d /* our data */
PT_REGS_ARG)
{ /* cpu context (ignored) */
- comedi_device *dev = d; /* must be called "dev" for devpriv */
+ struct comedi_device *dev = d; /* must be called "dev" for devpriv */
u16 status;
u16 fifoStatus;
comedi_subdevice *s = dev->subdevices + 0; /* analog in subdevice */
@@ -1648,7 +1648,7 @@ static irqreturn_t rtd_interrupt(int irq, /* interrupt number (ignored) */
/*
return the number of samples available
*/
-static int rtd_ai_poll(comedi_device *dev, comedi_subdevice *s)
+static int rtd_ai_poll(struct comedi_device *dev, comedi_subdevice *s)
{
/* TODO: This needs to mask interrupts, read_dregs, and then re-enable */
/* Not sure what to do if DMA is active */
@@ -1665,7 +1665,7 @@ static int rtd_ai_poll(comedi_device *dev, comedi_subdevice *s)
the command passes.
*/
-static int rtd_ai_cmdtest(comedi_device *dev,
+static int rtd_ai_cmdtest(struct comedi_device *dev,
comedi_subdevice *s, comedi_cmd *cmd)
{
int err = 0;
@@ -1870,7 +1870,7 @@ static int rtd_ai_cmdtest(comedi_device *dev,
This is usually done by an interrupt handler.
Userland gets to the data using read calls.
*/
-static int rtd_ai_cmd(comedi_device *dev, comedi_subdevice *s)
+static int rtd_ai_cmd(struct comedi_device *dev, comedi_subdevice *s)
{
comedi_cmd *cmd = &s->async->cmd;
int timer;
@@ -2067,7 +2067,7 @@ static int rtd_ai_cmd(comedi_device *dev, comedi_subdevice *s)
/*
Stop a running data aquisition.
*/
-static int rtd_ai_cancel(comedi_device *dev, comedi_subdevice *s)
+static int rtd_ai_cancel(struct comedi_device *dev, comedi_subdevice *s)
{
u16 status;
@@ -2135,7 +2135,7 @@ static int rtd_ns_to_timer(unsigned int *ns, int round_mode)
/*
Output one (or more) analog values to a single port as fast as possible.
*/
-static int rtd_ao_winsn(comedi_device *dev,
+static int rtd_ao_winsn(struct comedi_device *dev,
comedi_subdevice *s, comedi_insn *insn, unsigned int *data)
{
int i;
@@ -2190,7 +2190,7 @@ static int rtd_ao_winsn(comedi_device *dev,
/* AO subdevices should have a read insn as well as a write insn.
* Usually this means copying a value stored in devpriv. */
-static int rtd_ao_rinsn(comedi_device *dev,
+static int rtd_ao_rinsn(struct comedi_device *dev,
comedi_subdevice *s, comedi_insn *insn, unsigned int *data)
{
int i;
@@ -2213,7 +2213,7 @@ static int rtd_ao_rinsn(comedi_device *dev,
* This allows packed reading/writing of the DIO channels. The
* comedi core can convert between insn_bits and insn_read/write
*/
-static int rtd_dio_insn_bits(comedi_device *dev,
+static int rtd_dio_insn_bits(struct comedi_device *dev,
comedi_subdevice *s, comedi_insn *insn, unsigned int *data)
{
if (insn->n != 2)
@@ -2240,7 +2240,7 @@ static int rtd_dio_insn_bits(comedi_device *dev,
/*
Configure one bit on a IO port as Input or Output (hence the name :-).
*/
-static int rtd_dio_insn_config(comedi_device *dev,
+static int rtd_dio_insn_config(struct comedi_device *dev,
comedi_subdevice *s, comedi_insn *insn, unsigned int *data)
{
int chan = CR_CHAN(insn->chanspec);
diff --git a/drivers/staging/comedi/drivers/rti800.c b/drivers/staging/comedi/drivers/rti800.c
index 0cefcb39db7c..8ec384528181 100644
--- a/drivers/staging/comedi/drivers/rti800.c
+++ b/drivers/staging/comedi/drivers/rti800.c
@@ -129,8 +129,8 @@ static const boardtype boardtypes[] = {
#define this_board ((const boardtype *)dev->board_ptr)
-static int rti800_attach(comedi_device * dev, comedi_devconfig * it);
-static int rti800_detach(comedi_device * dev);
+static int rti800_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int rti800_detach(struct comedi_device * dev);
static comedi_driver driver_rti800 = {
driver_name:"rti800",
module:THIS_MODULE,
@@ -178,7 +178,7 @@ static irqreturn_t rti800_interrupt(int irq, void *dev PT_REGS_ARG)
// settling delay times in usec for different gains
static const int gaindelay[] = { 10, 20, 40, 80 };
-static int rti800_ai_insn_read(comedi_device * dev, comedi_subdevice * s,
+static int rti800_ai_insn_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i, t;
@@ -231,7 +231,7 @@ static int rti800_ai_insn_read(comedi_device * dev, comedi_subdevice * s,
return i;
}
-static int rti800_ao_insn_read(comedi_device * dev, comedi_subdevice * s,
+static int rti800_ao_insn_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
@@ -243,7 +243,7 @@ static int rti800_ao_insn_read(comedi_device * dev, comedi_subdevice * s,
return i;
}
-static int rti800_ao_insn_write(comedi_device * dev, comedi_subdevice * s,
+static int rti800_ao_insn_write(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int chan = CR_CHAN(insn->chanspec);
@@ -263,7 +263,7 @@ static int rti800_ao_insn_write(comedi_device * dev, comedi_subdevice * s,
return i;
}
-static int rti800_di_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int rti800_di_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
@@ -272,7 +272,7 @@ static int rti800_di_insn_bits(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int rti800_do_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int rti800_do_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
@@ -307,7 +307,7 @@ static int rti800_do_insn_bits(comedi_device * dev, comedi_subdevice * s,
options[8] - dac1 coding
*/
-static int rti800_attach(comedi_device * dev, comedi_devconfig * it)
+static int rti800_attach(struct comedi_device * dev, comedi_devconfig * it)
{
unsigned int irq;
unsigned long iobase;
@@ -442,7 +442,7 @@ static int rti800_attach(comedi_device * dev, comedi_devconfig * it)
return 0;
}
-static int rti800_detach(comedi_device * dev)
+static int rti800_detach(struct comedi_device * dev)
{
printk("comedi%d: rti800: remove\n", dev->minor);
diff --git a/drivers/staging/comedi/drivers/rti802.c b/drivers/staging/comedi/drivers/rti802.c
index 058a4c066205..843fce9056c8 100644
--- a/drivers/staging/comedi/drivers/rti802.c
+++ b/drivers/staging/comedi/drivers/rti802.c
@@ -47,8 +47,8 @@ Configuration Options:
#define RTI802_DATALOW 1
#define RTI802_DATAHIGH 2
-static int rti802_attach(comedi_device * dev, comedi_devconfig * it);
-static int rti802_detach(comedi_device * dev);
+static int rti802_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int rti802_detach(struct comedi_device * dev);
static comedi_driver driver_rti802 = {
driver_name:"rti802",
module:THIS_MODULE,
@@ -68,7 +68,7 @@ typedef struct {
#define devpriv ((rti802_private *)dev->private)
-static int rti802_ao_insn_read(comedi_device * dev, comedi_subdevice * s,
+static int rti802_ao_insn_read(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
@@ -79,7 +79,7 @@ static int rti802_ao_insn_read(comedi_device * dev, comedi_subdevice * s,
return i;
}
-static int rti802_ao_insn_write(comedi_device * dev, comedi_subdevice * s,
+static int rti802_ao_insn_write(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i, d;
@@ -96,7 +96,7 @@ static int rti802_ao_insn_write(comedi_device * dev, comedi_subdevice * s,
return i;
}
-static int rti802_attach(comedi_device * dev, comedi_devconfig * it)
+static int rti802_attach(struct comedi_device * dev, comedi_devconfig * it)
{
comedi_subdevice *s;
int i;
@@ -140,7 +140,7 @@ static int rti802_attach(comedi_device * dev, comedi_devconfig * it)
return 0;
}
-static int rti802_detach(comedi_device * dev)
+static int rti802_detach(struct comedi_device * dev)
{
printk("comedi%d: rti802: remove\n", dev->minor);
diff --git a/drivers/staging/comedi/drivers/s526.c b/drivers/staging/comedi/drivers/s526.c
index c9bd985f9932..7e066a0263cc 100644
--- a/drivers/staging/comedi/drivers/s526.c
+++ b/drivers/staging/comedi/drivers/s526.c
@@ -190,7 +190,7 @@ static const s526_board s526_boards[] = {
/* this structure is for data unique to this hardware driver. If
several hardware drivers keep similar information in this structure,
- feel free to suggest moving the variable to the comedi_device struct. */
+ feel free to suggest moving the variable to the struct comedi_device struct. */
typedef struct {
int data;
@@ -215,8 +215,8 @@ typedef struct {
* the board, and also about the kernel module that contains
* the device code.
*/
-static int s526_attach(comedi_device * dev, comedi_devconfig * it);
-static int s526_detach(comedi_device * dev);
+static int s526_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int s526_detach(struct comedi_device * dev);
static comedi_driver driver_s526 = {
driver_name:"s526",
module:THIS_MODULE,
@@ -245,23 +245,23 @@ static comedi_driver driver_s526 = {
num_names:sizeof(s526_boards) / sizeof(s526_board),
};
-static int s526_gpct_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int s526_gpct_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int s526_gpct_insn_config(comedi_device * dev, comedi_subdevice * s,
+static int s526_gpct_insn_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int s526_gpct_winsn(comedi_device * dev, comedi_subdevice * s,
+static int s526_gpct_winsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int s526_ai_insn_config(comedi_device * dev, comedi_subdevice * s,
+static int s526_ai_insn_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int s526_ai_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int s526_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int s526_ao_winsn(comedi_device * dev, comedi_subdevice * s,
+static int s526_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int s526_ao_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int s526_ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int s526_dio_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int s526_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int s526_dio_insn_config(comedi_device * dev, comedi_subdevice * s,
+static int s526_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
/*
@@ -270,7 +270,7 @@ static int s526_dio_insn_config(comedi_device * dev, comedi_subdevice * s,
* in the driver structure, dev->board_ptr contains that
* address.
*/
-static int s526_attach(comedi_device * dev, comedi_devconfig * it)
+static int s526_attach(struct comedi_device * dev, comedi_devconfig * it)
{
comedi_subdevice *s;
int iobase;
@@ -466,7 +466,7 @@ static int s526_attach(comedi_device * dev, comedi_devconfig * it)
* allocated by _attach(). dev->private and dev->subdevices are
* deallocated automatically by the core.
*/
-static int s526_detach(comedi_device * dev)
+static int s526_detach(struct comedi_device * dev)
{
printk("comedi%d: s526: remove\n", dev->minor);
@@ -476,7 +476,7 @@ static int s526_detach(comedi_device * dev)
return 0;
}
-static int s526_gpct_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int s526_gpct_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i; // counts the Data
@@ -500,7 +500,7 @@ static int s526_gpct_rinsn(comedi_device * dev, comedi_subdevice * s,
return i;
}
-static int s526_gpct_insn_config(comedi_device * dev, comedi_subdevice * s,
+static int s526_gpct_insn_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int subdev_channel = CR_CHAN(insn->chanspec); // Unpack chanspec
@@ -725,7 +725,7 @@ static int s526_gpct_insn_config(comedi_device * dev, comedi_subdevice * s,
return insn->n;
}
-static int s526_gpct_winsn(comedi_device * dev, comedi_subdevice * s,
+static int s526_gpct_winsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int subdev_channel = CR_CHAN(insn->chanspec); // Unpack chanspec
@@ -784,7 +784,7 @@ static int s526_gpct_winsn(comedi_device * dev, comedi_subdevice * s,
}
#define ISR_ADC_DONE 0x4
-static int s526_ai_insn_config(comedi_device * dev, comedi_subdevice * s,
+static int s526_ai_insn_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int result = -EINVAL;
@@ -817,7 +817,7 @@ static int s526_ai_insn_config(comedi_device * dev, comedi_subdevice * s,
* "instructions" read/write data in "one-shot" or "software-triggered"
* mode.
*/
-static int s526_ai_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int s526_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n, i;
@@ -867,7 +867,7 @@ static int s526_ai_rinsn(comedi_device * dev, comedi_subdevice * s,
return n;
}
-static int s526_ao_winsn(comedi_device * dev, comedi_subdevice * s,
+static int s526_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
@@ -896,7 +896,7 @@ static int s526_ao_winsn(comedi_device * dev, comedi_subdevice * s,
/* AO subdevices should have a read insn as well as a write insn.
* Usually this means copying a value stored in devpriv. */
-static int s526_ao_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int s526_ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
@@ -913,7 +913,7 @@ static int s526_ao_rinsn(comedi_device * dev, comedi_subdevice * s,
* useful to applications if you implement the insn_bits interface.
* This allows packed reading/writing of the DIO channels. The
* comedi core can convert between insn_bits and insn_read/write */
-static int s526_dio_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int s526_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
@@ -938,7 +938,7 @@ static int s526_dio_insn_bits(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int s526_dio_insn_config(comedi_device * dev, comedi_subdevice * s,
+static int s526_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int chan = CR_CHAN(insn->chanspec);
diff --git a/drivers/staging/comedi/drivers/s626.c b/drivers/staging/comedi/drivers/s626.c
index a4f4de69da76..7a9e4544f00a 100644
--- a/drivers/staging/comedi/drivers/s626.c
+++ b/drivers/staging/comedi/drivers/s626.c
@@ -118,8 +118,8 @@ static DEFINE_PCI_DEVICE_TABLE(s626_pci_table) = {
MODULE_DEVICE_TABLE(pci, s626_pci_table);
-static int s626_attach(comedi_device *dev, comedi_devconfig *it);
-static int s626_detach(comedi_device *dev);
+static int s626_attach(struct comedi_device *dev, comedi_devconfig *it);
+static int s626_detach(struct comedi_device *dev);
static comedi_driver driver_s626 = {
driver_name:"s626",
@@ -222,36 +222,36 @@ static struct dio_private *dio_private_word[]={
COMEDI_PCI_INITCLEANUP_NOMODULE(driver_s626, s626_pci_table);
/* ioctl routines */
-static int s626_ai_insn_config(comedi_device *dev, comedi_subdevice *s,
+static int s626_ai_insn_config(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-/* static int s626_ai_rinsn(comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,unsigned int *data); */
-static int s626_ai_insn_read(comedi_device *dev, comedi_subdevice *s,
+/* static int s626_ai_rinsn(struct comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,unsigned int *data); */
+static int s626_ai_insn_read(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-static int s626_ai_cmd(comedi_device *dev, comedi_subdevice *s);
-static int s626_ai_cmdtest(comedi_device *dev, comedi_subdevice *s,
+static int s626_ai_cmd(struct comedi_device *dev, comedi_subdevice *s);
+static int s626_ai_cmdtest(struct comedi_device *dev, comedi_subdevice *s,
comedi_cmd *cmd);
-static int s626_ai_cancel(comedi_device *dev, comedi_subdevice *s);
-static int s626_ao_winsn(comedi_device *dev, comedi_subdevice *s,
+static int s626_ai_cancel(struct comedi_device *dev, comedi_subdevice *s);
+static int s626_ao_winsn(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-static int s626_ao_rinsn(comedi_device *dev, comedi_subdevice *s,
+static int s626_ao_rinsn(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-static int s626_dio_insn_bits(comedi_device *dev, comedi_subdevice *s,
+static int s626_dio_insn_bits(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-static int s626_dio_insn_config(comedi_device *dev, comedi_subdevice *s,
+static int s626_dio_insn_config(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-static int s626_dio_set_irq(comedi_device *dev, unsigned int chan);
-static int s626_dio_reset_irq(comedi_device *dev, unsigned int gruop,
+static int s626_dio_set_irq(struct comedi_device *dev, unsigned int chan);
+static int s626_dio_reset_irq(struct comedi_device *dev, unsigned int gruop,
unsigned int mask);
-static int s626_dio_clear_irq(comedi_device *dev);
-static int s626_enc_insn_config(comedi_device *dev, comedi_subdevice *s,
+static int s626_dio_clear_irq(struct comedi_device *dev);
+static int s626_enc_insn_config(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-static int s626_enc_insn_read(comedi_device *dev, comedi_subdevice *s,
+static int s626_enc_insn_read(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
-static int s626_enc_insn_write(comedi_device *dev, comedi_subdevice *s,
+static int s626_enc_insn_write(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
static int s626_ns_to_timer(int *nanosec, int round_mode);
static int s626_ai_load_polllist(uint8_t *ppl, comedi_cmd *cmd);
-static int s626_ai_inttrig(comedi_device *dev, comedi_subdevice *s,
+static int s626_ai_inttrig(struct comedi_device *dev, comedi_subdevice *s,
unsigned int trignum);
static irqreturn_t s626_irq_handler(int irq, void *d PT_REGS_ARG);
static unsigned int s626_ai_reg_to_uint(int data);
@@ -260,36 +260,36 @@ static unsigned int s626_ai_reg_to_uint(int data);
/* end ioctl routines */
/* internal routines */
-static void s626_dio_init(comedi_device *dev);
-static void ResetADC(comedi_device *dev, uint8_t *ppl);
-static void LoadTrimDACs(comedi_device *dev);
-static void WriteTrimDAC(comedi_device *dev, uint8_t LogicalChan,
+static void s626_dio_init(struct comedi_device *dev);
+static void ResetADC(struct comedi_device *dev, uint8_t *ppl);
+static void LoadTrimDACs(struct comedi_device *dev);
+static void WriteTrimDAC(struct comedi_device *dev, uint8_t LogicalChan,
uint8_t DacData);
-static uint8_t I2Cread(comedi_device *dev, uint8_t addr);
-static uint32_t I2Chandshake(comedi_device *dev, uint32_t val);
-static void SetDAC(comedi_device *dev, uint16_t chan, short dacdata);
-static void SendDAC(comedi_device *dev, uint32_t val);
-static void WriteMISC2(comedi_device *dev, uint16_t NewImage);
-static void DEBItransfer(comedi_device *dev);
-static uint16_t DEBIread(comedi_device *dev, uint16_t addr);
-static void DEBIwrite(comedi_device *dev, uint16_t addr, uint16_t wdata);
-static void DEBIreplace(comedi_device *dev, uint16_t addr, uint16_t mask,
+static uint8_t I2Cread(struct comedi_device *dev, uint8_t addr);
+static uint32_t I2Chandshake(struct comedi_device *dev, uint32_t val);
+static void SetDAC(struct comedi_device *dev, uint16_t chan, short dacdata);
+static void SendDAC(struct comedi_device *dev, uint32_t val);
+static void WriteMISC2(struct comedi_device *dev, uint16_t NewImage);
+static void DEBItransfer(struct comedi_device *dev);
+static uint16_t DEBIread(struct comedi_device *dev, uint16_t addr);
+static void DEBIwrite(struct comedi_device *dev, uint16_t addr, uint16_t wdata);
+static void DEBIreplace(struct comedi_device *dev, uint16_t addr, uint16_t mask,
uint16_t wdata);
-static void CloseDMAB(comedi_device *dev, DMABUF *pdma, size_t bsize);
+static void CloseDMAB(struct comedi_device *dev, DMABUF *pdma, size_t bsize);
/* COUNTER OBJECT ------------------------------------------------ */
struct enc_private {
/* Pointers to functions that differ for A and B counters: */
- uint16_t(*GetEnable) (comedi_device *dev, struct enc_private *); /* Return clock enable. */
- uint16_t(*GetIntSrc) (comedi_device *dev, struct enc_private *); /* Return interrupt source. */
- uint16_t(*GetLoadTrig) (comedi_device *dev, struct enc_private *); /* Return preload trigger source. */
- uint16_t(*GetMode) (comedi_device *dev, struct enc_private *); /* Return standardized operating mode. */
- void (*PulseIndex) (comedi_device *dev, struct enc_private *); /* Generate soft index strobe. */
- void (*SetEnable) (comedi_device *dev, struct enc_private *, uint16_t enab); /* Program clock enable. */
- void (*SetIntSrc) (comedi_device *dev, struct enc_private *, uint16_t IntSource); /* Program interrupt source. */
- void (*SetLoadTrig) (comedi_device *dev, struct enc_private *, uint16_t Trig); /* Program preload trigger source. */
- void (*SetMode) (comedi_device *dev, struct enc_private *, uint16_t Setup, uint16_t DisableIntSrc); /* Program standardized operating mode. */
- void (*ResetCapFlags) (comedi_device *dev, struct enc_private *); /* Reset event capture flags. */
+ uint16_t(*GetEnable) (struct comedi_device *dev, struct enc_private *); /* Return clock enable. */
+ uint16_t(*GetIntSrc) (struct comedi_device *dev, struct enc_private *); /* Return interrupt source. */
+ uint16_t(*GetLoadTrig) (struct comedi_device *dev, struct enc_private *); /* Return preload trigger source. */
+ uint16_t(*GetMode) (struct comedi_device *dev, struct enc_private *); /* Return standardized operating mode. */
+ void (*PulseIndex) (struct comedi_device *dev, struct enc_private *); /* Generate soft index strobe. */
+ void (*SetEnable) (struct comedi_device *dev, struct enc_private *, uint16_t enab); /* Program clock enable. */
+ void (*SetIntSrc) (struct comedi_device *dev, struct enc_private *, uint16_t IntSource); /* Program interrupt source. */
+ void (*SetLoadTrig) (struct comedi_device *dev, struct enc_private *, uint16_t Trig); /* Program preload trigger source. */
+ void (*SetMode) (struct comedi_device *dev, struct enc_private *, uint16_t Setup, uint16_t DisableIntSrc); /* Program standardized operating mode. */
+ void (*ResetCapFlags) (struct comedi_device *dev, struct enc_private *); /* Reset event capture flags. */
uint16_t MyCRA; /* Address of CRA register. */
uint16_t MyCRB; /* Address of CRB register. */
@@ -301,45 +301,45 @@ struct enc_private {
#define encpriv ((struct enc_private *)(dev->subdevices+5)->private)
/* counters routines */
-static void s626_timer_load(comedi_device *dev, struct enc_private *k, int tick);
-static uint32_t ReadLatch(comedi_device *dev, struct enc_private *k);
-static void ResetCapFlags_A(comedi_device *dev, struct enc_private *k);
-static void ResetCapFlags_B(comedi_device *dev, struct enc_private *k);
-static uint16_t GetMode_A(comedi_device *dev, struct enc_private *k);
-static uint16_t GetMode_B(comedi_device *dev, struct enc_private *k);
-static void SetMode_A(comedi_device *dev, struct enc_private *k, uint16_t Setup,
+static void s626_timer_load(struct comedi_device *dev, struct enc_private *k, int tick);
+static uint32_t ReadLatch(struct comedi_device *dev, struct enc_private *k);
+static void ResetCapFlags_A(struct comedi_device *dev, struct enc_private *k);
+static void ResetCapFlags_B(struct comedi_device *dev, struct enc_private *k);
+static uint16_t GetMode_A(struct comedi_device *dev, struct enc_private *k);
+static uint16_t GetMode_B(struct comedi_device *dev, struct enc_private *k);
+static void SetMode_A(struct comedi_device *dev, struct enc_private *k, uint16_t Setup,
uint16_t DisableIntSrc);
-static void SetMode_B(comedi_device *dev, struct enc_private *k, uint16_t Setup,
+static void SetMode_B(struct comedi_device *dev, struct enc_private *k, uint16_t Setup,
uint16_t DisableIntSrc);
-static void SetEnable_A(comedi_device *dev, struct enc_private *k, uint16_t enab);
-static void SetEnable_B(comedi_device *dev, struct enc_private *k, uint16_t enab);
-static uint16_t GetEnable_A(comedi_device *dev, struct enc_private *k);
-static uint16_t GetEnable_B(comedi_device *dev, struct enc_private *k);
-static void SetLatchSource(comedi_device *dev, struct enc_private *k,
+static void SetEnable_A(struct comedi_device *dev, struct enc_private *k, uint16_t enab);
+static void SetEnable_B(struct comedi_device *dev, struct enc_private *k, uint16_t enab);
+static uint16_t GetEnable_A(struct comedi_device *dev, struct enc_private *k);
+static uint16_t GetEnable_B(struct comedi_device *dev, struct enc_private *k);
+static void SetLatchSource(struct comedi_device *dev, struct enc_private *k,
uint16_t value);
-/* static uint16_t GetLatchSource(comedi_device *dev, struct enc_private *k ); */
-static void SetLoadTrig_A(comedi_device *dev, struct enc_private *k, uint16_t Trig);
-static void SetLoadTrig_B(comedi_device *dev, struct enc_private *k, uint16_t Trig);
-static uint16_t GetLoadTrig_A(comedi_device *dev, struct enc_private *k);
-static uint16_t GetLoadTrig_B(comedi_device *dev, struct enc_private *k);
-static void SetIntSrc_B(comedi_device *dev, struct enc_private *k,
+/* static uint16_t GetLatchSource(struct comedi_device *dev, struct enc_private *k ); */
+static void SetLoadTrig_A(struct comedi_device *dev, struct enc_private *k, uint16_t Trig);
+static void SetLoadTrig_B(struct comedi_device *dev, struct enc_private *k, uint16_t Trig);
+static uint16_t GetLoadTrig_A(struct comedi_device *dev, struct enc_private *k);
+static uint16_t GetLoadTrig_B(struct comedi_device *dev, struct enc_private *k);
+static void SetIntSrc_B(struct comedi_device *dev, struct enc_private *k,
uint16_t IntSource);
-static void SetIntSrc_A(comedi_device *dev, struct enc_private *k,
+static void SetIntSrc_A(struct comedi_device *dev, struct enc_private *k,
uint16_t IntSource);
-static uint16_t GetIntSrc_A(comedi_device *dev, struct enc_private *k);
-static uint16_t GetIntSrc_B(comedi_device *dev, struct enc_private *k);
-/* static void SetClkMult(comedi_device *dev, struct enc_private *k, uint16_t value ) ; */
-/* static uint16_t GetClkMult(comedi_device *dev, struct enc_private *k ) ; */
-/* static void SetIndexPol(comedi_device *dev, struct enc_private *k, uint16_t value ); */
-/* static uint16_t GetClkPol(comedi_device *dev, struct enc_private *k ) ; */
-/* static void SetIndexSrc( comedi_device *dev,struct enc_private *k, uint16_t value ); */
-/* static uint16_t GetClkSrc( comedi_device *dev,struct enc_private *k ); */
-/* static void SetIndexSrc( comedi_device *dev,struct enc_private *k, uint16_t value ); */
-/* static uint16_t GetIndexSrc( comedi_device *dev,struct enc_private *k ); */
-static void PulseIndex_A(comedi_device *dev, struct enc_private *k);
-static void PulseIndex_B(comedi_device *dev, struct enc_private *k);
-static void Preload(comedi_device *dev, struct enc_private *k, uint32_t value);
-static void CountersInit(comedi_device *dev);
+static uint16_t GetIntSrc_A(struct comedi_device *dev, struct enc_private *k);
+static uint16_t GetIntSrc_B(struct comedi_device *dev, struct enc_private *k);
+/* static void SetClkMult(struct comedi_device *dev, struct enc_private *k, uint16_t value ) ; */
+/* static uint16_t GetClkMult(struct comedi_device *dev, struct enc_private *k ) ; */
+/* static void SetIndexPol(struct comedi_device *dev, struct enc_private *k, uint16_t value ); */
+/* static uint16_t GetClkPol(struct comedi_device *dev, struct enc_private *k ) ; */
+/* static void SetIndexSrc( struct comedi_device *dev,struct enc_private *k, uint16_t value ); */
+/* static uint16_t GetClkSrc( struct comedi_device *dev,struct enc_private *k ); */
+/* static void SetIndexSrc( struct comedi_device *dev,struct enc_private *k, uint16_t value ); */
+/* static uint16_t GetIndexSrc( struct comedi_device *dev,struct enc_private *k ); */
+static void PulseIndex_A(struct comedi_device *dev, struct enc_private *k);
+static void PulseIndex_B(struct comedi_device *dev, struct enc_private *k);
+static void Preload(struct comedi_device *dev, struct enc_private *k, uint32_t value);
+static void CountersInit(struct comedi_device *dev);
/* end internal routines */
/* Counter objects constructor. */
@@ -485,7 +485,7 @@ static const comedi_lrange s626_range_table = { 2, {
}
};
-static int s626_attach(comedi_device *dev, comedi_devconfig *it)
+static int s626_attach(struct comedi_device *dev, comedi_devconfig *it)
{
/* uint8_t PollList; */
/* uint16_t AdcData; */
@@ -970,7 +970,7 @@ static unsigned int s626_ai_reg_to_uint(int data)
static irqreturn_t s626_irq_handler(int irq, void *d PT_REGS_ARG)
{
- comedi_device *dev = d;
+ struct comedi_device *dev = d;
comedi_subdevice *s;
comedi_cmd *cmd;
struct enc_private *k;
@@ -1268,7 +1268,7 @@ static irqreturn_t s626_irq_handler(int irq, void *d PT_REGS_ARG)
return IRQ_HANDLED;
}
-static int s626_detach(comedi_device *dev)
+static int s626_detach(struct comedi_device *dev)
{
if (devpriv) {
/* stop ai_command */
@@ -1311,7 +1311,7 @@ static int s626_detach(comedi_device *dev)
/*
* this functions build the RPS program for hardware driven acquistion
*/
-void ResetADC(comedi_device *dev, uint8_t *ppl)
+void ResetADC(struct comedi_device *dev, uint8_t *ppl)
{
register uint32_t *pRPS;
uint32_t JmpAdrs;
@@ -1503,14 +1503,14 @@ void ResetADC(comedi_device *dev, uint8_t *ppl)
}
/* TO COMPLETE, IF NECESSARY */
-static int s626_ai_insn_config(comedi_device *dev, comedi_subdevice *s,
+static int s626_ai_insn_config(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
return -EINVAL;
}
-/* static int s626_ai_rinsn(comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,unsigned int *data) */
+/* static int s626_ai_rinsn(struct comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,unsigned int *data) */
/* { */
/* register uint8_t i; */
/* register int32_t *readaddr; */
@@ -1540,7 +1540,7 @@ static int s626_ai_insn_config(comedi_device *dev, comedi_subdevice *s,
/* return i; */
/* } */
-static int s626_ai_insn_read(comedi_device *dev, comedi_subdevice *s,
+static int s626_ai_insn_read(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
uint16_t chan = CR_CHAN(insn->chanspec);
@@ -1654,7 +1654,7 @@ static int s626_ai_load_polllist(uint8_t *ppl, comedi_cmd *cmd)
return n;
}
-static int s626_ai_inttrig(comedi_device *dev, comedi_subdevice *s,
+static int s626_ai_inttrig(struct comedi_device *dev, comedi_subdevice *s,
unsigned int trignum)
{
if (trignum != 0)
@@ -1673,7 +1673,7 @@ static int s626_ai_inttrig(comedi_device *dev, comedi_subdevice *s,
}
/* TO COMPLETE */
-static int s626_ai_cmd(comedi_device *dev, comedi_subdevice *s)
+static int s626_ai_cmd(struct comedi_device *dev, comedi_subdevice *s)
{
uint8_t ppl[16];
@@ -1819,7 +1819,7 @@ static int s626_ai_cmd(comedi_device *dev, comedi_subdevice *s)
return 0;
}
-static int s626_ai_cmdtest(comedi_device *dev, comedi_subdevice *s,
+static int s626_ai_cmdtest(struct comedi_device *dev, comedi_subdevice *s,
comedi_cmd *cmd)
{
int err = 0;
@@ -2004,7 +2004,7 @@ static int s626_ai_cmdtest(comedi_device *dev, comedi_subdevice *s,
return 0;
}
-static int s626_ai_cancel(comedi_device *dev, comedi_subdevice *s)
+static int s626_ai_cancel(struct comedi_device *dev, comedi_subdevice *s)
{
/* Stop RPS program in case it is currently running. */
MC_DISABLE(P_MC1, MC1_ERPS1);
@@ -2045,7 +2045,7 @@ static int s626_ns_to_timer(int *nanosec, int round_mode)
return divider - 1;
}
-static int s626_ao_winsn(comedi_device *dev, comedi_subdevice *s,
+static int s626_ao_winsn(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
@@ -2064,7 +2064,7 @@ static int s626_ao_winsn(comedi_device *dev, comedi_subdevice *s,
return i;
}
-static int s626_ao_rinsn(comedi_device *dev, comedi_subdevice *s,
+static int s626_ao_rinsn(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
int i;
@@ -2081,7 +2081,7 @@ static int s626_ao_rinsn(comedi_device *dev, comedi_subdevice *s,
* ports A, B and C, respectively.
*/
-static void s626_dio_init(comedi_device *dev)
+static void s626_dio_init(struct comedi_device *dev)
{
uint16_t group;
comedi_subdevice *s;
@@ -2110,7 +2110,7 @@ static void s626_dio_init(comedi_device *dev)
* This allows packed reading/writing of the DIO channels. The comedi
* core can convert between insn_bits and insn_read/write */
-static int s626_dio_insn_bits(comedi_device *dev, comedi_subdevice *s,
+static int s626_dio_insn_bits(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
@@ -2146,7 +2146,7 @@ static int s626_dio_insn_bits(comedi_device *dev, comedi_subdevice *s,
return 2;
}
-static int s626_dio_insn_config(comedi_device *dev, comedi_subdevice *s,
+static int s626_dio_insn_config(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
@@ -2173,7 +2173,7 @@ static int s626_dio_insn_config(comedi_device *dev, comedi_subdevice *s,
return 1;
}
-static int s626_dio_set_irq(comedi_device *dev, unsigned int chan)
+static int s626_dio_set_irq(struct comedi_device *dev, unsigned int chan)
{
unsigned int group;
unsigned int bitmask;
@@ -2215,7 +2215,7 @@ static int s626_dio_set_irq(comedi_device *dev, unsigned int chan)
return 0;
}
-static int s626_dio_reset_irq(comedi_device *dev, unsigned int group,
+static int s626_dio_reset_irq(struct comedi_device *dev, unsigned int group,
unsigned int mask)
{
DEBUG("s626_dio_reset_irq: disable interrupt on dio channel %d group %d\n", mask, group);
@@ -2231,7 +2231,7 @@ static int s626_dio_reset_irq(comedi_device *dev, unsigned int group,
return 0;
}
-static int s626_dio_clear_irq(comedi_device *dev)
+static int s626_dio_clear_irq(struct comedi_device *dev)
{
unsigned int group;
@@ -2251,7 +2251,7 @@ static int s626_dio_clear_irq(comedi_device *dev)
/* Now this function initializes the value of the counter (data[0])
and set the subdevice. To complete with trigger and interrupt
configuration */
-static int s626_enc_insn_config(comedi_device *dev, comedi_subdevice *s,
+static int s626_enc_insn_config(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
uint16_t Setup = (LOADSRC_INDX << BF_LOADSRC) | /* Preload upon */
@@ -2281,7 +2281,7 @@ static int s626_enc_insn_config(comedi_device *dev, comedi_subdevice *s,
return insn->n;
}
-static int s626_enc_insn_read(comedi_device *dev, comedi_subdevice *s,
+static int s626_enc_insn_read(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
@@ -2299,7 +2299,7 @@ static int s626_enc_insn_read(comedi_device *dev, comedi_subdevice *s,
return n;
}
-static int s626_enc_insn_write(comedi_device *dev, comedi_subdevice *s,
+static int s626_enc_insn_write(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
@@ -2322,7 +2322,7 @@ static int s626_enc_insn_write(comedi_device *dev, comedi_subdevice *s,
return 1;
}
-static void s626_timer_load(comedi_device *dev, struct enc_private *k, int tick)
+static void s626_timer_load(struct comedi_device *dev, struct enc_private *k, int tick)
{
uint16_t Setup = (LOADSRC_INDX << BF_LOADSRC) | /* Preload upon */
/* index. */
@@ -2368,7 +2368,7 @@ static uint8_t trimchan[] = { 10, 9, 8, 3, 2, 7, 6, 1, 0, 5, 4 };
static uint8_t trimadrs[] =
{ 0x40, 0x41, 0x42, 0x50, 0x51, 0x52, 0x53, 0x60, 0x61, 0x62, 0x63 };
-static void LoadTrimDACs(comedi_device *dev)
+static void LoadTrimDACs(struct comedi_device *dev)
{
register uint8_t i;
@@ -2377,7 +2377,7 @@ static void LoadTrimDACs(comedi_device *dev)
WriteTrimDAC(dev, i, I2Cread(dev, trimadrs[i]));
}
-static void WriteTrimDAC(comedi_device *dev, uint8_t LogicalChan,
+static void WriteTrimDAC(struct comedi_device *dev, uint8_t LogicalChan,
uint8_t DacData)
{
uint32_t chan;
@@ -2418,7 +2418,7 @@ static void WriteTrimDAC(comedi_device *dev, uint8_t LogicalChan,
/* ************** EEPROM ACCESS FUNCTIONS ************** */
/* Read uint8_t from EEPROM. */
-static uint8_t I2Cread(comedi_device *dev, uint8_t addr)
+static uint8_t I2Cread(struct comedi_device *dev, uint8_t addr)
{
uint8_t rtnval;
@@ -2451,7 +2451,7 @@ static uint8_t I2Cread(comedi_device *dev, uint8_t addr)
return rtnval;
}
-static uint32_t I2Chandshake(comedi_device *dev, uint32_t val)
+static uint32_t I2Chandshake(struct comedi_device *dev, uint32_t val)
{
/* Write I2C command to I2C Transfer Control shadow register. */
WR7146(P_I2CCTRL, val);
@@ -2474,7 +2474,7 @@ static uint32_t I2Chandshake(comedi_device *dev, uint32_t val)
/* Private helper function: Write setpoint to an application DAC channel. */
-static void SetDAC(comedi_device *dev, uint16_t chan, short dacdata)
+static void SetDAC(struct comedi_device *dev, uint16_t chan, short dacdata)
{
register uint16_t signmask;
register uint32_t WSImage;
@@ -2535,7 +2535,7 @@ static void SetDAC(comedi_device *dev, uint16_t chan, short dacdata)
* Dacpol contains valid target image.
*/
-static void SendDAC(comedi_device *dev, uint32_t val)
+static void SendDAC(struct comedi_device *dev, uint32_t val)
{
/* START THE SERIAL CLOCK RUNNING ------------- */
@@ -2655,7 +2655,7 @@ static void SendDAC(comedi_device *dev, uint32_t val)
;
}
-static void WriteMISC2(comedi_device *dev, uint16_t NewImage)
+static void WriteMISC2(struct comedi_device *dev, uint16_t NewImage)
{
DEBIwrite(dev, LP_MISC1, MISC1_WENABLE); /* enab writes to */
/* MISC2 register. */
@@ -2665,7 +2665,7 @@ static void WriteMISC2(comedi_device *dev, uint16_t NewImage)
/* Initialize the DEBI interface for all transfers. */
-static uint16_t DEBIread(comedi_device *dev, uint16_t addr)
+static uint16_t DEBIread(struct comedi_device *dev, uint16_t addr)
{
uint16_t retval;
@@ -2684,7 +2684,7 @@ static uint16_t DEBIread(comedi_device *dev, uint16_t addr)
/* Execute a DEBI transfer. This must be called from within a */
/* critical section. */
-static void DEBItransfer(comedi_device *dev)
+static void DEBItransfer(struct comedi_device *dev)
{
/* Initiate upload of shadow RAM to DEBI control register. */
MC_ENABLE(P_MC2, MC2_UPLD_DEBI);
@@ -2700,7 +2700,7 @@ static void DEBItransfer(comedi_device *dev)
}
/* Write a value to a gate array register. */
-static void DEBIwrite(comedi_device *dev, uint16_t addr, uint16_t wdata)
+static void DEBIwrite(struct comedi_device *dev, uint16_t addr, uint16_t wdata)
{
/* Set up DEBI control register value in shadow RAM. */
@@ -2715,7 +2715,7 @@ static void DEBIwrite(comedi_device *dev, uint16_t addr, uint16_t wdata)
* specifies bits that are to be preserved, wdata is new value to be
* or'd with the masked original.
*/
-static void DEBIreplace(comedi_device *dev, uint16_t addr, uint16_t mask,
+static void DEBIreplace(struct comedi_device *dev, uint16_t addr, uint16_t mask,
uint16_t wdata)
{
@@ -2733,7 +2733,7 @@ static void DEBIreplace(comedi_device *dev, uint16_t addr, uint16_t mask,
DEBItransfer(dev); /* Execute the DEBI Write transfer. */
}
-static void CloseDMAB(comedi_device *dev, DMABUF *pdma, size_t bsize)
+static void CloseDMAB(struct comedi_device *dev, DMABUF *pdma, size_t bsize)
{
void *vbptr;
dma_addr_t vpptr;
@@ -2768,7 +2768,7 @@ static void CloseDMAB(comedi_device *dev, DMABUF *pdma, size_t bsize)
/* Read a counter's output latch. */
-static uint32_t ReadLatch(comedi_device *dev, struct enc_private *k)
+static uint32_t ReadLatch(struct comedi_device *dev, struct enc_private *k)
{
register uint32_t value;
/* DEBUG FIXME DEBUG("ReadLatch: Read Latch enter\n"); */
@@ -2787,13 +2787,13 @@ static uint32_t ReadLatch(comedi_device *dev, struct enc_private *k)
/* Reset a counter's index and overflow event capture flags. */
-static void ResetCapFlags_A(comedi_device *dev, struct enc_private *k)
+static void ResetCapFlags_A(struct comedi_device *dev, struct enc_private *k)
{
DEBIreplace(dev, k->MyCRB, (uint16_t) (~CRBMSK_INTCTRL),
CRBMSK_INTRESETCMD | CRBMSK_INTRESET_A);
}
-static void ResetCapFlags_B(comedi_device *dev, struct enc_private *k)
+static void ResetCapFlags_B(struct comedi_device *dev, struct enc_private *k)
{
DEBIreplace(dev, k->MyCRB, (uint16_t) (~CRBMSK_INTCTRL),
CRBMSK_INTRESETCMD | CRBMSK_INTRESET_B);
@@ -2802,7 +2802,7 @@ static void ResetCapFlags_B(comedi_device *dev, struct enc_private *k)
/* Return counter setup in a format (COUNTER_SETUP) that is consistent */
/* for both A and B counters. */
-static uint16_t GetMode_A(comedi_device *dev, struct enc_private *k)
+static uint16_t GetMode_A(struct comedi_device *dev, struct enc_private *k)
{
register uint16_t cra;
register uint16_t crb;
@@ -2840,7 +2840,7 @@ static uint16_t GetMode_A(comedi_device *dev, struct enc_private *k)
return setup;
}
-static uint16_t GetMode_B(comedi_device *dev, struct enc_private *k)
+static uint16_t GetMode_B(struct comedi_device *dev, struct enc_private *k)
{
register uint16_t cra;
register uint16_t crb;
@@ -2886,7 +2886,7 @@ static uint16_t GetMode_B(comedi_device *dev, struct enc_private *k)
* ClkPol, ClkEnab, IndexSrc, IndexPol, LoadSrc.
*/
-static void SetMode_A(comedi_device *dev, struct enc_private *k, uint16_t Setup,
+static void SetMode_A(struct comedi_device *dev, struct enc_private *k, uint16_t Setup,
uint16_t DisableIntSrc)
{
register uint16_t cra;
@@ -2944,7 +2944,7 @@ static void SetMode_A(comedi_device *dev, struct enc_private *k, uint16_t Setup,
(uint16_t) (~(CRBMSK_INTCTRL | CRBMSK_CLKENAB_A)), crb);
}
-static void SetMode_B(comedi_device *dev, struct enc_private *k, uint16_t Setup,
+static void SetMode_B(struct comedi_device *dev, struct enc_private *k, uint16_t Setup,
uint16_t DisableIntSrc)
{
register uint16_t cra;
@@ -3008,7 +3008,7 @@ static void SetMode_B(comedi_device *dev, struct enc_private *k, uint16_t Setup,
/* Return/set a counter's enable. enab: 0=always enabled, 1=enabled by index. */
-static void SetEnable_A(comedi_device *dev, struct enc_private *k, uint16_t enab)
+static void SetEnable_A(struct comedi_device *dev, struct enc_private *k, uint16_t enab)
{
DEBUG("SetEnable_A: SetEnable_A enter 3541\n");
DEBIreplace(dev, k->MyCRB,
@@ -3016,19 +3016,19 @@ static void SetEnable_A(comedi_device *dev, struct enc_private *k, uint16_t enab
(uint16_t) (enab << CRBBIT_CLKENAB_A));
}
-static void SetEnable_B(comedi_device *dev, struct enc_private *k, uint16_t enab)
+static void SetEnable_B(struct comedi_device *dev, struct enc_private *k, uint16_t enab)
{
DEBIreplace(dev, k->MyCRB,
(uint16_t) (~(CRBMSK_INTCTRL | CRBMSK_CLKENAB_B)),
(uint16_t) (enab << CRBBIT_CLKENAB_B));
}
-static uint16_t GetEnable_A(comedi_device *dev, struct enc_private *k)
+static uint16_t GetEnable_A(struct comedi_device *dev, struct enc_private *k)
{
return (DEBIread(dev, k->MyCRB) >> CRBBIT_CLKENAB_A) & 1;
}
-static uint16_t GetEnable_B(comedi_device *dev, struct enc_private *k)
+static uint16_t GetEnable_B(struct comedi_device *dev, struct enc_private *k)
{
return (DEBIread(dev, k->MyCRB) >> CRBBIT_CLKENAB_B) & 1;
}
@@ -3038,7 +3038,7 @@ static uint16_t GetEnable_B(comedi_device *dev, struct enc_private *k)
* latches B.
*/
-static void SetLatchSource(comedi_device *dev, struct enc_private *k, uint16_t value)
+static void SetLatchSource(struct comedi_device *dev, struct enc_private *k, uint16_t value)
{
DEBUG("SetLatchSource: SetLatchSource enter 3550 \n");
DEBIreplace(dev, k->MyCRB,
@@ -3049,7 +3049,7 @@ static void SetLatchSource(comedi_device *dev, struct enc_private *k, uint16_t v
}
/*
- * static uint16_t GetLatchSource(comedi_device *dev, struct enc_private *k )
+ * static uint16_t GetLatchSource(struct comedi_device *dev, struct enc_private *k )
* {
* return ( DEBIread( dev, k->MyCRB) >> CRBBIT_LATCHSRC ) & 3;
* }
@@ -3061,25 +3061,25 @@ static void SetLatchSource(comedi_device *dev, struct enc_private *k, uint16_t v
* 2=OverflowA (B counters only), 3=disabled.
*/
-static void SetLoadTrig_A(comedi_device *dev, struct enc_private *k, uint16_t Trig)
+static void SetLoadTrig_A(struct comedi_device *dev, struct enc_private *k, uint16_t Trig)
{
DEBIreplace(dev, k->MyCRA, (uint16_t) (~CRAMSK_LOADSRC_A),
(uint16_t) (Trig << CRABIT_LOADSRC_A));
}
-static void SetLoadTrig_B(comedi_device *dev, struct enc_private *k, uint16_t Trig)
+static void SetLoadTrig_B(struct comedi_device *dev, struct enc_private *k, uint16_t Trig)
{
DEBIreplace(dev, k->MyCRB,
(uint16_t) (~(CRBMSK_LOADSRC_B | CRBMSK_INTCTRL)),
(uint16_t) (Trig << CRBBIT_LOADSRC_B));
}
-static uint16_t GetLoadTrig_A(comedi_device *dev, struct enc_private *k)
+static uint16_t GetLoadTrig_A(struct comedi_device *dev, struct enc_private *k)
{
return (DEBIread(dev, k->MyCRA) >> CRABIT_LOADSRC_A) & 3;
}
-static uint16_t GetLoadTrig_B(comedi_device *dev, struct enc_private *k)
+static uint16_t GetLoadTrig_B(struct comedi_device *dev, struct enc_private *k)
{
return (DEBIread(dev, k->MyCRB) >> CRBBIT_LOADSRC_B) & 3;
}
@@ -3089,7 +3089,7 @@ static uint16_t GetLoadTrig_B(comedi_device *dev, struct enc_private *k)
* 2=IndexOnly, 3=IndexAndOverflow.
*/
-static void SetIntSrc_A(comedi_device *dev, struct enc_private *k,
+static void SetIntSrc_A(struct comedi_device *dev, struct enc_private *k,
uint16_t IntSource)
{
/* Reset any pending counter overflow or index captures. */
@@ -3106,7 +3106,7 @@ static void SetIntSrc_A(comedi_device *dev, struct enc_private *k,
MyEventBits[IntSource];
}
-static void SetIntSrc_B(comedi_device *dev, struct enc_private *k,
+static void SetIntSrc_B(struct comedi_device *dev, struct enc_private *k,
uint16_t IntSource)
{
uint16_t crb;
@@ -3129,80 +3129,80 @@ static void SetIntSrc_B(comedi_device *dev, struct enc_private *k,
MyEventBits[IntSource];
}
-static uint16_t GetIntSrc_A(comedi_device *dev, struct enc_private *k)
+static uint16_t GetIntSrc_A(struct comedi_device *dev, struct enc_private *k)
{
return (DEBIread(dev, k->MyCRA) >> CRABIT_INTSRC_A) & 3;
}
-static uint16_t GetIntSrc_B(comedi_device *dev, struct enc_private *k)
+static uint16_t GetIntSrc_B(struct comedi_device *dev, struct enc_private *k)
{
return (DEBIread(dev, k->MyCRB) >> CRBBIT_INTSRC_B) & 3;
}
/* Return/set the clock multiplier. */
-/* static void SetClkMult(comedi_device *dev, struct enc_private *k, uint16_t value ) */
+/* static void SetClkMult(struct comedi_device *dev, struct enc_private *k, uint16_t value ) */
/* { */
/* k->SetMode(dev, k, (uint16_t)( ( k->GetMode(dev, k ) & ~STDMSK_CLKMULT ) | ( value << STDBIT_CLKMULT ) ), FALSE ); */
/* } */
-/* static uint16_t GetClkMult(comedi_device *dev, struct enc_private *k ) */
+/* static uint16_t GetClkMult(struct comedi_device *dev, struct enc_private *k ) */
/* { */
/* return ( k->GetMode(dev, k ) >> STDBIT_CLKMULT ) & 3; */
/* } */
/* Return/set the clock polarity. */
-/* static void SetClkPol( comedi_device *dev,struct enc_private *k, uint16_t value ) */
+/* static void SetClkPol( struct comedi_device *dev,struct enc_private *k, uint16_t value ) */
/* { */
/* k->SetMode(dev, k, (uint16_t)( ( k->GetMode(dev, k ) & ~STDMSK_CLKPOL ) | ( value << STDBIT_CLKPOL ) ), FALSE ); */
/* } */
-/* static uint16_t GetClkPol(comedi_device *dev, struct enc_private *k ) */
+/* static uint16_t GetClkPol(struct comedi_device *dev, struct enc_private *k ) */
/* { */
/* return ( k->GetMode(dev, k ) >> STDBIT_CLKPOL ) & 1; */
/* } */
/* Return/set the clock source. */
-/* static void SetClkSrc( comedi_device *dev,struct enc_private *k, uint16_t value ) */
+/* static void SetClkSrc( struct comedi_device *dev,struct enc_private *k, uint16_t value ) */
/* { */
/* k->SetMode(dev, k, (uint16_t)( ( k->GetMode(dev, k ) & ~STDMSK_CLKSRC ) | ( value << STDBIT_CLKSRC ) ), FALSE ); */
/* } */
-/* static uint16_t GetClkSrc( comedi_device *dev,struct enc_private *k ) */
+/* static uint16_t GetClkSrc( struct comedi_device *dev,struct enc_private *k ) */
/* { */
/* return ( k->GetMode(dev, k ) >> STDBIT_CLKSRC ) & 3; */
/* } */
/* Return/set the index polarity. */
-/* static void SetIndexPol(comedi_device *dev, struct enc_private *k, uint16_t value ) */
+/* static void SetIndexPol(struct comedi_device *dev, struct enc_private *k, uint16_t value ) */
/* { */
/* k->SetMode(dev, k, (uint16_t)( ( k->GetMode(dev, k ) & ~STDMSK_INDXPOL ) | ( (value != 0) << STDBIT_INDXPOL ) ), FALSE ); */
/* } */
-/* static uint16_t GetIndexPol(comedi_device *dev, struct enc_private *k ) */
+/* static uint16_t GetIndexPol(struct comedi_device *dev, struct enc_private *k ) */
/* { */
/* return ( k->GetMode(dev, k ) >> STDBIT_INDXPOL ) & 1; */
/* } */
/* Return/set the index source. */
-/* static void SetIndexSrc(comedi_device *dev, struct enc_private *k, uint16_t value ) */
+/* static void SetIndexSrc(struct comedi_device *dev, struct enc_private *k, uint16_t value ) */
/* { */
/* DEBUG("SetIndexSrc: set index src enter 3700\n"); */
/* k->SetMode(dev, k, (uint16_t)( ( k->GetMode(dev, k ) & ~STDMSK_INDXSRC ) | ( (value != 0) << STDBIT_INDXSRC ) ), FALSE ); */
/* } */
-/* static uint16_t GetIndexSrc(comedi_device *dev, struct enc_private *k ) */
+/* static uint16_t GetIndexSrc(struct comedi_device *dev, struct enc_private *k ) */
/* { */
/* return ( k->GetMode(dev, k ) >> STDBIT_INDXSRC ) & 1; */
/* } */
/* Generate an index pulse. */
-static void PulseIndex_A(comedi_device *dev, struct enc_private *k)
+static void PulseIndex_A(struct comedi_device *dev, struct enc_private *k)
{
register uint16_t cra;
@@ -3214,7 +3214,7 @@ static void PulseIndex_A(comedi_device *dev, struct enc_private *k)
DEBIwrite(dev, k->MyCRA, cra);
}
-static void PulseIndex_B(comedi_device *dev, struct enc_private *k)
+static void PulseIndex_B(struct comedi_device *dev, struct enc_private *k)
{
register uint16_t crb;
@@ -3225,7 +3225,7 @@ static void PulseIndex_B(comedi_device *dev, struct enc_private *k)
/* Write value into counter preload register. */
-static void Preload(comedi_device *dev, struct enc_private *k, uint32_t value)
+static void Preload(struct comedi_device *dev, struct enc_private *k, uint32_t value)
{
DEBUG("Preload: preload enter\n");
DEBIwrite(dev, (uint16_t) (k->MyLatchLsw), (uint16_t) value); /* Write value to preload register. */
@@ -3234,7 +3234,7 @@ static void Preload(comedi_device *dev, struct enc_private *k, uint32_t value)
(uint16_t) (value >> 16));
}
-static void CountersInit(comedi_device *dev)
+static void CountersInit(struct comedi_device *dev)
{
int chan;
struct enc_private *k;
diff --git a/drivers/staging/comedi/drivers/serial2002.c b/drivers/staging/comedi/drivers/serial2002.c
index 65bbf5cb0e9f..d63b657ec0d5 100644
--- a/drivers/staging/comedi/drivers/serial2002.c
+++ b/drivers/staging/comedi/drivers/serial2002.c
@@ -85,8 +85,8 @@ typedef struct {
*/
#define devpriv ((serial2002_private *)dev->private)
-static int serial2002_attach(comedi_device * dev, comedi_devconfig * it);
-static int serial2002_detach(comedi_device * dev);
+static int serial2002_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int serial2002_detach(struct comedi_device * dev);
comedi_driver driver_serial2002 = {
driver_name:"serial2002",
module:THIS_MODULE,
@@ -97,15 +97,15 @@ comedi_driver driver_serial2002 = {
num_names:sizeof(serial2002_boards) / sizeof(serial2002_board),
};
-static int serial2002_di_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int serial2002_di_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int serial2002_do_winsn(comedi_device * dev, comedi_subdevice * s,
+static int serial2002_do_winsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int serial2002_ai_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int serial2002_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int serial2002_ao_winsn(comedi_device * dev, comedi_subdevice * s,
+static int serial2002_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int serial2002_ao_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int serial2002_ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
struct serial_data {
@@ -389,7 +389,7 @@ static void serial_write(struct file *f, struct serial_data data)
}
}
-static void serial_2002_open(comedi_device * dev)
+static void serial_2002_open(struct comedi_device * dev)
{
char port[20];
@@ -653,14 +653,14 @@ static void serial_2002_open(comedi_device * dev)
}
}
-static void serial_2002_close(comedi_device * dev)
+static void serial_2002_close(struct comedi_device * dev)
{
if (!IS_ERR(devpriv->tty) && (devpriv->tty != 0)) {
filp_close(devpriv->tty, 0);
}
}
-static int serial2002_di_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int serial2002_di_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n;
@@ -682,7 +682,7 @@ static int serial2002_di_rinsn(comedi_device * dev, comedi_subdevice * s,
return n;
}
-static int serial2002_do_winsn(comedi_device * dev, comedi_subdevice * s,
+static int serial2002_do_winsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n;
@@ -700,7 +700,7 @@ static int serial2002_do_winsn(comedi_device * dev, comedi_subdevice * s,
return n;
}
-static int serial2002_ai_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int serial2002_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n;
@@ -722,7 +722,7 @@ static int serial2002_ai_rinsn(comedi_device * dev, comedi_subdevice * s,
return n;
}
-static int serial2002_ao_winsn(comedi_device * dev, comedi_subdevice * s,
+static int serial2002_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n;
@@ -741,7 +741,7 @@ static int serial2002_ao_winsn(comedi_device * dev, comedi_subdevice * s,
return n;
}
-static int serial2002_ao_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int serial2002_ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n;
@@ -754,7 +754,7 @@ static int serial2002_ao_rinsn(comedi_device * dev, comedi_subdevice * s,
return n;
}
-static int serial2002_ei_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int serial2002_ei_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n;
@@ -776,7 +776,7 @@ static int serial2002_ei_rinsn(comedi_device * dev, comedi_subdevice * s,
return n;
}
-static int serial2002_attach(comedi_device * dev, comedi_devconfig * it)
+static int serial2002_attach(struct comedi_device * dev, comedi_devconfig * it)
{
comedi_subdevice *s;
@@ -843,7 +843,7 @@ static int serial2002_attach(comedi_device * dev, comedi_devconfig * it)
return 1;
}
-static int serial2002_detach(comedi_device * dev)
+static int serial2002_detach(struct comedi_device * dev)
{
comedi_subdevice *s;
int i;
diff --git a/drivers/staging/comedi/drivers/skel.c b/drivers/staging/comedi/drivers/skel.c
index 7a2e0ce409ed..8252349e3af9 100644
--- a/drivers/staging/comedi/drivers/skel.c
+++ b/drivers/staging/comedi/drivers/skel.c
@@ -129,7 +129,7 @@ MODULE_DEVICE_TABLE(pci, skel_pci_table);
/* this structure is for data unique to this hardware driver. If
several hardware drivers keep similar information in this structure,
- feel free to suggest moving the variable to the comedi_device struct. */
+ feel free to suggest moving the variable to the struct comedi_device struct. */
typedef struct {
int data;
@@ -151,8 +151,8 @@ typedef struct {
* the board, and also about the kernel module that contains
* the device code.
*/
-static int skel_attach(comedi_device * dev, comedi_devconfig * it);
-static int skel_detach(comedi_device * dev);
+static int skel_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int skel_detach(struct comedi_device * dev);
static comedi_driver driver_skel = {
driver_name:"dummy",
module:THIS_MODULE,
@@ -181,17 +181,17 @@ static comedi_driver driver_skel = {
num_names:sizeof(skel_boards) / sizeof(skel_board),
};
-static int skel_ai_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int skel_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int skel_ao_winsn(comedi_device * dev, comedi_subdevice * s,
+static int skel_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int skel_ao_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int skel_ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int skel_dio_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int skel_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int skel_dio_insn_config(comedi_device * dev, comedi_subdevice * s,
+static int skel_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static int skel_ai_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int skel_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd);
static int skel_ns_to_timer(unsigned int *ns, int round);
@@ -201,7 +201,7 @@ static int skel_ns_to_timer(unsigned int *ns, int round);
* in the driver structure, dev->board_ptr contains that
* address.
*/
-static int skel_attach(comedi_device * dev, comedi_devconfig * it)
+static int skel_attach(struct comedi_device * dev, comedi_devconfig * it)
{
comedi_subdevice *s;
@@ -287,7 +287,7 @@ static int skel_attach(comedi_device * dev, comedi_devconfig * it)
* allocated by _attach(). dev->private and dev->subdevices are
* deallocated automatically by the core.
*/
-static int skel_detach(comedi_device * dev)
+static int skel_detach(struct comedi_device * dev)
{
printk("comedi%d: skel: remove\n", dev->minor);
@@ -298,7 +298,7 @@ static int skel_detach(comedi_device * dev)
* "instructions" read/write data in "one-shot" or "software-triggered"
* mode.
*/
-static int skel_ai_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int skel_ai_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int n, i;
@@ -346,7 +346,7 @@ static int skel_ai_rinsn(comedi_device * dev, comedi_subdevice * s,
return n;
}
-static int skel_ai_cmdtest(comedi_device * dev, comedi_subdevice * s,
+static int skel_ai_cmdtest(struct comedi_device * dev, comedi_subdevice * s,
comedi_cmd * cmd)
{
int err = 0;
@@ -515,7 +515,7 @@ static int skel_ns_to_timer(unsigned int *ns, int round)
return *ns;
}
-static int skel_ao_winsn(comedi_device * dev, comedi_subdevice * s,
+static int skel_ao_winsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
@@ -536,7 +536,7 @@ static int skel_ao_winsn(comedi_device * dev, comedi_subdevice * s,
/* AO subdevices should have a read insn as well as a write insn.
* Usually this means copying a value stored in devpriv. */
-static int skel_ao_rinsn(comedi_device * dev, comedi_subdevice * s,
+static int skel_ao_rinsn(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int i;
@@ -553,7 +553,7 @@ static int skel_ao_rinsn(comedi_device * dev, comedi_subdevice * s,
* useful to applications if you implement the insn_bits interface.
* This allows packed reading/writing of the DIO channels. The
* comedi core can convert between insn_bits and insn_read/write */
-static int skel_dio_insn_bits(comedi_device * dev, comedi_subdevice * s,
+static int skel_dio_insn_bits(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
if (insn->n != 2)
@@ -578,7 +578,7 @@ static int skel_dio_insn_bits(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int skel_dio_insn_config(comedi_device * dev, comedi_subdevice * s,
+static int skel_dio_insn_config(struct comedi_device * dev, comedi_subdevice * s,
comedi_insn * insn, unsigned int * data)
{
int chan = CR_CHAN(insn->chanspec);
diff --git a/drivers/staging/comedi/drivers/ssv_dnp.c b/drivers/staging/comedi/drivers/ssv_dnp.c
index f2465a2bf8e5..2cb08849a6bb 100644
--- a/drivers/staging/comedi/drivers/ssv_dnp.c
+++ b/drivers/staging/comedi/drivers/ssv_dnp.c
@@ -87,8 +87,8 @@ typedef struct {
/* In the following section we define the API of this driver. */
/* ------------------------------------------------------------------------- */
-static int dnp_attach(comedi_device * dev, comedi_devconfig * it);
-static int dnp_detach(comedi_device * dev);
+static int dnp_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int dnp_detach(struct comedi_device * dev);
static comedi_driver driver_dnp = {
driver_name:"ssv_dnp",
@@ -103,10 +103,10 @@ static comedi_driver driver_dnp = {
COMEDI_INITCLEANUP(driver_dnp);
-static int dnp_dio_insn_bits(comedi_device * dev,
+static int dnp_dio_insn_bits(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
-static int dnp_dio_insn_config(comedi_device * dev,
+static int dnp_dio_insn_config(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data);
/* ------------------------------------------------------------------------- */
@@ -115,7 +115,7 @@ static int dnp_dio_insn_config(comedi_device * dev,
/* dev->board_ptr contains that address. */
/* ------------------------------------------------------------------------- */
-static int dnp_attach(comedi_device * dev, comedi_devconfig * it)
+static int dnp_attach(struct comedi_device * dev, comedi_devconfig * it)
{
comedi_subdevice *s;
@@ -176,7 +176,7 @@ static int dnp_attach(comedi_device * dev, comedi_devconfig * it)
/* deallocated automatically by the core. */
/* ------------------------------------------------------------------------- */
-static int dnp_detach(comedi_device * dev)
+static int dnp_detach(struct comedi_device * dev)
{
/* configure all ports as input (default) */
@@ -200,7 +200,7 @@ static int dnp_detach(comedi_device * dev)
/* are able to use these instructions as well. */
/* ------------------------------------------------------------------------- */
-static int dnp_dio_insn_bits(comedi_device * dev,
+static int dnp_dio_insn_bits(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
@@ -250,7 +250,7 @@ static int dnp_dio_insn_bits(comedi_device * dev,
/* COMEDI_INPUT or COMEDI_OUTPUT. */
/* ------------------------------------------------------------------------- */
-static int dnp_dio_insn_config(comedi_device * dev,
+static int dnp_dio_insn_config(struct comedi_device * dev,
comedi_subdevice * s, comedi_insn * insn, unsigned int * data)
{
diff --git a/drivers/staging/comedi/drivers/unioxx5.c b/drivers/staging/comedi/drivers/unioxx5.c
index 8df437af9dcc..90947cf1dbc4 100644
--- a/drivers/staging/comedi/drivers/unioxx5.c
+++ b/drivers/staging/comedi/drivers/unioxx5.c
@@ -80,14 +80,14 @@ typedef struct unioxx5_subd_priv {
unsigned char usp_prev_cn_val[3]; /* previous channel value */
} unioxx5_subd_priv;
-static int unioxx5_attach(comedi_device * dev, comedi_devconfig * it);
-static int unioxx5_subdev_write(comedi_device * dev, comedi_subdevice * subdev,
+static int unioxx5_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int unioxx5_subdev_write(struct comedi_device * dev, comedi_subdevice * subdev,
comedi_insn * insn, unsigned int * data);
-static int unioxx5_subdev_read(comedi_device * dev, comedi_subdevice * subdev,
+static int unioxx5_subdev_read(struct comedi_device * dev, comedi_subdevice * subdev,
comedi_insn * insn, unsigned int * data);
-static int unioxx5_insn_config(comedi_device * dev, comedi_subdevice * subdev,
+static int unioxx5_insn_config(struct comedi_device * dev, comedi_subdevice * subdev,
comedi_insn * insn, unsigned int * data);
-static int unioxx5_detach(comedi_device * dev);
+static int unioxx5_detach(struct comedi_device * dev);
static int __unioxx5_subdev_init(comedi_subdevice * subdev, int subdev_iobase,
int minor);
static int __unioxx5_digital_write(unioxx5_subd_priv * usp, unsigned int * data,
@@ -111,7 +111,7 @@ static comedi_driver unioxx5_driver = {
COMEDI_INITCLEANUP(unioxx5_driver);
-static int unioxx5_attach(comedi_device * dev, comedi_devconfig * it)
+static int unioxx5_attach(struct comedi_device * dev, comedi_devconfig * it)
{
int iobase, i, n_subd;
int id, num, ba;
@@ -156,7 +156,7 @@ static int unioxx5_attach(comedi_device * dev, comedi_devconfig * it)
return 0;
}
-static int unioxx5_subdev_read(comedi_device * dev, comedi_subdevice * subdev,
+static int unioxx5_subdev_read(struct comedi_device * dev, comedi_subdevice * subdev,
comedi_insn * insn, unsigned int * data)
{
unioxx5_subd_priv *usp = subdev->private;
@@ -176,7 +176,7 @@ static int unioxx5_subdev_read(comedi_device * dev, comedi_subdevice * subdev,
return 1;
}
-static int unioxx5_subdev_write(comedi_device * dev, comedi_subdevice * subdev,
+static int unioxx5_subdev_write(struct comedi_device * dev, comedi_subdevice * subdev,
comedi_insn * insn, unsigned int * data)
{
unioxx5_subd_priv *usp = subdev->private;
@@ -197,7 +197,7 @@ static int unioxx5_subdev_write(comedi_device * dev, comedi_subdevice * subdev,
}
/* for digital modules only */
-static int unioxx5_insn_config(comedi_device * dev, comedi_subdevice * subdev,
+static int unioxx5_insn_config(struct comedi_device * dev, comedi_subdevice * subdev,
comedi_insn * insn, unsigned int * data)
{
int channel_offset, flags, channel = CR_CHAN(insn->chanspec), type;
@@ -247,7 +247,7 @@ static int unioxx5_insn_config(comedi_device * dev, comedi_subdevice * subdev,
return 0;
}
-static int unioxx5_detach(comedi_device * dev)
+static int unioxx5_detach(struct comedi_device * dev)
{
int i;
comedi_subdevice *subdev;
diff --git a/drivers/staging/comedi/drivers/usbdux.c b/drivers/staging/comedi/drivers/usbdux.c
index 68566295443a..c433076c0e47 100644
--- a/drivers/staging/comedi/drivers/usbdux.c
+++ b/drivers/staging/comedi/drivers/usbdux.c
@@ -269,7 +269,7 @@ struct usbduxsub {
/* interface structure in 2.6 */
struct usb_interface *interface;
/* comedi device for the interrupt context */
- comedi_device *comedidev;
+ struct comedi_device *comedidev;
/* is it USB_SPEED_HIGH or not? */
short int high_speed;
/* asynchronous command is running */
@@ -363,7 +363,7 @@ static int usbdux_ai_stop(struct usbduxsub *this_usbduxsub, int do_unlink)
* This will cancel a running acquisition operation.
* This is called by comedi but never from inside the driver.
*/
-static int usbdux_ai_cancel(comedi_device *dev, comedi_subdevice *s)
+static int usbdux_ai_cancel(struct comedi_device *dev, comedi_subdevice *s)
{
struct usbduxsub *this_usbduxsub;
int res = 0;
@@ -392,7 +392,7 @@ static void usbduxsub_ai_IsocIrq(struct urb *urb)
{
int i, err, n;
struct usbduxsub *this_usbduxsub;
- comedi_device *this_comedidev;
+ struct comedi_device *this_comedidev;
comedi_subdevice *s;
/* the context variable points to the subdevice */
@@ -561,7 +561,7 @@ static int usbdux_ao_stop(struct usbduxsub *this_usbduxsub, int do_unlink)
}
/* force unlink, is called by comedi */
-static int usbdux_ao_cancel(comedi_device *dev, comedi_subdevice *s)
+static int usbdux_ao_cancel(struct comedi_device *dev, comedi_subdevice *s)
{
struct usbduxsub *this_usbduxsub = dev->private;
int res = 0;
@@ -586,7 +586,7 @@ static void usbduxsub_ao_IsocIrq(struct urb *urb)
int i, ret;
int8_t *datap;
struct usbduxsub *this_usbduxsub;
- comedi_device *this_comedidev;
+ struct comedi_device *this_comedidev;
comedi_subdevice *s;
/* the context variable points to the subdevice */
@@ -896,7 +896,7 @@ static int usbduxsub_submit_OutURBs(struct usbduxsub *usbduxsub)
return 0;
}
-static int usbdux_ai_cmdtest(comedi_device *dev, comedi_subdevice *s,
+static int usbdux_ai_cmdtest(struct comedi_device *dev, comedi_subdevice *s,
comedi_cmd *cmd)
{
int err = 0, tmp, i;
@@ -1116,7 +1116,7 @@ static int receive_dux_commands(struct usbduxsub *this_usbduxsub, int command)
return -EFAULT;
}
-static int usbdux_ai_inttrig(comedi_device *dev, comedi_subdevice *s,
+static int usbdux_ai_inttrig(struct comedi_device *dev, comedi_subdevice *s,
unsigned int trignum)
{
int ret;
@@ -1160,7 +1160,7 @@ static int usbdux_ai_inttrig(comedi_device *dev, comedi_subdevice *s,
return 1;
}
-static int usbdux_ai_cmd(comedi_device *dev, comedi_subdevice *s)
+static int usbdux_ai_cmd(struct comedi_device *dev, comedi_subdevice *s)
{
comedi_cmd *cmd = &s->async->cmd;
unsigned int chan, range;
@@ -1276,7 +1276,7 @@ static int usbdux_ai_cmd(comedi_device *dev, comedi_subdevice *s)
}
/* Mode 0 is used to get a single conversion on demand */
-static int usbdux_ai_insn_read(comedi_device *dev, comedi_subdevice *s,
+static int usbdux_ai_insn_read(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
int i;
@@ -1337,7 +1337,7 @@ static int usbdux_ai_insn_read(comedi_device *dev, comedi_subdevice *s,
/************************************/
/* analog out */
-static int usbdux_ao_insn_read(comedi_device *dev, comedi_subdevice *s,
+static int usbdux_ao_insn_read(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
int i;
@@ -1359,7 +1359,7 @@ static int usbdux_ao_insn_read(comedi_device *dev, comedi_subdevice *s,
return i;
}
-static int usbdux_ao_insn_write(comedi_device *dev, comedi_subdevice *s,
+static int usbdux_ao_insn_write(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
int i, err;
@@ -1409,7 +1409,7 @@ static int usbdux_ao_insn_write(comedi_device *dev, comedi_subdevice *s,
return i;
}
-static int usbdux_ao_inttrig(comedi_device *dev, comedi_subdevice *s,
+static int usbdux_ao_inttrig(struct comedi_device *dev, comedi_subdevice *s,
unsigned int trignum)
{
int ret;
@@ -1450,7 +1450,7 @@ static int usbdux_ao_inttrig(comedi_device *dev, comedi_subdevice *s,
return 1;
}
-static int usbdux_ao_cmdtest(comedi_device *dev, comedi_subdevice *s,
+static int usbdux_ao_cmdtest(struct comedi_device *dev, comedi_subdevice *s,
comedi_cmd *cmd)
{
int err = 0, tmp;
@@ -1589,7 +1589,7 @@ static int usbdux_ao_cmdtest(comedi_device *dev, comedi_subdevice *s,
return 0;
}
-static int usbdux_ao_cmd(comedi_device *dev, comedi_subdevice *s)
+static int usbdux_ao_cmd(struct comedi_device *dev, comedi_subdevice *s)
{
comedi_cmd *cmd = &s->async->cmd;
unsigned int chan, gain;
@@ -1697,7 +1697,7 @@ static int usbdux_ao_cmd(comedi_device *dev, comedi_subdevice *s)
return 0;
}
-static int usbdux_dio_insn_config(comedi_device *dev, comedi_subdevice *s,
+static int usbdux_dio_insn_config(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
int chan = CR_CHAN(insn->chanspec);
@@ -1728,7 +1728,7 @@ static int usbdux_dio_insn_config(comedi_device *dev, comedi_subdevice *s,
return insn->n;
}
-static int usbdux_dio_insn_bits(comedi_device *dev, comedi_subdevice *s,
+static int usbdux_dio_insn_bits(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
@@ -1775,7 +1775,7 @@ static int usbdux_dio_insn_bits(comedi_device *dev, comedi_subdevice *s,
}
/* reads the 4 counters, only two are used just now */
-static int usbdux_counter_read(comedi_device *dev, comedi_subdevice *s,
+static int usbdux_counter_read(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
struct usbduxsub *this_usbduxsub = dev->private;
@@ -1809,7 +1809,7 @@ static int usbdux_counter_read(comedi_device *dev, comedi_subdevice *s,
return 1;
}
-static int usbdux_counter_write(comedi_device *dev, comedi_subdevice *s,
+static int usbdux_counter_write(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
struct usbduxsub *this_usbduxsub = dev->private;
@@ -1839,7 +1839,7 @@ static int usbdux_counter_write(comedi_device *dev, comedi_subdevice *s,
return 1;
}
-static int usbdux_counter_config(comedi_device *dev, comedi_subdevice *s,
+static int usbdux_counter_config(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
/* nothing to do so far */
@@ -1883,7 +1883,7 @@ static int usbdux_pwm_stop(struct usbduxsub *this_usbduxsub, int do_unlink)
}
/* force unlink - is called by comedi */
-static int usbdux_pwm_cancel(comedi_device *dev, comedi_subdevice *s)
+static int usbdux_pwm_cancel(struct comedi_device *dev, comedi_subdevice *s)
{
struct usbduxsub *this_usbduxsub = dev->private;
int res = 0;
@@ -1905,7 +1905,7 @@ static void usbduxsub_pwm_irq(struct urb *urb)
{
int ret;
struct usbduxsub *this_usbduxsub;
- comedi_device *this_comedidev;
+ struct comedi_device *this_comedidev;
comedi_subdevice *s;
/* printk(KERN_DEBUG "PWM: IRQ\n"); */
@@ -1996,7 +1996,7 @@ static int usbduxsub_submit_PwmURBs(struct usbduxsub *usbduxsub)
return 0;
}
-static int usbdux_pwm_period(comedi_device *dev, comedi_subdevice *s,
+static int usbdux_pwm_period(struct comedi_device *dev, comedi_subdevice *s,
unsigned int period)
{
struct usbduxsub *this_usbduxsub = dev->private;
@@ -2024,7 +2024,7 @@ static int usbdux_pwm_period(comedi_device *dev, comedi_subdevice *s,
}
/* is called from insn so there's no need to do all the sanity checks */
-static int usbdux_pwm_start(comedi_device *dev, comedi_subdevice *s)
+static int usbdux_pwm_start(struct comedi_device *dev, comedi_subdevice *s)
{
int ret, i;
struct usbduxsub *this_usbduxsub = dev->private;
@@ -2056,7 +2056,7 @@ static int usbdux_pwm_start(comedi_device *dev, comedi_subdevice *s)
}
/* generates the bit pattern for PWM with the optional sign bit */
-static int usbdux_pwm_pattern(comedi_device *dev, comedi_subdevice *s,
+static int usbdux_pwm_pattern(struct comedi_device *dev, comedi_subdevice *s,
int channel, unsigned int value, unsigned int sign)
{
struct usbduxsub *this_usbduxsub = dev->private;
@@ -2097,7 +2097,7 @@ static int usbdux_pwm_pattern(comedi_device *dev, comedi_subdevice *s,
return 1;
}
-static int usbdux_pwm_write(comedi_device *dev, comedi_subdevice *s,
+static int usbdux_pwm_write(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
struct usbduxsub *this_usbduxsub = dev->private;
@@ -2122,7 +2122,7 @@ static int usbdux_pwm_write(comedi_device *dev, comedi_subdevice *s,
data[0], 0);
}
-static int usbdux_pwm_read(comedi_device *x1, comedi_subdevice *x2,
+static int usbdux_pwm_read(struct comedi_device *x1, comedi_subdevice *x2,
comedi_insn *x3, unsigned int *x4)
{
/* not needed */
@@ -2130,7 +2130,7 @@ static int usbdux_pwm_read(comedi_device *x1, comedi_subdevice *x2,
};
/* switches on/off PWM */
-static int usbdux_pwm_config(comedi_device *dev, comedi_subdevice *s,
+static int usbdux_pwm_config(struct comedi_device *dev, comedi_subdevice *s,
comedi_insn *insn, unsigned int *data)
{
struct usbduxsub *this_usbduxsub = dev->private;
@@ -2703,7 +2703,7 @@ static void usbduxsub_disconnect(struct usb_interface *intf)
}
/* is called when comedi-config is called */
-static int usbdux_attach(comedi_device *dev, comedi_devconfig *it)
+static int usbdux_attach(struct comedi_device *dev, comedi_devconfig *it)
{
int ret;
int index;
@@ -2870,7 +2870,7 @@ static int usbdux_attach(comedi_device *dev, comedi_devconfig *it)
return 0;
}
-static int usbdux_detach(comedi_device *dev)
+static int usbdux_detach(struct comedi_device *dev)
{
struct usbduxsub *usbduxsub_tmp;
diff --git a/drivers/staging/comedi/drivers/usbduxfast.c b/drivers/staging/comedi/drivers/usbduxfast.c
index aa21914318c8..ff4a546a157a 100644
--- a/drivers/staging/comedi/drivers/usbduxfast.c
+++ b/drivers/staging/comedi/drivers/usbduxfast.c
@@ -179,7 +179,7 @@ struct usbduxfastsub_s {
int16_t *insnBuffer; /* input buffer for single insn */
int ifnum; /* interface number */
struct usb_interface *interface; /* interface structure */
- comedi_device *comedidev; /* comedi device for the interrupt
+ struct comedi_device *comedidev; /* comedi device for the interrupt
context */
short int ai_cmd_running; /* asynchronous command is running */
short int ai_continous; /* continous aquisition */
@@ -284,7 +284,7 @@ static int usbduxfast_ai_stop(struct usbduxfastsub_s *udfs,
* This will cancel a running acquisition operation.
* This is called by comedi but never from inside the driver.
*/
-static int usbduxfast_ai_cancel(comedi_device *dev, comedi_subdevice *s)
+static int usbduxfast_ai_cancel(struct comedi_device *dev, comedi_subdevice *s)
{
struct usbduxfastsub_s *udfs;
int ret;
@@ -318,7 +318,7 @@ static void usbduxfastsub_ai_Irq(struct urb *urb PT_REGS_ARG)
{
int n, err;
struct usbduxfastsub_s *udfs;
- comedi_device *this_comedidev;
+ struct comedi_device *this_comedidev;
comedi_subdevice *s;
uint16_t *p;
@@ -577,7 +577,7 @@ int usbduxfastsub_submit_InURBs(struct usbduxfastsub_s *udfs)
return 0;
}
-static int usbduxfast_ai_cmdtest(comedi_device *dev,
+static int usbduxfast_ai_cmdtest(struct comedi_device *dev,
comedi_subdevice *s, comedi_cmd *cmd)
{
int err = 0, stop_mask = 0;
@@ -719,7 +719,7 @@ static int usbduxfast_ai_cmdtest(comedi_device *dev,
}
-static int usbduxfast_ai_inttrig(comedi_device *dev,
+static int usbduxfast_ai_inttrig(struct comedi_device *dev,
comedi_subdevice *s, unsigned int trignum)
{
int ret;
@@ -771,7 +771,7 @@ static int usbduxfast_ai_inttrig(comedi_device *dev,
#define OUTBASE (1+0x10)
#define LOGBASE (1+0x18)
-static int usbduxfast_ai_cmd(comedi_device *dev, comedi_subdevice *s)
+static int usbduxfast_ai_cmd(struct comedi_device *dev, comedi_subdevice *s)
{
comedi_cmd *cmd = &s->async->cmd;
unsigned int chan, gain, rngmask = 0xff;
@@ -1230,7 +1230,7 @@ static int usbduxfast_ai_cmd(comedi_device *dev, comedi_subdevice *s)
/*
* Mode 0 is used to get a single conversion on demand.
*/
-static int usbduxfast_ai_insn_read(comedi_device *dev,
+static int usbduxfast_ai_insn_read(struct comedi_device *dev,
comedi_subdevice *s, comedi_insn *insn, unsigned int *data)
{
int i, j, n, actual_length;
@@ -1715,7 +1715,7 @@ static void usbduxfastsub_disconnect(struct usb_interface *intf)
/*
* is called when comedi-config is called
*/
-static int usbduxfast_attach(comedi_device *dev, comedi_devconfig *it)
+static int usbduxfast_attach(struct comedi_device *dev, comedi_devconfig *it)
{
int ret;
int index;
@@ -1813,7 +1813,7 @@ static int usbduxfast_attach(comedi_device *dev, comedi_devconfig *it)
return 0;
}
-static int usbduxfast_detach(comedi_device *dev)
+static int usbduxfast_detach(struct comedi_device *dev)
{
struct usbduxfastsub_s *udfs;
diff --git a/drivers/staging/comedi/kcomedilib/get.c b/drivers/staging/comedi/kcomedilib/get.c
index 4bb32593a79d..257cf8c25564 100644
--- a/drivers/staging/comedi/kcomedilib/get.c
+++ b/drivers/staging/comedi/kcomedilib/get.c
@@ -28,7 +28,7 @@
int comedi_get_n_subdevices(void *d)
{
- comedi_device *dev = (comedi_device *) d;
+ struct comedi_device *dev = (struct comedi_device *) d;
return dev->n_subdevices;
}
@@ -40,21 +40,21 @@ int comedi_get_version_code(void *d)
const char *comedi_get_driver_name(void * d)
{
- comedi_device *dev = (comedi_device *) d;
+ struct comedi_device *dev = (struct comedi_device *) d;
return dev->driver->driver_name;
}
const char *comedi_get_board_name(void * d)
{
- comedi_device *dev = (comedi_device *) d;
+ struct comedi_device *dev = (struct comedi_device *) d;
return dev->board_name;
}
int comedi_get_subdevice_type(void *d, unsigned int subdevice)
{
- comedi_device *dev = (comedi_device *) d;
+ struct comedi_device *dev = (struct comedi_device *) d;
comedi_subdevice *s = dev->subdevices + subdevice;
return s->type;
@@ -62,7 +62,7 @@ int comedi_get_subdevice_type(void *d, unsigned int subdevice)
unsigned int comedi_get_subdevice_flags(void *d, unsigned int subdevice)
{
- comedi_device *dev = (comedi_device *) d;
+ struct comedi_device *dev = (struct comedi_device *) d;
comedi_subdevice *s = dev->subdevices + subdevice;
return s->subdev_flags;
@@ -70,7 +70,7 @@ unsigned int comedi_get_subdevice_flags(void *d, unsigned int subdevice)
int comedi_find_subdevice_by_type(void *d, int type, unsigned int subd)
{
- comedi_device *dev = (comedi_device *) d;
+ struct comedi_device *dev = (struct comedi_device *) d;
if (subd > dev->n_subdevices)
return -ENODEV;
@@ -84,7 +84,7 @@ int comedi_find_subdevice_by_type(void *d, int type, unsigned int subd)
int comedi_get_n_channels(void *d, unsigned int subdevice)
{
- comedi_device *dev = (comedi_device *) d;
+ struct comedi_device *dev = (struct comedi_device *) d;
comedi_subdevice *s = dev->subdevices + subdevice;
return s->n_chan;
@@ -92,7 +92,7 @@ int comedi_get_n_channels(void *d, unsigned int subdevice)
int comedi_get_len_chanlist(void *d, unsigned int subdevice)
{
- comedi_device *dev = (comedi_device *) d;
+ struct comedi_device *dev = (struct comedi_device *) d;
comedi_subdevice *s = dev->subdevices + subdevice;
return s->len_chanlist;
@@ -101,7 +101,7 @@ int comedi_get_len_chanlist(void *d, unsigned int subdevice)
unsigned int comedi_get_maxdata(void *d, unsigned int subdevice,
unsigned int chan)
{
- comedi_device *dev = (comedi_device *) d;
+ struct comedi_device *dev = (struct comedi_device *) d;
comedi_subdevice *s = dev->subdevices + subdevice;
if (s->maxdata_list)
@@ -114,7 +114,7 @@ unsigned int comedi_get_maxdata(void *d, unsigned int subdevice,
int comedi_get_rangetype(void *d, unsigned int subdevice,
unsigned int chan)
{
- comedi_device *dev = (comedi_device *) d;
+ struct comedi_device *dev = (struct comedi_device *) d;
comedi_subdevice *s = dev->subdevices + subdevice;
int ret;
@@ -132,7 +132,7 @@ int comedi_get_rangetype(void *d, unsigned int subdevice,
int comedi_get_n_ranges(void *d, unsigned int subdevice, unsigned int chan)
{
- comedi_device *dev = (comedi_device *) d;
+ struct comedi_device *dev = (struct comedi_device *) d;
comedi_subdevice *s = dev->subdevices + subdevice;
int ret;
@@ -151,7 +151,7 @@ int comedi_get_n_ranges(void *d, unsigned int subdevice, unsigned int chan)
int comedi_get_krange(void *d, unsigned int subdevice, unsigned int chan,
unsigned int range, comedi_krange *krange)
{
- comedi_device *dev = (comedi_device *) d;
+ struct comedi_device *dev = (struct comedi_device *) d;
comedi_subdevice *s = dev->subdevices + subdevice;
const comedi_lrange *lr;
@@ -173,7 +173,7 @@ int comedi_get_krange(void *d, unsigned int subdevice, unsigned int chan,
*/
unsigned int comedi_get_buf_head_pos(void *d, unsigned int subdevice)
{
- comedi_device *dev = (comedi_device *) d;
+ struct comedi_device *dev = (struct comedi_device *) d;
comedi_subdevice *s = dev->subdevices + subdevice;
comedi_async *async;
@@ -186,7 +186,7 @@ unsigned int comedi_get_buf_head_pos(void *d, unsigned int subdevice)
int comedi_get_buffer_contents(void *d, unsigned int subdevice)
{
- comedi_device *dev = (comedi_device *) d;
+ struct comedi_device *dev = (struct comedi_device *) d;
comedi_subdevice *s = dev->subdevices + subdevice;
comedi_async *async;
unsigned int num_bytes;
@@ -206,7 +206,7 @@ int comedi_get_buffer_contents(void *d, unsigned int subdevice)
int comedi_set_user_int_count(void *d, unsigned int subdevice,
unsigned int buf_user_count)
{
- comedi_device *dev = (comedi_device *) d;
+ struct comedi_device *dev = (struct comedi_device *) d;
comedi_subdevice *s = dev->subdevices + subdevice;
comedi_async *async;
int num_bytes;
@@ -227,7 +227,7 @@ int comedi_set_user_int_count(void *d, unsigned int subdevice,
int comedi_mark_buffer_read(void *d, unsigned int subdevice,
unsigned int num_bytes)
{
- comedi_device *dev = (comedi_device *) d;
+ struct comedi_device *dev = (struct comedi_device *) d;
comedi_subdevice *s = dev->subdevices + subdevice;
comedi_async *async;
@@ -246,7 +246,7 @@ int comedi_mark_buffer_read(void *d, unsigned int subdevice,
int comedi_mark_buffer_written(void *d, unsigned int subdevice,
unsigned int num_bytes)
{
- comedi_device *dev = (comedi_device *) d;
+ struct comedi_device *dev = (struct comedi_device *) d;
comedi_subdevice *s = dev->subdevices + subdevice;
comedi_async *async;
int bytes_written;
@@ -265,7 +265,7 @@ int comedi_mark_buffer_written(void *d, unsigned int subdevice,
int comedi_get_buffer_size(void *d, unsigned int subdev)
{
- comedi_device *dev = (comedi_device *) d;
+ struct comedi_device *dev = (struct comedi_device *) d;
comedi_subdevice *s = dev->subdevices + subdev;
comedi_async *async;
@@ -280,7 +280,7 @@ int comedi_get_buffer_size(void *d, unsigned int subdev)
int comedi_get_buffer_offset(void *d, unsigned int subdevice)
{
- comedi_device *dev = (comedi_device *) d;
+ struct comedi_device *dev = (struct comedi_device *) d;
comedi_subdevice *s = dev->subdevices + subdevice;
comedi_async *async;
diff --git a/drivers/staging/comedi/kcomedilib/kcomedilib_main.c b/drivers/staging/comedi/kcomedilib/kcomedilib_main.c
index 0320a0ce74e9..98ddbb61ac01 100644
--- a/drivers/staging/comedi/kcomedilib/kcomedilib_main.c
+++ b/drivers/staging/comedi/kcomedilib/kcomedilib_main.c
@@ -45,7 +45,7 @@ MODULE_LICENSE("GPL");
void *comedi_open(const char *filename)
{
struct comedi_device_file_info *dev_file_info;
- comedi_device *dev;
+ struct comedi_device *dev;
unsigned int minor;
if (strncmp(filename, "/dev/comedi", 11) != 0)
@@ -73,7 +73,7 @@ void *comedi_open(const char *filename)
void *comedi_open_old(unsigned int minor)
{
struct comedi_device_file_info *dev_file_info;
- comedi_device *dev;
+ struct comedi_device *dev;
if (minor >= COMEDI_NUM_MINORS)
return NULL;
@@ -91,7 +91,7 @@ void *comedi_open_old(unsigned int minor)
int comedi_close(void *d)
{
- comedi_device *dev = (comedi_device *) d;
+ struct comedi_device *dev = (struct comedi_device *) d;
module_put(dev->driver->module);
@@ -115,7 +115,7 @@ char *comedi_strerror(int err)
int comedi_fileno(void *d)
{
- comedi_device *dev = (comedi_device *) d;
+ struct comedi_device *dev = (struct comedi_device *) d;
/* return something random */
return dev->minor;
@@ -123,7 +123,7 @@ int comedi_fileno(void *d)
int comedi_command(void *d, comedi_cmd *cmd)
{
- comedi_device *dev = (comedi_device *) d;
+ struct comedi_device *dev = (struct comedi_device *) d;
comedi_subdevice *s;
comedi_async *async;
unsigned runflags;
@@ -163,7 +163,7 @@ int comedi_command(void *d, comedi_cmd *cmd)
int comedi_command_test(void *d, comedi_cmd *cmd)
{
- comedi_device *dev = (comedi_device *) d;
+ struct comedi_device *dev = (struct comedi_device *) d;
comedi_subdevice *s;
if (cmd->subdev >= dev->n_subdevices)
@@ -185,7 +185,7 @@ int comedi_command_test(void *d, comedi_cmd *cmd)
*/
int comedi_do_insn(void *d, comedi_insn *insn)
{
- comedi_device *dev = (comedi_device *) d;
+ struct comedi_device *dev = (struct comedi_device *) d;
comedi_subdevice *s;
int ret = 0;
@@ -326,7 +326,7 @@ int comedi_do_insn(void *d, comedi_insn *insn)
*/
int comedi_lock(void *d, unsigned int subdevice)
{
- comedi_device *dev = (comedi_device *) d;
+ struct comedi_device *dev = (struct comedi_device *) d;
comedi_subdevice *s;
unsigned long flags;
int ret = 0;
@@ -369,7 +369,7 @@ int comedi_lock(void *d, unsigned int subdevice)
*/
int comedi_unlock(void *d, unsigned int subdevice)
{
- comedi_device *dev = (comedi_device *) d;
+ struct comedi_device *dev = (struct comedi_device *) d;
comedi_subdevice *s;
unsigned long flags;
comedi_async *async;
@@ -421,7 +421,7 @@ int comedi_unlock(void *d, unsigned int subdevice)
*/
int comedi_cancel(void *d, unsigned int subdevice)
{
- comedi_device *dev = (comedi_device *) d;
+ struct comedi_device *dev = (struct comedi_device *) d;
comedi_subdevice *s;
int ret = 0;
@@ -467,7 +467,7 @@ int comedi_cancel(void *d, unsigned int subdevice)
int comedi_register_callback(void *d, unsigned int subdevice,
unsigned int mask, int (*cb) (unsigned int, void *), void *arg)
{
- comedi_device *dev = (comedi_device *) d;
+ struct comedi_device *dev = (struct comedi_device *) d;
comedi_subdevice *s;
comedi_async *async;
@@ -503,7 +503,7 @@ int comedi_register_callback(void *d, unsigned int subdevice,
int comedi_poll(void *d, unsigned int subdevice)
{
- comedi_device *dev = (comedi_device *) d;
+ struct comedi_device *dev = (struct comedi_device *) d;
comedi_subdevice *s = dev->subdevices;
comedi_async *async;
@@ -530,7 +530,7 @@ int comedi_poll(void *d, unsigned int subdevice)
/* WARNING: not portable */
int comedi_map(void *d, unsigned int subdevice, void *ptr)
{
- comedi_device *dev = (comedi_device *) d;
+ struct comedi_device *dev = (struct comedi_device *) d;
comedi_subdevice *s;
if (subdevice >= dev->n_subdevices)
@@ -552,7 +552,7 @@ int comedi_map(void *d, unsigned int subdevice, void *ptr)
/* WARNING: not portable */
int comedi_unmap(void *d, unsigned int subdevice)
{
- comedi_device *dev = (comedi_device *) d;
+ struct comedi_device *dev = (struct comedi_device *) d;
comedi_subdevice *s;
if (subdevice >= dev->n_subdevices)
diff --git a/drivers/staging/comedi/proc.c b/drivers/staging/comedi/proc.c
index 6a1efa86ae97..bb208f852a00 100644
--- a/drivers/staging/comedi/proc.c
+++ b/drivers/staging/comedi/proc.c
@@ -53,7 +53,7 @@ int comedi_read_procmem(char *buf, char **start, off_t offset, int len,
for (i = 0; i < COMEDI_NUM_BOARD_MINORS; i++) {
struct comedi_device_file_info *dev_file_info = comedi_get_device_file_info(i);
- comedi_device *dev;
+ struct comedi_device *dev;
if (dev_file_info == NULL)
continue;
diff --git a/drivers/staging/comedi/range.c b/drivers/staging/comedi/range.c
index e54be6182eea..7e069fd2ba5c 100644
--- a/drivers/staging/comedi/range.c
+++ b/drivers/staging/comedi/range.c
@@ -44,7 +44,7 @@ const comedi_lrange range_unknown = { 1, {{0, 1000000, UNIT_none}} };
writes:
n comedi_krange structures to rangeinfo->range_ptr
*/
-int do_rangeinfo_ioctl(comedi_device *dev, comedi_rangeinfo *arg)
+int do_rangeinfo_ioctl(struct comedi_device *dev, comedi_rangeinfo *arg)
{
comedi_rangeinfo it;
int subd, chan;
diff --git a/drivers/staging/comedi/rt.c b/drivers/staging/comedi/rt.c
index fa99d6942b45..e9f5777595ab 100644
--- a/drivers/staging/comedi/rt.c
+++ b/drivers/staging/comedi/rt.c
@@ -57,7 +57,7 @@ struct comedi_irq_struct {
irqreturn_t(*handler) (int irq, void *dev_id PT_REGS_ARG);
unsigned long flags;
const char *device;
- comedi_device *dev_id;
+ struct comedi_device *dev_id;
};
static int comedi_rt_get_irq(struct comedi_irq_struct *it);
@@ -67,7 +67,7 @@ static struct comedi_irq_struct *comedi_irqs[NR_IRQS];
int comedi_request_irq(unsigned irq, irqreturn_t(*handler) (int,
void *PT_REGS_ARG), unsigned long flags, const char *device,
- comedi_device *dev_id)
+ struct comedi_device *dev_id)
{
struct comedi_irq_struct *it;
int ret;
@@ -102,7 +102,7 @@ int comedi_request_irq(unsigned irq, irqreturn_t(*handler) (int,
return 0;
}
-void comedi_free_irq(unsigned int irq, comedi_device *dev_id)
+void comedi_free_irq(unsigned int irq, struct comedi_device *dev_id)
{
struct comedi_irq_struct *it;
@@ -121,7 +121,7 @@ void comedi_free_irq(unsigned int irq, comedi_device *dev_id)
comedi_irqs[irq] = NULL;
}
-int comedi_switch_to_rt(comedi_device *dev)
+int comedi_switch_to_rt(struct comedi_device *dev)
{
struct comedi_irq_struct *it;
unsigned long flags;
@@ -145,7 +145,7 @@ int comedi_switch_to_rt(comedi_device *dev)
return 0;
}
-void comedi_switch_to_non_rt(comedi_device *dev)
+void comedi_switch_to_non_rt(struct comedi_device *dev)
{
struct comedi_irq_struct *it;
unsigned long flags;