Changeset 53a9d02 in mainline for uspace/lib/usbhost/src/bus.c
- Timestamp:
- 2018-01-11T09:17:43Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 30fc56f
- Parents:
- 17783bf
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbhost/src/bus.c
r17783bf r53a9d02 109 109 return ENOTSUP; 110 110 111 if (dev->online) { 112 fibril_mutex_unlock(&dev->guard); 111 if (dev->online) 113 112 return EINVAL; 114 }115 113 116 114 const int r = ops->device_enumerate(dev); 117 if (!r) { 118 dev->online = true; 119 115 if (r) 116 return r; 117 118 dev->online = true; 119 120 if (dev->hub) { 120 121 fibril_mutex_lock(&dev->hub->guard); 121 122 list_append(&dev->link, &dev->hub->devices); … … 123 124 } 124 125 125 return r;126 return EOK; 126 127 } 127 128 … … 192 193 193 194 /* Remove our device from our hub's children. */ 194 fibril_mutex_lock(&dev->hub->guard); 195 list_remove(&dev->link); 196 fibril_mutex_unlock(&dev->hub->guard); 195 if (dev->hub) { 196 fibril_mutex_lock(&dev->hub->guard); 197 list_remove(&dev->link); 198 fibril_mutex_unlock(&dev->hub->guard); 199 } 197 200 198 201 /*
Note:
See TracChangeset
for help on using the changeset viewer.