Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/infrastructure/root/root.c

    re882e3a rdeac215e  
    5353#include <ddf/driver.h>
    5454#include <ddf/log.h>
     55#include <devman.h>
     56#include <ipc/devman.h>
    5557
    5658#define NAME "root"
     
    6466#define VIRTUAL_FUN_MATCH_SCORE 100
    6567
    66 static int root_dev_add(ddf_dev_t *dev);
     68static int root_add_device(ddf_dev_t *dev);
    6769static int root_fun_online(ddf_fun_t *fun);
    6870static int root_fun_offline(ddf_fun_t *fun);
     
    7072/** The root device driver's standard operations. */
    7173static driver_ops_t root_ops = {
    72         .dev_add = &root_dev_add,
     74        .add_device = &root_add_device,
    7375        .fun_online = &root_fun_online,
    7476        .fun_offline = &root_fun_offline
     
    156158        if (asprintf(&match_id, PLATFORM_FUN_MATCH_ID_FMT, platform) == -1) {
    157159                ddf_msg(LVL_ERROR, "Memory allocation failed.");
    158                 free(platform);
    159                 return ENOMEM;
    160         }
    161 
    162         free(platform);
     160                return ENOMEM;
     161        }
    163162
    164163        /* Add function. */
     
    170169        if (fun == NULL) {
    171170                ddf_msg(LVL_ERROR, "Error creating function %s", name);
    172                 free(match_id);
    173171                return ENOMEM;
    174172        }
     
    178176                ddf_msg(LVL_ERROR, "Failed adding match IDs to function %s",
    179177                    name);
    180                 free(match_id);
    181178                ddf_fun_destroy(fun);
    182179                return rc;
     
    201198 *                      of HW and pseudo devices).
    202199 */
    203 static int root_dev_add(ddf_dev_t *dev)
    204 {
    205         ddf_msg(LVL_DEBUG, "root_dev_add, device handle=%" PRIun,
     200static int root_add_device(ddf_dev_t *dev)
     201{
     202        ddf_msg(LVL_DEBUG, "root_add_device, device handle=%" PRIun,
    206203            dev->handle);
    207204
     
    211208         * vital for the system.
    212209         */
    213         (void) add_virtual_root_fun(dev);
     210        add_virtual_root_fun(dev);
    214211
    215212        /* Register root device's children. */
Note: See TracChangeset for help on using the changeset viewer.