Changeset 987dda8 in mainline
- Timestamp:
- 2011-01-28T12:20:09Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 45c4f5a
- Parents:
- eb03e92
- Location:
- uspace/drv/uhci
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci/callback.c
reb03e92 r987dda8 3 3 4 4 #include "callback.h" 5 6 7 5 int callback_init(callback_t *instance, device_t *dev, 8 6 void *buffer, size_t size, usbhc_iface_transfer_in_callback_t func_in, -
uspace/drv/uhci/callback.h
reb03e92 r987dda8 64 64 callback_init(instance, dev, buffer, size, func, NULL, arg) 65 65 66 static inline callback_t *callback_get(device_t *dev, 67 void *buffer, size_t size, usbhc_iface_transfer_in_callback_t func_in, 68 usbhc_iface_transfer_out_callback_t func_out, void *arg) 69 { 70 callback_t *instance = malloc(sizeof(callback_t)); 71 if (callback_init(instance, dev, buffer, size, func_in, func_out, arg)) { 72 free(instance); 73 instance = NULL; 74 } 75 return instance; 76 } 77 66 78 static inline void callback_fini(callback_t *instance) 67 79 { … … 69 81 if (instance->new_buffer) 70 82 trans_free(instance->new_buffer); 83 } 84 85 static inline void callback_dispose(callback_t *instance) 86 { 87 callback_fini(instance); 88 free(instance); 71 89 } 72 90
Note:
See TracChangeset
for help on using the changeset viewer.