Changeset a35b458 in mainline for uspace/drv/platform/mac/mac.c
- Timestamp:
- 2018-03-02T20:10:49Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f1380b7
- Parents:
- 3061bc1
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:38:31)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:10:49)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/platform/mac/mac.c
r3061bc1 ra35b458 130 130 ddf_msg(LVL_DEBUG, "Adding new function '%s'.", name); 131 131 printf("mac: Adding new function '%s'.\n", name); 132 132 133 133 ddf_fun_t *fnode = NULL; 134 134 errno_t rc; 135 135 136 136 /* Create new device. */ 137 137 fnode = ddf_fun_create(dev, fun_inner, name); 138 138 if (fnode == NULL) 139 139 goto failure; 140 140 141 141 mac_fun_t *fun = ddf_fun_data_alloc(fnode, sizeof(mac_fun_t)); 142 142 *fun = *fun_proto; 143 143 144 144 /* Add match ID */ 145 145 rc = ddf_fun_add_match_id(fnode, str_match_id, 100); 146 146 if (rc != EOK) 147 147 goto failure; 148 148 149 149 /* Set provided operations to the device. */ 150 150 ddf_fun_set_ops(fnode, &mac_fun_ops); 151 151 152 152 /* Register function. */ 153 153 if (ddf_fun_bind(fnode) != EOK) { … … 155 155 goto failure; 156 156 } 157 157 158 158 printf("mac: Added new function '%s' (str=%s).\n", name, str_match_id); 159 159 return true; 160 160 161 161 failure: 162 162 if (fnode != NULL) 163 163 ddf_fun_destroy(fnode); 164 164 165 165 ddf_msg(LVL_ERROR, "Failed adding function '%s'.", name); 166 166 167 167 return false; 168 168 } … … 223 223 mac_fun_t *fun = mac_fun(fnode); 224 224 assert(fun != NULL); 225 225 226 226 return &fun->hw_resources; 227 227 } … … 230 230 { 231 231 /* TODO */ 232 232 233 233 return false; 234 234 }
Note:
See TracChangeset
for help on using the changeset viewer.