Changeset 5a6cc679 in mainline for uspace/lib/usbdev/src/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/usbdev/src/driver.c

    r132ab5d1 r5a6cc679  
    5252 * @return Error code.
    5353 */
    54 static int generic_device_add(ddf_dev_t *gen_dev)
     54static errno_t generic_device_add(ddf_dev_t *gen_dev)
    5555{
    5656        assert(driver);
     
    6060        /* Initialize generic USB driver data. */
    6161        const char *err_msg = NULL;
    62         int rc = usb_device_create_ddf(gen_dev, driver->endpoints, &err_msg);
     62        errno_t rc = usb_device_create_ddf(gen_dev, driver->endpoints, &err_msg);
    6363        if (rc != EOK) {
    6464                usb_log_error("USB device `%s' init failed (%s): %s.",
     
    8181 * @return Error code.
    8282 */
    83 static int generic_device_remove(ddf_dev_t *gen_dev)
     83static errno_t generic_device_remove(ddf_dev_t *gen_dev)
    8484{
    8585        assert(driver);
     
    9090        /* Just tell the driver to stop whatever it is doing */
    9191        usb_device_t *usb_dev = ddf_dev_data_get(gen_dev);
    92         int ret = driver->ops->device_remove(usb_dev);
     92        const errno_t ret = driver->ops->device_remove(usb_dev);
    9393        if (ret != EOK)
    9494                return ret;
     
    105105 * @return Error code.
    106106 */
    107 static int generic_device_gone(ddf_dev_t *gen_dev)
     107static errno_t generic_device_gone(ddf_dev_t *gen_dev)
    108108{
    109109        assert(driver);
     
    112112                return ENOTSUP;
    113113        usb_device_t *usb_dev = ddf_dev_data_get(gen_dev);
    114         const int ret = driver->ops->device_gone(usb_dev);
     114        const errno_t ret = driver->ops->device_gone(usb_dev);
    115115        if (ret == EOK)
    116116                usb_device_destroy_ddf(gen_dev);
Note: See TracChangeset for help on using the changeset viewer.