Changeset 9c986d3 in mainline
- Timestamp:
- 2011-12-09T22:08:25Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8f5b4d44
- Parents:
- 89128f3
- Location:
- uspace/drv/bus/usb/ohci
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ohci/hc.c
r89128f3 r9c986d3 148 148 return ret; \ 149 149 } else (void)0 150 150 151 ret = usb_endpoint_manager_add_ep( 151 152 &instance->generic.ep_manager, instance->rh.address, 0, -
uspace/drv/bus/usb/ohci/ohci.c
r89128f3 r9c986d3 140 140 int device_setup_ohci(ddf_dev_t *device) 141 141 { 142 assert(device); 143 144 ohci_t *instance = malloc(sizeof(ohci_t)); 142 if (device == NULL) 143 return EBADMEM; 144 145 ohci_t *instance = ddf_dev_data_alloc(device,sizeof(ohci_t)); 145 146 if (instance == NULL) { 146 147 usb_log_error("Failed to allocate OHCI driver.\n"); 147 148 return ENOMEM; 148 149 } 149 instance->rh_fun = NULL;150 instance->hc_fun = NULL;151 150 152 151 #define CHECK_RET_DEST_FREE_RETURN(ret, message...) \ 153 152 if (ret != EOK) { \ 154 153 if (instance->hc_fun) { \ 154 instance->hc_fun->driver_data = NULL; \ 155 155 ddf_fun_destroy(instance->hc_fun); \ 156 156 } \ 157 157 if (instance->rh_fun) { \ 158 instance->rh_fun->driver_data = NULL; \ 158 159 ddf_fun_destroy(instance->rh_fun); \ 159 160 } \ 160 free(instance); \161 161 usb_log_error(message); \ 162 162 return ret; \ … … 219 219 "Failed to init ohci_hcd: %s.\n", str_error(ret)); 220 220 221 device->driver_data = instance;222 223 221 #define CHECK_RET_FINI_RETURN(ret, message...) \ 224 222 if (ret != EOK) { \
Note:
See TracChangeset
for help on using the changeset viewer.