Lines Matching defs:tx_data
120 static struct tx_data_struct *tx_data;
366 for (base = 0, lim = tx_data->num_code_sets; lim; lim >>= 1) {
368 data = tx_data->code_sets[pos];
370 if (!read_uint32(&data, tx_data->endp, &i))
385 endp = pos < tx_data->num_code_sets - 1 ?
386 tx_data->code_sets[pos + 1] : tx_data->endp;
405 if (tx_data->fixed[i] == -1) {
409 buf[i] = (unsigned char)tx_data->fixed[i];
490 ret = send_data_block(ir, tx_data->boot_data);
527 if (tx_data) {
528 if (tx_data->code_sets)
529 vfree(tx_data->code_sets);
531 if (tx_data->datap)
532 vfree(tx_data->datap);
534 vfree(tx_data);
535 tx_data = NULL;
558 if (tx_data) {
574 tx_data = vmalloc(sizeof(*tx_data));
575 if (tx_data == NULL) {
581 tx_data->code_sets = NULL;
584 tx_data->datap = vmalloc(fw_entry->size);
585 if (tx_data->datap == NULL) {
588 vfree(tx_data);
592 memcpy(tx_data->datap, fw_entry->data, fw_entry->size);
593 tx_data->endp = tx_data->datap + fw_entry->size;
597 data = tx_data->datap;
598 if (!read_uint8(&data, tx_data->endp, &version))
610 tx_data->boot_data = data;
611 if (!skip(&data, tx_data->endp, TX_BLOCK_SIZE))
614 if (!read_uint32(&data, tx_data->endp,
615 &tx_data->num_code_sets))
618 dprintk("%u IR blaster codesets loaded\n", tx_data->num_code_sets);
620 tx_data->code_sets = vmalloc(
621 tx_data->num_code_sets * sizeof(char *));
622 if (tx_data->code_sets == NULL) {
629 tx_data->fixed[i] = -1;
632 if (!read_uint8(&data, tx_data->endp, &num_global_fixed) ||
637 if (!read_uint8(&data, tx_data->endp, &pos) ||
638 !read_uint8(&data, tx_data->endp, &val) ||
641 tx_data->fixed[pos] = (int)val;
645 for (i = 0; i < tx_data->num_code_sets; ++i) {
651 tx_data->code_sets[i] = data;
654 if (!read_uint32(&data, tx_data->endp, &id) ||
655 !read_uint8(&data, tx_data->endp, &keys) ||
656 !read_uint8(&data, tx_data->endp, &ndiffs) ||
661 if (!skip(&data, tx_data->endp, ndiffs))
668 if (!skip(&data, tx_data->endp,
673 if (!skip(&data, tx_data->endp,