Lines Matching refs:desc

269 static void vidtv_psi_desc_chain(struct vidtv_psi_desc *head, struct vidtv_psi_desc *desc)  in vidtv_psi_desc_chain()  argument
275 head->next = desc; in vidtv_psi_desc_chain()
284 struct vidtv_psi_desc_service *desc; in vidtv_psi_service_desc_init() local
288 desc = kzalloc(sizeof(*desc), GFP_KERNEL); in vidtv_psi_service_desc_init()
289 if (!desc) in vidtv_psi_service_desc_init()
292 desc->type = SERVICE_DESCRIPTOR; in vidtv_psi_service_desc_init()
294 desc->length = sizeof_field(struct vidtv_psi_desc_service, service_type) in vidtv_psi_service_desc_init()
300 desc->service_type = service_type; in vidtv_psi_service_desc_init()
302 desc->service_name_len = service_name_len; in vidtv_psi_service_desc_init()
305 desc->service_name = kstrdup(service_name, GFP_KERNEL); in vidtv_psi_service_desc_init()
306 if (!desc->service_name) in vidtv_psi_service_desc_init()
310 desc->provider_name_len = provider_name_len; in vidtv_psi_service_desc_init()
313 desc->provider_name = kstrdup(provider_name, GFP_KERNEL); in vidtv_psi_service_desc_init()
314 if (!desc->provider_name) in vidtv_psi_service_desc_init()
318 vidtv_psi_desc_chain(head, (struct vidtv_psi_desc *)desc); in vidtv_psi_service_desc_init()
319 return desc; in vidtv_psi_service_desc_init()
323 kfree(desc->service_name); in vidtv_psi_service_desc_init()
325 kfree(desc); in vidtv_psi_service_desc_init()
335 struct vidtv_psi_desc_registration *desc; in vidtv_psi_registration_desc_init() local
337 desc = kzalloc(sizeof(*desc) + sizeof(format_id) + additional_info_len, GFP_KERNEL); in vidtv_psi_registration_desc_init()
338 if (!desc) in vidtv_psi_registration_desc_init()
341 desc->type = REGISTRATION_DESCRIPTOR; in vidtv_psi_registration_desc_init()
343 desc->length = sizeof_field(struct vidtv_psi_desc_registration, format_id) in vidtv_psi_registration_desc_init()
346 desc->format_id = format_id; in vidtv_psi_registration_desc_init()
349 memcpy(desc->additional_identification_info, in vidtv_psi_registration_desc_init()
353 vidtv_psi_desc_chain(head, (struct vidtv_psi_desc *)desc); in vidtv_psi_registration_desc_init()
354 return desc; in vidtv_psi_registration_desc_init()
361 struct vidtv_psi_desc_network_name *desc; in vidtv_psi_network_name_desc_init() local
363 desc = kzalloc(sizeof(*desc), GFP_KERNEL); in vidtv_psi_network_name_desc_init()
364 if (!desc) in vidtv_psi_network_name_desc_init()
367 desc->type = NETWORK_NAME_DESCRIPTOR; in vidtv_psi_network_name_desc_init()
369 desc->length = network_name_len; in vidtv_psi_network_name_desc_init()
372 desc->network_name = kstrdup(network_name, GFP_KERNEL); in vidtv_psi_network_name_desc_init()
373 if (!desc->network_name) { in vidtv_psi_network_name_desc_init()
374 kfree(desc); in vidtv_psi_network_name_desc_init()
379 vidtv_psi_desc_chain(head, (struct vidtv_psi_desc *)desc); in vidtv_psi_network_name_desc_init()
380 return desc; in vidtv_psi_network_name_desc_init()
390 struct vidtv_psi_desc_service_list *desc; in vidtv_psi_service_list_desc_init() local
393 desc = kzalloc(sizeof(*desc), GFP_KERNEL); in vidtv_psi_service_list_desc_init()
394 if (!desc) in vidtv_psi_service_list_desc_init()
397 desc->type = SERVICE_LIST_DESCRIPTOR; in vidtv_psi_service_list_desc_init()
407 kfree(desc); in vidtv_psi_service_list_desc_init()
426 desc->length = length; in vidtv_psi_service_list_desc_init()
427 desc->service_list = head_e; in vidtv_psi_service_list_desc_init()
429 vidtv_psi_desc_chain(head, (struct vidtv_psi_desc *)desc); in vidtv_psi_service_list_desc_init()
430 return desc; in vidtv_psi_service_list_desc_init()
441 struct vidtv_psi_desc_short_event *desc; in vidtv_psi_short_event_desc_init() local
444 desc = kzalloc(sizeof(*desc), GFP_KERNEL); in vidtv_psi_short_event_desc_init()
445 if (!desc) in vidtv_psi_short_event_desc_init()
448 desc->type = SHORT_EVENT_DESCRIPTOR; in vidtv_psi_short_event_desc_init()
450 desc->length = ISO_LANGUAGE_CODE_LEN + in vidtv_psi_short_event_desc_init()
456 desc->event_name_len = event_name_len; in vidtv_psi_short_event_desc_init()
457 desc->text_len = text_len; in vidtv_psi_short_event_desc_init()
462 desc->iso_language_code = kstrdup(iso_language_code, GFP_KERNEL); in vidtv_psi_short_event_desc_init()
463 if (!desc->iso_language_code) in vidtv_psi_short_event_desc_init()
467 desc->event_name = kstrdup(event_name, GFP_KERNEL); in vidtv_psi_short_event_desc_init()
468 if (!desc->event_name) in vidtv_psi_short_event_desc_init()
473 desc->text = kstrdup(text, GFP_KERNEL); in vidtv_psi_short_event_desc_init()
474 if (!desc->text) in vidtv_psi_short_event_desc_init()
478 vidtv_psi_desc_chain(head, (struct vidtv_psi_desc *)desc); in vidtv_psi_short_event_desc_init()
479 return desc; in vidtv_psi_short_event_desc_init()
483 kfree(desc->event_name); in vidtv_psi_short_event_desc_init()
485 kfree(desc->iso_language_code); in vidtv_psi_short_event_desc_init()
487 kfree(desc); in vidtv_psi_short_event_desc_init()
491 struct vidtv_psi_desc *vidtv_psi_desc_clone(struct vidtv_psi_desc *desc) in vidtv_psi_desc_clone() argument
501 while (desc) { in vidtv_psi_desc_clone()
502 switch (desc->type) { in vidtv_psi_desc_clone()
504 service = (struct vidtv_psi_desc_service *)desc; in vidtv_psi_desc_clone()
513 desc_network_name = (struct vidtv_psi_desc_network_name *)desc; in vidtv_psi_desc_clone()
520 desc_service_list = (struct vidtv_psi_desc_service_list *)desc; in vidtv_psi_desc_clone()
527 desc_short_event = (struct vidtv_psi_desc_short_event *)desc; in vidtv_psi_desc_clone()
537 curr = kmemdup(desc, sizeof(*desc) + desc->length, GFP_KERNEL); in vidtv_psi_desc_clone()
552 desc = desc->next; in vidtv_psi_desc_clone()
558 void vidtv_psi_desc_destroy(struct vidtv_psi_desc *desc) in vidtv_psi_desc_destroy() argument
562 struct vidtv_psi_desc *curr = desc; in vidtv_psi_desc_destroy()
609 vidtv_psi_desc_comp_loop_len(struct vidtv_psi_desc *desc) in vidtv_psi_desc_comp_loop_len() argument
613 if (!desc) in vidtv_psi_desc_comp_loop_len()
616 while (desc) { in vidtv_psi_desc_comp_loop_len()
619 length += desc->length; /* from 'length' field until the end of the descriptor */ in vidtv_psi_desc_comp_loop_len()
620 desc = desc->next; in vidtv_psi_desc_comp_loop_len()
627 struct vidtv_psi_desc *desc) in vidtv_psi_desc_assign() argument
629 if (desc == *to) in vidtv_psi_desc_assign()
635 *to = desc; in vidtv_psi_desc_assign()
640 struct vidtv_psi_desc *desc) in vidtv_pmt_desc_assign() argument
642 vidtv_psi_desc_assign(to, desc); in vidtv_pmt_desc_assign()
653 struct vidtv_psi_desc *desc) in vidtv_sdt_desc_assign() argument
655 vidtv_psi_desc_assign(to, desc); in vidtv_sdt_desc_assign()
668 .from = &args->desc->type, in vidtv_psi_desc_write_into()
685 switch (args->desc->type) { in vidtv_psi_desc_write_into()
690 psi_args.from = &((struct vidtv_psi_desc_service *)args->desc)->service_type; in vidtv_psi_desc_write_into()
695 psi_args.len = ((struct vidtv_psi_desc_service *)args->desc)->provider_name_len; in vidtv_psi_desc_write_into()
696 psi_args.from = ((struct vidtv_psi_desc_service *)args->desc)->provider_name; in vidtv_psi_desc_write_into()
702 psi_args.from = &((struct vidtv_psi_desc_service *)args->desc)->service_name_len; in vidtv_psi_desc_write_into()
707 psi_args.len = ((struct vidtv_psi_desc_service *)args->desc)->service_name_len; in vidtv_psi_desc_write_into()
708 psi_args.from = ((struct vidtv_psi_desc_service *)args->desc)->service_name; in vidtv_psi_desc_write_into()
715 psi_args.len = args->desc->length; in vidtv_psi_desc_write_into()
716 psi_args.from = ((struct vidtv_psi_desc_network_name *)args->desc)->network_name; in vidtv_psi_desc_write_into()
722 serv_list_entry = ((struct vidtv_psi_desc_service_list *)args->desc)->service_list; in vidtv_psi_desc_write_into()
739 args->desc)->iso_language_code; in vidtv_psi_desc_write_into()
746 args->desc)->event_name_len; in vidtv_psi_desc_write_into()
751 psi_args.len = ((struct vidtv_psi_desc_short_event *)args->desc)->event_name_len; in vidtv_psi_desc_write_into()
752 psi_args.from = ((struct vidtv_psi_desc_short_event *)args->desc)->event_name; in vidtv_psi_desc_write_into()
758 psi_args.from = &((struct vidtv_psi_desc_short_event *)args->desc)->text_len; in vidtv_psi_desc_write_into()
763 psi_args.len = ((struct vidtv_psi_desc_short_event *)args->desc)->text_len; in vidtv_psi_desc_write_into()
764 psi_args.from = ((struct vidtv_psi_desc_short_event *)args->desc)->text; in vidtv_psi_desc_write_into()
773 psi_args.len = args->desc->length; in vidtv_psi_desc_write_into()
774 psi_args.from = &args->desc->data; in vidtv_psi_desc_write_into()
1217 .desc = table_descriptor, in vidtv_psi_pmt_write_into()
1263 d_args.desc = stream_descriptor; in vidtv_psi_pmt_write_into()
1405 d_args.desc = service_desc; in vidtv_psi_sdt_write_into()
1730 d_args.desc = table_descriptor; in vidtv_psi_nit_write_into()
1761 d_args.desc = transport_descriptor; in vidtv_psi_nit_write_into()
1953 d_args.desc = event_descriptor; in vidtv_psi_eit_write_into()