fix potential bug when insert new queue head to list

This commit is contained in:
hathach
2013-03-24 22:24:27 +07:00
parent 62f5ec8a0f
commit b15694bc5f
3 changed files with 4 additions and 5 deletions

View File

@@ -755,8 +755,7 @@ static void qtd_init(ehci_qtd_t* p_qtd, uint32_t data_ptr, uint16_t total_bytes)
static inline void list_insert(ehci_link_t *current, ehci_link_t *new, uint8_t new_type)
{
new->address = current->address;
current->address = (uint32_t) new;
current->type = new_type;
current->address = ((uint32_t) new) | (new_type << 1);
}
static ehci_qhd_t* list_find_previous_qhd(ehci_qhd_t* p_head, ehci_qhd_t* p_qhd)