Changeset a35b458 in mainline for uspace/drv/platform/malta/malta.c
- Timestamp:
- 2018-03-02T20:10:49Z (8 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
-
uspace/drv/platform/malta/malta.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/platform/malta/malta.c
r3061bc1 ra35b458 138 138 { 139 139 malta_fun_t *fun = malta_fun(fnode); 140 140 141 141 assert(fun != NULL); 142 142 return &fun->hw_resources; … … 146 146 { 147 147 /* TODO */ 148 148 149 149 return false; 150 150 } … … 175 175 { 176 176 ddf_msg(LVL_DEBUG, "Adding new function '%s'.", name); 177 177 178 178 ddf_fun_t *fnode = NULL; 179 179 errno_t rc; 180 180 181 181 /* Create new device. */ 182 182 fnode = ddf_fun_create(dev, fun_inner, name); 183 183 if (fnode == NULL) 184 184 goto failure; 185 185 186 186 malta_fun_t *fun = ddf_fun_data_alloc(fnode, sizeof(malta_fun_t)); 187 187 *fun = *fun_proto; 188 188 189 189 /* Add match ID */ 190 190 rc = ddf_fun_add_match_id(fnode, str_match_id, 100); 191 191 if (rc != EOK) 192 192 goto failure; 193 193 194 194 /* Set provided operations to the device. */ 195 195 ddf_fun_set_ops(fnode, &malta_fun_ops); 196 196 197 197 /* Register function. */ 198 198 if (ddf_fun_bind(fnode) != EOK) { … … 200 200 goto failure; 201 201 } 202 202 203 203 return true; 204 204 205 205 failure: 206 206 if (fnode != NULL) 207 207 ddf_fun_destroy(fnode); 208 208 209 209 ddf_msg(LVL_ERROR, "Failed adding function '%s'.", name); 210 210 211 211 return false; 212 212 } … … 246 246 >[GT_PCI_CMD / sizeof(ioport32_t)], host2uint32_t_le(val)); 247 247 248 248 249 249 /* Register functions. */ 250 250 if (!malta_add_functions(dev)) { 251 251 ddf_msg(LVL_ERROR, "Failed to add functions for the Malta platform."); 252 252 } 253 253 254 254 return EOK; 255 255 }
Note:
See TracChangeset
for help on using the changeset viewer.
