Changeset ef9460b in mainline for uspace/drv/bus/usb
- Timestamp:
- 2011-07-14T21:55:18Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/fix-logger-deadlock, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 333c233
- Parents:
- 159100a
- Location:
- uspace/drv/bus/usb
- Files:
-
- 2 edited
-
ohci/hc.c (modified) (1 diff)
-
uhci/root_hub.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ohci/hc.c
r159100a ref9460b 151 151 "Failed to add OHCI root hub endpoint 0: %s.\n", str_error(ret)); 152 152 153 char *match_str = NULL; 154 /* DDF needs heap allocated string. */ 155 ret = asprintf(&match_str, "usb&class=hub"); 156 ret = ret > 0 ? 0 : ret; 157 CHECK_RET_RELEASE(ret, 158 "Failed to create match-id string: %s.\n", str_error(ret)); 159 160 ret = ddf_fun_add_match_id(hub_fun, match_str, 100); 153 ret = ddf_fun_add_match_id(hub_fun, "usb&class=hub", 100); 161 154 CHECK_RET_RELEASE(ret, 162 155 "Failed to add root hub match-id: %s.\n", str_error(ret)); -
uspace/drv/bus/usb/uhci/root_hub.c
r159100a ref9460b 50 50 int rh_init(rh_t *instance, ddf_fun_t *fun, uintptr_t reg_addr, size_t reg_size) 51 51 { 52 int ret; 53 52 54 assert(fun); 53 55 54 char *match_str = NULL; 55 int ret = asprintf(&match_str, "usb&uhci&root-hub"); 56 if (ret < 0) { 57 usb_log_error("Failed to create root hub match string: %s.\n", 58 str_error(ret)); 59 return ret; 60 } 61 assert(match_str); 62 63 ret = ddf_fun_add_match_id(fun, match_str, 100); 56 ret = ddf_fun_add_match_id(fun, "usb&uhci&root-hub", 100); 64 57 if (ret != EOK) { 65 free(match_str);66 58 usb_log_error("Failed to add root hub match id: %s\n", 67 59 str_error(ret));
Note:
See TracChangeset
for help on using the changeset viewer.
