Changeset 45a9cf4 in mainline
- Timestamp:
- 2011-09-17T21:53:30Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 086290d, c5808b41, f1d6866
- Parents:
- dfa48b0d
- Location:
- uspace/drv/bus/usb
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ohci/pci.c
rdfa48b0d r45a9cf4 70 70 if (!parent_sess) 71 71 return ENOMEM; 72 72 73 73 hw_resource_list_t hw_resources; 74 74 int rc = hw_res_get_resource_list(parent_sess, &hw_resources); 75 async_hangup(parent_sess); 75 76 if (rc != EOK) { 76 async_hangup(parent_sess);77 77 return rc; 78 78 } 79 79 80 80 uintptr_t mem_address = 0; 81 81 size_t mem_size = 0; 82 82 bool mem_found = false; 83 83 84 84 int irq = 0; 85 85 bool irq_found = false; 86 86 87 87 size_t i; 88 88 for (i = 0; i < hw_resources.count; i++) { … … 107 107 } 108 108 } 109 109 free(hw_resources.resources); 110 110 111 if (mem_found && irq_found) { 111 112 *mem_reg_address = mem_address; 112 113 *mem_reg_size = mem_size; 113 114 *irq_no = irq; 114 rc = EOK; 115 } else 116 rc = ENOENT; 117 118 async_hangup(parent_sess); 119 return rc; 115 return EOK; 116 } 117 return ENOENT; 120 118 } 121 119 -
uspace/drv/bus/usb/uhci/pci.c
rdfa48b0d r45a9cf4 69 69 70 70 hw_resource_list_t hw_resources; 71 int rc = hw_res_get_resource_list(parent_sess, &hw_resources); 71 const int rc = hw_res_get_resource_list(parent_sess, &hw_resources); 72 async_hangup(parent_sess); 72 73 if (rc != EOK) { 73 async_hangup(parent_sess);74 74 return rc; 75 75 } … … 78 78 size_t io_size = 0; 79 79 bool io_found = false; 80 80 81 81 int irq = 0; 82 82 bool irq_found = false; 83 83 84 84 size_t i; 85 85 for (i = 0; i < hw_resources.count; i++) { … … 102 102 } 103 103 } 104 105 async_hangup(parent_sess); 104 free(hw_resources.resources); 106 105 107 106 if (!io_found || !irq_found)
Note:
See TracChangeset
for help on using the changeset viewer.