Ignore:
Timestamp:
2012-06-29T13:02:14Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
722912e
Parents:
ba72f2b (diff), 0bbd13e (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes

Trivial conflicts.

File:
1 edited

Legend:

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

    rba72f2b r6843a9c  
    5353#include <ddf/driver.h>
    5454#include <ddf/log.h>
    55 #include <devman.h>
    56 #include <ipc/devman.h>
    5755
    5856#define NAME "root"
     
    6664#define VIRTUAL_FUN_MATCH_SCORE 100
    6765
    68 static int root_add_device(ddf_dev_t *dev);
     66static int root_dev_add(ddf_dev_t *dev);
    6967static int root_fun_online(ddf_fun_t *fun);
    7068static int root_fun_offline(ddf_fun_t *fun);
     
    7270/** The root device driver's standard operations. */
    7371static driver_ops_t root_ops = {
    74         .add_device = &root_add_device,
     72        .dev_add = &root_dev_add,
    7573        .fun_online = &root_fun_online,
    7674        .fun_offline = &root_fun_offline
     
    158156        if (asprintf(&match_id, PLATFORM_FUN_MATCH_ID_FMT, platform) == -1) {
    159157                ddf_msg(LVL_ERROR, "Memory allocation failed.");
    160                 return ENOMEM;
    161         }
     158                free(platform);
     159                return ENOMEM;
     160        }
     161
     162        free(platform);
    162163
    163164        /* Add function. */
     
    169170        if (fun == NULL) {
    170171                ddf_msg(LVL_ERROR, "Error creating function %s", name);
     172                free(match_id);
    171173                return ENOMEM;
    172174        }
     
    176178                ddf_msg(LVL_ERROR, "Failed adding match IDs to function %s",
    177179                    name);
     180                free(match_id);
    178181                ddf_fun_destroy(fun);
    179182                return rc;
     
    198201 *                      of HW and pseudo devices).
    199202 */
    200 static int root_add_device(ddf_dev_t *dev)
    201 {
    202         ddf_msg(LVL_DEBUG, "root_add_device, device handle=%" PRIun,
     203static int root_dev_add(ddf_dev_t *dev)
     204{
     205        ddf_msg(LVL_DEBUG, "root_dev_add, device handle=%" PRIun,
    203206            dev->handle);
    204207
     
    208211         * vital for the system.
    209212         */
    210         add_virtual_root_fun(dev);
     213        (void) add_virtual_root_fun(dev);
    211214
    212215        /* Register root device's children. */
Note: See TracChangeset for help on using the changeset viewer.