Changeset 5a6cc679 in mainline for uspace/lib/drv/generic/driver.c


Ignore:
Timestamp:
2018-01-31T02:21:24Z (7 years ago)
Author:
Jenda <jenda.jzqk73@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a0a9cc2
Parents:
132ab5d1
Message:

Merge commit '50f19b7ee8e94570b5c63896736c4eb49cfa18db' into forwardport

Not all ints are converted to errno_t in xhci tree yet, however it compiles and works :)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/drv/generic/driver.c

    r132ab5d1 r5a6cc679  
    124124       
    125125        char *dev_name = NULL;
    126         int rc = async_data_write_accept((void **) &dev_name, true, 0, 0, 0, 0);
     126        errno_t rc = async_data_write_accept((void **) &dev_name, true, 0, 0, 0, 0);
    127127        if (rc != EOK) {
    128128                async_answer_0(iid, rc);
     
    157157        (void) parent_fun_handle;
    158158       
    159         int res = driver->driver_ops->dev_add(dev);
     159        errno_t res = driver->driver_ops->dev_add(dev);
    160160       
    161161        if (res != EOK) {
     
    189189        }
    190190       
    191         int rc;
     191        errno_t rc;
    192192       
    193193        if (driver->driver_ops->dev_remove != NULL)
     
    222222        }
    223223       
    224         int rc;
     224        errno_t rc;
    225225       
    226226        if (driver->driver_ops->dev_gone != NULL)
     
    263263       
    264264        /* Call driver entry point */
    265         int rc;
     265        errno_t rc;
    266266       
    267267        if (driver->driver_ops->fun_online != NULL)
     
    298298       
    299299        /* Call driver entry point */
    300         int rc;
     300        errno_t rc;
    301301       
    302302        if (driver->driver_ops->fun_offline != NULL)
     
    414414         */
    415415       
    416         int ret = EOK;
     416        errno_t ret = EOK;
    417417        /* Open device function */
    418418        if (fun->ops != NULL && fun->ops->open != NULL)
     
    676676 * @return      EOK on success, ENOMEM if out of memory
    677677 */
    678 int ddf_fun_set_name(ddf_fun_t *dev, const char *name)
     678errno_t ddf_fun_set_name(ddf_fun_t *dev, const char *name)
    679679{
    680680        assert(dev->name == NULL);
     
    825825 *
    826826 */
    827 int ddf_fun_bind(ddf_fun_t *fun)
     827errno_t ddf_fun_bind(ddf_fun_t *fun)
    828828{
    829829        assert(fun->bound == false);
     
    832832       
    833833        add_to_functions_list(fun);
    834         int res = devman_add_function(fun->name, fun->ftype, &fun->match_ids,
     834        errno_t res = devman_add_function(fun->name, fun->ftype, &fun->match_ids,
    835835            fun->dev->handle, &fun->handle);
    836836        if (res != EOK) {
     
    853853 *
    854854 */
    855 int ddf_fun_unbind(ddf_fun_t *fun)
     855errno_t ddf_fun_unbind(ddf_fun_t *fun)
    856856{
    857857        assert(fun->bound == true);
    858858       
    859         int res = devman_remove_function(fun->handle);
     859        errno_t res = devman_remove_function(fun->handle);
    860860        if (res != EOK)
    861861                return res;
     
    874874 *
    875875 */
    876 int ddf_fun_online(ddf_fun_t *fun)
     876errno_t ddf_fun_online(ddf_fun_t *fun)
    877877{
    878878        assert(fun->bound == true);
    879879       
    880         int res = devman_drv_fun_online(fun->handle);
     880        errno_t res = devman_drv_fun_online(fun->handle);
    881881        if (res != EOK)
    882882                return res;
     
    892892 *
    893893 */
    894 int ddf_fun_offline(ddf_fun_t *fun)
     894errno_t ddf_fun_offline(ddf_fun_t *fun)
    895895{
    896896        assert(fun->bound == true);
    897897       
    898         int res = devman_drv_fun_offline(fun->handle);
     898        errno_t res = devman_drv_fun_offline(fun->handle);
    899899        if (res != EOK)
    900900                return res;
     
    916916 *
    917917 */
    918 int ddf_fun_add_match_id(ddf_fun_t *fun, const char *match_id_str,
     918errno_t ddf_fun_add_match_id(ddf_fun_t *fun, const char *match_id_str,
    919919    int match_score)
    920920{
     
    963963 *
    964964 */
    965 int ddf_fun_add_to_category(ddf_fun_t *fun, const char *cat_name)
     965errno_t ddf_fun_add_to_category(ddf_fun_t *fun, const char *cat_name)
    966966{
    967967        assert(fun->bound == true);
     
    984984         */
    985985        port_id_t port;
    986         int rc = async_create_port(INTERFACE_DDF_DRIVER, driver_connection_driver,
     986        errno_t rc = async_create_port(INTERFACE_DDF_DRIVER, driver_connection_driver,
    987987            NULL, &port);
    988988        if (rc != EOK) {
Note: See TracChangeset for help on using the changeset viewer.