Changeset 6340a6ff in mainline
- Timestamp:
- 2013-08-07T08:50:54Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- cb8ede1
- Parents:
- e0d8b740
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ohci/hc.c
re0d8b740 r6340a6ff 147 147 assert(instance); 148 148 149 #define CHECK_RET_RETURN(ret, message...) \150 if (ret != EOK) { \151 usb_log_error(message); \152 return ret; \153 } else (void)0154 155 149 int ret = 156 150 pio_enable((void*)regs, reg_size, (void**)&instance->registers); 157 CHECK_RET_RETURN(ret, 158 "Failed to gain access to device registers: %s.\n", str_error(ret)); 151 if (ret != EOK) { 152 usb_log_error("Failed to enable access to device regss: %s.\n", 153 str_error(ret)); 154 return ret; 155 } 159 156 160 157 list_initialize(&instance->pending_batches); 158 fibril_mutex_initialize(&instance->guard); 161 159 162 160 ret = hc_init_memory(instance); 163 CHECK_RET_RETURN(ret, "Failed to create OHCI memory structures: %s.\n",164 str_error(ret));165 #undef CHECK_RET_RETURN 166 167 fibril_mutex_initialize(&instance->guard);161 if (ret != EOK) { 162 usb_log_error("Failed to create OHCI memory structures: %s.\n", 163 str_error(ret)); 164 return ret; 165 } 168 166 169 167 hc_gain_control(instance); … … 501 499 do { \ 502 500 const char *name = usb_str_transfer_type(type); \ 503 int ret = endpoint_list_init(&instance->lists[type], name); \501 const int ret = endpoint_list_init(&instance->lists[type], name); \ 504 502 if (ret != EOK) { \ 505 503 usb_log_error("Failed to setup %s endpoint list: %s.\n", \
Note:
See TracChangeset
for help on using the changeset viewer.