Changeset 1e70157 in mainline for uspace/drv/uhci-hcd/endpoint.c
- Timestamp:
- 2011-04-06T19:52:17Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8dc762e0
- Parents:
- fb8927d
- File:
-
- 1 edited
-
uspace/drv/uhci-hcd/endpoint.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-hcd/endpoint.c
rfb8927d r1e70157 34 34 */ 35 35 36 #include <errno.h> 37 36 38 #include "endpoint.h" 39 #include "utils/malloc32.h" 37 40 38 voidendpoint_init(endpoint_t *instance, usb_transfer_type_t transfer_type,41 int endpoint_init(endpoint_t *instance, usb_transfer_type_t transfer_type, 39 42 usb_speed_t speed, size_t max_packet_size) 40 43 { … … 45 48 instance->max_packet_size = max_packet_size; 46 49 instance->toggle = 0; 50 instance->qh = malloc32(sizeof(qh_t)); 51 if (instance->qh == NULL) 52 return ENOMEM; 53 return EOK; 47 54 } 48 55 /*----------------------------------------------------------------------------*/ 49 void endpoint_destroy(void * instance)56 void endpoint_destroy(void *ep) 50 57 { 58 endpoint_t *instance = ep; 51 59 assert(instance); 60 list_remove(&instance->same_device_eps); 61 free32(instance->qh); 52 62 free(instance); 63 } 64 /*----------------------------------------------------------------------------*/ 65 void endpoint_toggle_reset(link_t *ep) 66 { 67 endpoint_t *instance = 68 list_get_instance(ep, endpoint_t, same_device_eps); 69 assert(instance); 70 instance->toggle = 0; 53 71 } 54 72 /**
Note:
See TracChangeset
for help on using the changeset viewer.
