Changeset e6edc8d1 in mainline for uspace/drv/bus/usb/uhcirh/main.c
- Timestamp:
- 2013-07-11T19:13:37Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 67632f7
- Parents:
- 52ff62d3 (diff), 2b3e8840 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/uhcirh/main.c
r52ff62d3 re6edc8d1 93 93 size_t io_size = 0; 94 94 uhci_root_hub_t *rh = NULL; 95 int r et = EOK;95 int rc; 96 96 97 #define CHECK_RET_FREE_RH_RETURN(ret, message...) \ 98 if (ret != EOK) { \ 99 usb_log_error(message); \ 100 return ret; \ 101 } else (void)0 97 rc = hc_get_my_registers(device, &io_regs, &io_size); 98 if (rc != EOK) { 99 usb_log_error( "Failed to get registers from HC: %s.\n", 100 str_error(rc)); 101 return rc; 102 } 102 103 103 ret = hc_get_my_registers(device, &io_regs, &io_size);104 CHECK_RET_FREE_RH_RETURN(ret,105 "Failed to get registers from HC: %s.\n", str_error(ret));106 104 usb_log_debug("I/O regs at %p (size %zuB).\n", 107 105 (void *) io_regs, io_size); 108 106 109 107 rh = ddf_dev_data_alloc(device, sizeof(uhci_root_hub_t)); 110 ret = (rh == NULL) ? ENOMEM : EOK; 111 CHECK_RET_FREE_RH_RETURN(ret, 112 "Failed to allocate rh driver instance.\n"); 108 if (rh == NULL) { 109 usb_log_error("Failed to allocate rh driver instance.\n"); 110 return ENOMEM; 111 } 113 112 114 ret = uhci_root_hub_init(rh, (void*)io_regs, io_size, device); 115 CHECK_RET_FREE_RH_RETURN(ret, 116 "Failed(%d) to initialize rh driver instance: %s.\n", 117 ret, str_error(ret)); 113 rc = uhci_root_hub_init(rh, (void*)io_regs, io_size, device); 114 if (rc != EOK) { 115 usb_log_error("Failed(%d) to initialize rh driver instance: " 116 "%s.\n", rc, str_error(rc)); 117 return rc; 118 } 118 119 119 120 usb_log_info("Controlling root hub '%s' (%" PRIun ").\n", 120 121 ddf_dev_get_name(device), ddf_dev_get_handle(device)); 122 121 123 return EOK; 122 124 }
Note:
See TracChangeset
for help on using the changeset viewer.