diff options
Diffstat (limited to 'drivers/staging/comedi')
-rw-r--r-- | drivers/staging/comedi/comedi.h | 3 | ||||
-rw-r--r-- | drivers/staging/comedi/comedidev.h | 2 | ||||
-rw-r--r-- | drivers/staging/comedi/comedilib.h | 4 | ||||
-rw-r--r-- | drivers/staging/comedi/drivers/cb_pcidas64.c | 2 | ||||
-rw-r--r-- | drivers/staging/comedi/drivers/comedi_test.c | 4 | ||||
-rw-r--r-- | drivers/staging/comedi/drivers/das16.c | 6 | ||||
-rw-r--r-- | drivers/staging/comedi/drivers/jr3_pci.c | 2 | ||||
-rw-r--r-- | drivers/staging/comedi/drivers/ni_mio_common.c | 2 | ||||
-rw-r--r-- | drivers/staging/comedi/drivers/serial2002.c | 2 | ||||
-rw-r--r-- | drivers/staging/comedi/kcomedilib/get.c | 4 | ||||
-rw-r--r-- | drivers/staging/comedi/range.c | 4 |
11 files changed, 17 insertions, 18 deletions
diff --git a/drivers/staging/comedi/comedi.h b/drivers/staging/comedi/comedi.h index 82298faac2c..079cb6e80c7 100644 --- a/drivers/staging/comedi/comedi.h +++ b/drivers/staging/comedi/comedi.h @@ -310,7 +310,6 @@ enum comedi_support_level { /* structures */ -typedef struct comedi_krange_struct comedi_krange; typedef struct comedi_bufconfig_struct comedi_bufconfig; typedef struct comedi_bufinfo_struct comedi_bufinfo; @@ -382,7 +381,7 @@ struct comedi_rangeinfo { void *range_ptr; }; -struct comedi_krange_struct { +struct comedi_krange { int min; /* fixed point, multiply by 1e-6 */ int max; /* fixed point, multiply by 1e-6 */ unsigned int flags; diff --git a/drivers/staging/comedi/comedidev.h b/drivers/staging/comedi/comedidev.h index 15e457a0cd9..ea319360ae6 100644 --- a/drivers/staging/comedi/comedidev.h +++ b/drivers/staging/comedi/comedidev.h @@ -409,7 +409,7 @@ extern const struct comedi_lrange range_unknown; struct comedi_lrange { int length; - comedi_krange range[GCC_ZERO_LENGTH_ARRAY]; + struct comedi_krange range[GCC_ZERO_LENGTH_ARRAY]; }; /* some silly little inline functions */ diff --git a/drivers/staging/comedi/comedilib.h b/drivers/staging/comedi/comedilib.h index f27ef837c3d..c2729312d57 100644 --- a/drivers/staging/comedi/comedilib.h +++ b/drivers/staging/comedi/comedilib.h @@ -103,7 +103,7 @@ int comedi_get_rangetype(void *dev, unsigned int subdevice, unsigned int comedi_get_subdevice_flags(void *dev, unsigned int subdevice); int comedi_get_len_chanlist(void *dev, unsigned int subdevice); int comedi_get_krange(void *dev, unsigned int subdevice, unsigned int - chan, unsigned int range, comedi_krange *krange); + chan, unsigned int range, struct comedi_krange *krange); unsigned int comedi_get_buf_head_pos(void *dev, unsigned int subdevice); int comedi_set_user_int_count(void *dev, unsigned int subdevice, unsigned int buf_user_count); @@ -177,7 +177,7 @@ unsigned int comedi_get_subdevice_flags(unsigned int minor, unsigned int subdevice); int comedi_get_len_chanlist(unsigned int minor, unsigned int subdevice); int comedi_get_krange(unsigned int minor, unsigned int subdevice, unsigned int - chan, unsigned int range, comedi_krange *krange); + chan, unsigned int range, struct comedi_krange *krange); unsigned int comedi_get_buf_head_pos(unsigned int minor, unsigned int subdevice); int comedi_set_user_int_count(unsigned int minor, unsigned int subdevice, diff --git a/drivers/staging/comedi/drivers/cb_pcidas64.c b/drivers/staging/comedi/drivers/cb_pcidas64.c index b6fc5c11970..707e3ccc9d7 100644 --- a/drivers/staging/comedi/drivers/cb_pcidas64.c +++ b/drivers/staging/comedi/drivers/cb_pcidas64.c @@ -1203,7 +1203,7 @@ COMEDI_PCI_INITCLEANUP(driver_cb_pcidas, pcidas64_pci_table); static unsigned int ai_range_bits_6xxx(const struct comedi_device * dev, unsigned int range_index) { - const comedi_krange *range = + const struct comedi_krange *range = &board(dev)->ai_range_table->range[range_index]; unsigned int bits = 0; diff --git a/drivers/staging/comedi/drivers/comedi_test.c b/drivers/staging/comedi/drivers/comedi_test.c index a31817b1262..e679328a4f8 100644 --- a/drivers/staging/comedi/drivers/comedi_test.c +++ b/drivers/staging/comedi/drivers/comedi_test.c @@ -442,7 +442,7 @@ static short fake_sawtooth(struct comedi_device *dev, unsigned int range_index, struct comedi_subdevice *s = dev->read_subdev; unsigned int offset = s->maxdata / 2; u64 value; - const comedi_krange *krange = &s->range_table->range[range_index]; + const struct comedi_krange *krange = &s->range_table->range[range_index]; u64 binary_amplitude; binary_amplitude = s->maxdata; @@ -463,7 +463,7 @@ static short fake_squarewave(struct comedi_device *dev, unsigned int range_index struct comedi_subdevice *s = dev->read_subdev; unsigned int offset = s->maxdata / 2; u64 value; - const comedi_krange *krange = &s->range_table->range[range_index]; + const struct comedi_krange *krange = &s->range_table->range[range_index]; current_time %= devpriv->usec_period; value = s->maxdata; diff --git a/drivers/staging/comedi/drivers/das16.c b/drivers/staging/comedi/drivers/das16.c index b959ba8e29f..0219c32e853 100644 --- a/drivers/staging/comedi/drivers/das16.c +++ b/drivers/staging/comedi/drivers/das16.c @@ -1375,7 +1375,7 @@ static int das16_attach(struct comedi_device * dev, struct comedi_devconfig * it unsigned int dma_chan; int timer_mode; unsigned long flags; - comedi_krange *user_ai_range, *user_ao_range; + struct comedi_krange *user_ai_range, *user_ao_range; iobase = it->options[0]; #if 0 @@ -1496,7 +1496,7 @@ static int das16_attach(struct comedi_device * dev, struct comedi_devconfig * it (it->options[4] || it->options[5])) { // allocate single-range range table devpriv->user_ai_range_table = - kmalloc(sizeof(struct comedi_lrange) + sizeof(comedi_krange), + kmalloc(sizeof(struct comedi_lrange) + sizeof(struct comedi_krange), GFP_KERNEL); // initialize ai range devpriv->user_ai_range_table->length = 1; @@ -1509,7 +1509,7 @@ static int das16_attach(struct comedi_device * dev, struct comedi_devconfig * it if (it->options[6] || it->options[7]) { // allocate single-range range table devpriv->user_ao_range_table = - kmalloc(sizeof(struct comedi_lrange) + sizeof(comedi_krange), + kmalloc(sizeof(struct comedi_lrange) + sizeof(struct comedi_krange), GFP_KERNEL); // initialize ao range devpriv->user_ao_range_table->length = 1; diff --git a/drivers/staging/comedi/drivers/jr3_pci.c b/drivers/staging/comedi/drivers/jr3_pci.c index 8f481b54564..bb0e499d8b8 100644 --- a/drivers/staging/comedi/drivers/jr3_pci.c +++ b/drivers/staging/comedi/drivers/jr3_pci.c @@ -156,7 +156,7 @@ typedef struct { int model_no; struct { int length; - comedi_krange range; + struct comedi_krange range; } range[9]; const struct comedi_lrange *range_table_list[8 * 7 + 2]; unsigned int maxdata_list[8 * 7 + 2]; diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c b/drivers/staging/comedi/drivers/ni_mio_common.c index ce8c704565d..542bd0dcd44 100644 --- a/drivers/staging/comedi/drivers/ni_mio_common.c +++ b/drivers/staging/comedi/drivers/ni_mio_common.c @@ -2818,7 +2818,7 @@ static int ni_m_series_ao_config_chanlist(struct comedi_device * dev, } } for (i = 0; i < n_chans; i++) { - const comedi_krange *krange; + const struct comedi_krange *krange; chan = CR_CHAN(chanspec[i]); range = CR_RANGE(chanspec[i]); krange = s->range_table->range + range; diff --git a/drivers/staging/comedi/drivers/serial2002.c b/drivers/staging/comedi/drivers/serial2002.c index ca41baa3764..96430d2955b 100644 --- a/drivers/staging/comedi/drivers/serial2002.c +++ b/drivers/staging/comedi/drivers/serial2002.c @@ -63,7 +63,7 @@ static const serial2002_board serial2002_boards[] = { typedef struct { // HACK... int length; - comedi_krange range; + struct comedi_krange range; } serial2002_range_table_t; typedef struct { diff --git a/drivers/staging/comedi/kcomedilib/get.c b/drivers/staging/comedi/kcomedilib/get.c index a7d4ff63844..b6b726a69f1 100644 --- a/drivers/staging/comedi/kcomedilib/get.c +++ b/drivers/staging/comedi/kcomedilib/get.c @@ -149,7 +149,7 @@ int comedi_get_n_ranges(void *d, unsigned int subdevice, unsigned int chan) * ALPHA (non-portable) */ int comedi_get_krange(void *d, unsigned int subdevice, unsigned int chan, - unsigned int range, comedi_krange *krange) + unsigned int range, struct comedi_krange *krange) { struct comedi_device *dev = (struct comedi_device *) d; struct comedi_subdevice *s = dev->subdevices + subdevice; @@ -163,7 +163,7 @@ int comedi_get_krange(void *d, unsigned int subdevice, unsigned int chan, if (range >= lr->length) return -EINVAL; - memcpy(krange, lr->range + range, sizeof(comedi_krange)); + memcpy(krange, lr->range + range, sizeof(struct comedi_krange)); return 0; } diff --git a/drivers/staging/comedi/range.c b/drivers/staging/comedi/range.c index 3778873cd5e..ac200d929f3 100644 --- a/drivers/staging/comedi/range.c +++ b/drivers/staging/comedi/range.c @@ -42,7 +42,7 @@ const struct comedi_lrange range_unknown = { 1, {{0, 1000000, UNIT_none}} }; range info structure writes: - n comedi_krange structures to rangeinfo->range_ptr + n struct comedi_krange structures to rangeinfo->range_ptr */ int do_rangeinfo_ioctl(struct comedi_device *dev, struct comedi_rangeinfo *arg) { @@ -78,7 +78,7 @@ int do_rangeinfo_ioctl(struct comedi_device *dev, struct comedi_rangeinfo *arg) } if (copy_to_user(it.range_ptr, lr->range, - sizeof(comedi_krange) * lr->length)) + sizeof(struct comedi_krange) * lr->length)) return -EFAULT; return 0; |