Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbdev/src/driver.c

    ra1732929 rc01987c  
    6262        int rc = usb_device_create_ddf(gen_dev, driver->endpoints, &err_msg);
    6363        if (rc != EOK) {
    64                 usb_log_error("USB device `%s' init failed (%s): %s.",
     64                usb_log_error("USB device `%s' init failed (%s): %s.\n",
    6565                    ddf_dev_get_name(gen_dev), err_msg, str_error(rc));
    6666                return rc;
     
    8585        assert(driver);
    8686        assert(driver->ops);
    87         if (driver->ops->device_remove == NULL)
     87        if (driver->ops->device_rem == NULL)
    8888                return ENOTSUP;
    89 
    9089        /* Just tell the driver to stop whatever it is doing */
    9190        usb_device_t *usb_dev = ddf_dev_data_get(gen_dev);
    92         int ret = driver->ops->device_remove(usb_dev);
     91        const int ret = driver->ops->device_rem(usb_dev);
    9392        if (ret != EOK)
    9493                return ret;
    95 
    9694        usb_device_destroy_ddf(gen_dev);
    9795        return EOK;
     
    119117}
    120118
    121 /** Callback when the driver is asked to online a specific function.
    122  *
    123  * This callback is a wrapper for USB specific version of @c fun_online.
    124  *
    125  * @param gen_dev Device function structure as prepared by DDF.
    126  * @return Error code.
    127  */
    128 static int generic_function_online(ddf_fun_t *fun)
    129 {
    130         assert(driver);
    131         assert(driver->ops);
    132         if (driver->ops->function_online == NULL)
    133                 return ENOTSUP;
    134         return driver->ops->function_online(fun);
    135 }
    136 
    137 /** Callback when the driver is asked to offline a specific function.
    138  *
    139  * This callback is a wrapper for USB specific version of @c fun_offline.
    140  *
    141  * @param gen_dev Device function structure as prepared by DDF.
    142  * @return Error code.
    143  */
    144 static int generic_function_offline(ddf_fun_t *fun)
    145 {
    146         assert(driver);
    147         assert(driver->ops);
    148         if (driver->ops->function_offline == NULL)
    149                 return ENOTSUP;
    150         return driver->ops->function_offline(fun);
    151 }
    152 
    153119static driver_ops_t generic_driver_ops = {
    154120        .dev_add = generic_device_add,
    155121        .dev_remove = generic_device_remove,
    156122        .dev_gone = generic_device_gone,
    157         .fun_online = generic_function_online,
    158         .fun_offline = generic_function_offline,
    159123};
    160124static driver_t generic_driver = {
Note: See TracChangeset for help on using the changeset viewer.