Changeset ffa254f1 in mainline


Ignore:
Timestamp:
2013-01-25T21:51:20Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f6b2a76
Parents:
0f4bff8
Message:

usbflbks: Remove dummy ctl function.

It did nothing.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/usbflbk/main.c

    r0f4bff8 rffa254f1  
    4848static int usbfallback_device_add(usb_device_t *dev)
    4949{
    50         int rc;
    51         const char *fun_name = "ctl";
    52 
    53         ddf_fun_t *ctl_fun = ddf_fun_create(dev->ddf_dev, fun_exposed,
    54             fun_name);
    55         if (ctl_fun == NULL) {
    56                 usb_log_error("Failed to create control function.\n");
    57                 return ENOMEM;
    58         }
    59         rc = ddf_fun_bind(ctl_fun);
    60         if (rc != EOK) {
    61                 usb_log_error("Failed to bind control function: %s.\n",
    62                     str_error(rc));
    63                 return rc;
    64         }
    65 
    66         dev->driver_data = ctl_fun;
    67 
    68         usb_log_info("Pretending to control %s `%s'" \
    69             " (node `%s', handle %" PRIun ").\n",
     50        usb_log_info("Pretending to control %s `%s' (handle %" PRIun ").\n",
    7051            dev->interface_no < 0 ? "device" : "interface",
    71             ddf_dev_get_name(dev->ddf_dev), fun_name, ddf_dev_get_handle(dev->ddf_dev));
    72 
     52            ddf_dev_get_name(dev->ddf_dev), ddf_dev_get_handle(dev->ddf_dev));
    7353        return EOK;
    7454}
     
    8262{
    8363        assert(dev);
    84         ddf_fun_t *ctl_fun = dev->driver_data;
    85         const int ret = ddf_fun_unbind(ctl_fun);
    86         if (ret != EOK) {
    87                 usb_log_error("Failed to unbind %s.\n", ddf_fun_get_name(ctl_fun));
    88                 return ret;
    89         }
    90         ddf_fun_destroy(ctl_fun);
    91         dev->driver_data = NULL;
    92 
    9364        return EOK;
    9465}
Note: See TracChangeset for help on using the changeset viewer.