Changes in uspace/drv/platform/sun4u/sun4u.c [5a6cc679:a35b458] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/platform/sun4u/sun4u.c
r5a6cc679 ra35b458 154 154 { 155 155 sun4u_fun_t *fun = sun4u_fun(fnode); 156 156 157 157 assert(fun != NULL); 158 158 return &fun->hw_resources; … … 162 162 { 163 163 /* TODO */ 164 164 165 165 return false; 166 166 } … … 191 191 { 192 192 ddf_msg(LVL_DEBUG, "Adding new function '%s'.", name); 193 193 194 194 ddf_fun_t *fnode = NULL; 195 195 errno_t rc; 196 196 197 197 /* Create new device. */ 198 198 fnode = ddf_fun_create(dev, fun_inner, name); 199 199 if (fnode == NULL) 200 200 goto failure; 201 201 202 202 sun4u_fun_t *fun = ddf_fun_data_alloc(fnode, sizeof(sun4u_fun_t)); 203 203 *fun = *fun_proto; 204 204 205 205 /* Add match ID */ 206 206 rc = ddf_fun_add_match_id(fnode, str_match_id, 100); 207 207 if (rc != EOK) 208 208 goto failure; 209 209 210 210 /* Set provided operations to the device. */ 211 211 ddf_fun_set_ops(fnode, &sun4u_fun_ops); 212 212 213 213 /* Register function. */ 214 214 if (ddf_fun_bind(fnode) != EOK) { … … 216 216 goto failure; 217 217 } 218 218 219 219 return true; 220 220 221 221 failure: 222 222 if (fnode != NULL) 223 223 ddf_fun_destroy(fnode); 224 224 225 225 ddf_msg(LVL_ERROR, "Failed adding function '%s'.", name); 226 226 227 227 return false; 228 228 } … … 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.