Changeset d09791e6 in mainline for uspace/drv/bus/usb/ohci/ohci.c
- Timestamp:
- 2012-12-20T15:40:23Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a720ff6
- Parents:
- d9b2c73
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ohci/ohci.c
rd9b2c73 rd09791e6 117 117 "Failed to register irq handler: %s.\n", str_error(ret)); 118 118 119 120 119 /* Try to enable interrupts */ 121 120 bool interrupts = false; … … 131 130 } 132 131 133 ret = hcd_setup_device(device); 132 /* Initialize generic HCD driver */ 133 ret = hcd_setup_device(device, NULL); 134 134 if (ret != EOK) { 135 135 unregister_interrupt_handler(device, irq); … … 138 138 139 139 140 // TODO: Undo device_setup_hcd140 // TODO: Undo hcd_setup_device 141 141 #define CHECK_RET_CLEAN_RETURN(ret, message...) \ 142 142 if (ret != EOK) { \ … … 147 147 hc_t *hc_impl = malloc(sizeof(hc_t)); 148 148 ret = hc_impl ? EOK : ENOMEM; 149 CHECK_RET_CLEAN_RETURN(ret, "Failed to al oocate driver structure.\n");149 CHECK_RET_CLEAN_RETURN(ret, "Failed to allocate driver structure.\n"); 150 150 151 /* Initialize OHCI HC */ 151 152 ret = hc_init(hc_impl, reg_base, reg_size, interrupts); 152 153 CHECK_RET_CLEAN_RETURN(ret, "Failed to init hc: %s.\n", str_error(ret)); 153 154 155 /* Connect OHCI to generic HCD */ 154 156 hcd_set_implementation(dev_to_hcd(device), hc_impl, 155 157 hc_schedule, ohci_endpoint_init, ohci_endpoint_fini); 158 159 /* HC should be running OK. We can add root hub */ 156 160 ret = hcd_setup_hub(dev_to_hcd(device), &hc_impl->rh.address, device); 157 161 CHECK_RET_CLEAN_RETURN(ret,
Note:
See TracChangeset
for help on using the changeset viewer.