/* structures */
-typedef struct comedi_krange_struct comedi_krange;
typedef struct comedi_bufconfig_struct comedi_bufconfig;
typedef struct comedi_bufinfo_struct comedi_bufinfo;
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;
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 */
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);
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,
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;
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;
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;
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
(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;
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;
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];
}
}
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;
typedef struct {
// HACK...
int length;
- comedi_krange range;
+ struct comedi_krange range;
} serial2002_range_table_t;
typedef struct {
* 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;
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;
}
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)
{
}
if (copy_to_user(it.range_ptr, lr->range,
- sizeof(comedi_krange) * lr->length))
+ sizeof(struct comedi_krange) * lr->length))
return -EFAULT;
return 0;