Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/platform/sun4u/sun4u.c

    r5a6cc679 ra35b458  
    154154{
    155155        sun4u_fun_t *fun = sun4u_fun(fnode);
    156        
     156
    157157        assert(fun != NULL);
    158158        return &fun->hw_resources;
     
    162162{
    163163        /* TODO */
    164        
     164
    165165        return false;
    166166}
     
    191191{
    192192        ddf_msg(LVL_DEBUG, "Adding new function '%s'.", name);
    193        
     193
    194194        ddf_fun_t *fnode = NULL;
    195195        errno_t rc;
    196        
     196
    197197        /* Create new device. */
    198198        fnode = ddf_fun_create(dev, fun_inner, name);
    199199        if (fnode == NULL)
    200200                goto failure;
    201        
     201
    202202        sun4u_fun_t *fun = ddf_fun_data_alloc(fnode, sizeof(sun4u_fun_t));
    203203        *fun = *fun_proto;
    204        
     204
    205205        /* Add match ID */
    206206        rc = ddf_fun_add_match_id(fnode, str_match_id, 100);
    207207        if (rc != EOK)
    208208                goto failure;
    209        
     209
    210210        /* Set provided operations to the device. */
    211211        ddf_fun_set_ops(fnode, &sun4u_fun_ops);
    212        
     212
    213213        /* Register function. */
    214214        if (ddf_fun_bind(fnode) != EOK) {
     
    216216                goto failure;
    217217        }
    218        
     218
    219219        return true;
    220        
     220
    221221failure:
    222222        if (fnode != NULL)
    223223                ddf_fun_destroy(fnode);
    224        
     224
    225225        ddf_msg(LVL_ERROR, "Failed adding function '%s'.", name);
    226        
     226
    227227        return false;
    228228}
     
    251251                ddf_msg(LVL_ERROR, "Failed to add functions for the Malta platform.");
    252252        }
    253        
     253
    254254        return EOK;
    255255}
Note: See TracChangeset for help on using the changeset viewer.