Lines Matching refs:prev

601 	struct has_preset *tmp, *prev = NULL;  in preset_insert()  local
605 if (prev) { in preset_insert()
606 sys_slist_insert(&preset_list, &prev->node, &preset->node); in preset_insert()
613 prev = tmp; in preset_insert()
664 struct has_preset *prev; in preset_get_tail() local
666 return SYS_SLIST_PEEK_TAIL_CONTAINER(&preset_list, prev, node); in preset_get_tail()
671 struct has_preset *prev; in preset_get_prev() local
673 SYS_SLIST_FOR_EACH_CONTAINER(&preset_list, prev, node) { in preset_get_prev()
674 if (SYS_SLIST_PEEK_NEXT_CONTAINER(prev, node) == preset) { in preset_get_prev()
675 return prev; in preset_get_prev()
679 prev = preset_get_tail(); in preset_get_prev()
680 if (prev == preset) { in preset_get_prev()
684 return prev; in preset_get_prev()
717 const struct has_preset *prev; in preset_get_prev_index() local
719 prev = preset_get_prev(preset); in preset_get_prev_index()
720 if (prev == NULL || prev->index >= preset->index) { in preset_get_prev_index()
724 return prev->index; in preset_get_prev_index()
1045 const struct has_preset *prev; in preset_list_changed_generic_update_tail() local
1063 prev = preset_get_tail(); in preset_list_changed_generic_update_tail()
1065 err = bt_has_cp_generic_update(client, prev ? prev->index : BT_HAS_PRESET_INDEX_NONE, in preset_list_changed_generic_update_tail()
1378 struct has_preset *prev, *tmp; in handle_set_prev_preset() local
1381 prev = preset_get_tail(); in handle_set_prev_preset()
1383 prev = preset_get_prev(active_preset); in handle_set_prev_preset()
1386 tmp = prev; in handle_set_prev_preset()
1388 if (prev == NULL) { in handle_set_prev_preset()
1392 if (is_preset_available(prev)) { in handle_set_prev_preset()
1393 return preset_select(prev, sync); in handle_set_prev_preset()
1396 prev = preset_get_prev(prev); in handle_set_prev_preset()
1397 } while (tmp != prev); in handle_set_prev_preset()