Changeset e160bfe8 in mainline for uspace/srv/devman/driver.c


Ignore:
Timestamp:
2017-10-23T18:51:34Z (7 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
327f147
Parents:
31cca4f3 (diff), 367db39a (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 (again) to fix build

Perhaps it wasn't so good idea to start merging mainline in these unstable times :)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/devman/driver.c

    r31cca4f3 re160bfe8  
    298298        drv->state = DRIVER_STARTING;
    299299        return true;
     300}
     301
     302/** Stop a driver
     303 *
     304 * @param drv           The driver's structure.
     305 * @return              True if the driver's task is successfully spawned, false
     306 *                      otherwise.
     307 */
     308int stop_driver(driver_t *drv)
     309{
     310        async_exch_t *exch;
     311        sysarg_t retval;
     312       
     313        log_msg(LOG_DEFAULT, LVL_DEBUG, "stop_driver(drv=\"%s\")", drv->name);
     314
     315        exch = async_exchange_begin(drv->sess);
     316        retval = async_req_0_0(exch, DRIVER_STOP);
     317        loc_exchange_end(exch);
     318       
     319        if (retval != EOK)
     320                return retval;
     321       
     322        drv->state = DRIVER_NOT_STARTED;
     323        async_hangup(drv->sess);
     324        drv->sess = NULL;
     325        return EOK;
    300326}
    301327
Note: See TracChangeset for help on using the changeset viewer.