Lines Matching defs:data
53 * struct comedi_file - Per-file private data for COMEDI device
698 * comedi_set_spriv_auto_free() - Mark subdevice private data as freeable
701 * Mark the subdevice as having a pointer to private data that can be
712 * comedi_alloc_spriv - Allocate memory for the subdevice private data
716 * Allocate memory for the subdevice private data and point @s->private
1186 unsigned int *data)
1191 switch (data[0]) {
1248 pr_warn("No check for data length of config insn id %i is implemented\n",
1249 data[0]);
1258 unsigned int *data)
1263 switch (data[0]) {
1289 * @data: data from user insn call. The length of the data must be >= 2.
1290 * data[0] must contain the INSN_DEVICE_CONFIG config_id.
1291 * data[1](input) contains the number of _pairs_ for which memory is
1294 * data[1](output) returns either the number of pairs available (if none
1297 * data[2::2] returns each (source, destination) pair.
1302 static int get_valid_routes(struct comedi_device *dev, unsigned int *data)
1305 data[1] = dev->get_valid_routes(dev, data[1], data + 2);
1310 unsigned int *data, void *file)
1331 /* unsigned data safe until 2106 */
1332 data[0] = (unsigned int)tv.tv_sec;
1333 data[1] = tv.tv_nsec / NSEC_PER_USEC;
1339 if (insn->n != 1 || data[0] >= 100000) {
1343 udelay(data[0] / 1000);
1369 ret = s->async->inttrig(dev, s, data[0]);
1374 ret = check_insn_device_config_length(insn, data);
1378 if (data[0] == INSN_DEVICE_CONFIG_GET_ROUTES) {
1380 * data[1] should be the number of _pairs_ that
1383 data[1] = (insn->n - 2) / 2;
1384 ret = get_valid_routes(dev, data);
1389 ret = dev->insn_device_config(dev, insn, data);
1437 ret = s->insn_read(dev, s, insn, data);
1449 if (data[i] > maxdata) {
1452 "bad data value(s)\n");
1457 ret = s->insn_write(dev, s, insn, data);
1474 unsigned int orig_mask = data[0];
1481 data[0] <<= shift;
1482 data[1] <<= shift;
1485 ret = s->insn_bits(dev, s, insn, data);
1486 data[0] = orig_mask;
1488 data[1] >>= shift;
1492 ret = check_insn_config_length(insn, data);
1495 ret = s->insn_config(dev, s, insn, data);
1519 * data (for writes) from insns[].data pointers
1522 * data (for reads) to insns[].data pointers
1532 unsigned int *data = NULL;
1550 /* Allocate scratch space for all instruction data. */
1551 data = kmalloc_array(max_n_data_required, sizeof(unsigned int),
1553 if (!data) {
1560 if (copy_from_user(data, insns[i].data,
1568 ret = parse_insn(dev, insns + i, data, file);
1572 if (copy_to_user(insns[i].data, data,
1585 kfree(data);
1601 * data (for writes) from insn->data pointer
1604 * data (for reads) to insn->data pointer
1609 unsigned int *data = NULL;
1623 data = kmalloc_array(n_data, sizeof(unsigned int), GFP_KERNEL);
1624 if (!data) {
1630 if (copy_from_user(data,
1631 insn->data,
1637 ret = parse_insn(dev, insn, data, file);
1641 if (copy_to_user(insn->data,
1642 data,
1651 kfree(data);
1789 async->cmd.data = NULL;
1803 cmd->data = NULL;
2880 compat_uptr_t data; /* 32-bit 'short *' */
2887 compat_uptr_t data; /* 32-bit 'unsigned int *' */
2966 cmd->data = compat_ptr(v32.data);
2993 v32.data = ptr_to_compat(cmd->data);
3061 insn->data = compat_ptr(v32.data);