Changeset 4b8ecff in mainline


Ignore:
Timestamp:
2013-08-07T09:14:47Z (11 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5514cf7
Parents:
cb8ede1
Message:

libusbhost: remove implementations of the old HC handle based functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbhost/src/ddf_helpers.c

    rcb8ede1 r4b8ecff  
    7474        usb_address_t address;
    7575        usb_speed_t speed;
    76         devman_handle_t hc_handle;
    7776} usb_dev_t;
    7877
     
    183182}
    184183
    185 /** Get USB address assigned to root hub.
    186  *
    187  * @param[in] fun Root hub function.
    188  * @param[out] address Store the address here.
    189  * @return Error code.
    190  */
    191 static int get_my_address(ddf_fun_t *fun, usb_address_t *address)
    192 {
    193         assert(fun);
    194         if (address != NULL) {
    195                 usb_dev_t *usb_dev = ddf_fun_data_get(fun);
    196                 *address = usb_dev->address;
    197         }
    198         return EOK;
    199 }
    200 
    201 /** Gets handle of the respective hc (this device, hc function).
    202  *
    203  * @param[in] root_hub_fun Root hub function seeking hc handle.
    204  * @param[out] handle Place to write the handle.
    205  * @return Error code.
    206  */
    207 static int get_hc_handle(ddf_fun_t *fun, devman_handle_t *handle)
    208 {
    209         assert(fun);
    210 
    211         if (handle != NULL) {
    212                 usb_dev_t *usb_dev = ddf_fun_data_get(fun);
    213                 *handle = usb_dev->hc_handle;
    214         }
    215         return EOK;
    216 }
    217 
    218184/** Gets handle of the respective hc (this device, hc function).
    219185 *
     
    284250/** Root hub USB interface */
    285251static usb_iface_t usb_iface = {
    286         .get_hc_handle = get_hc_handle,
    287         .get_my_address = get_my_address,
    288 
    289252        .get_device_handle = get_device_handle,
    290253
    291254        .reserve_default_address = reserve_default_address,
    292255        .release_default_address = release_default_address,
     256
    293257        .device_enumerate = device_enumerate,
    294258        .device_remove = device_remove,
     259
    295260        .register_endpoint = register_endpoint,
    296261        .unregister_endpoint = unregister_endpoint,
     262
    297263        .read = dev_read,
    298264        .write = dev_write,
     
    332298        assert(parent);
    333299        hc_dev_t *hc_dev = dev_to_hc_dev(parent);
    334         devman_handle_t hc_handle = ddf_fun_get_handle(hc_dev->hc_fun);
    335300
    336301        char default_name[10] = { 0 }; /* usbxyz-ss */
     
    352317        info->address = address;
    353318        info->speed = speed;
    354         info->hc_handle = hc_handle;
    355319        info->fun = fun;
    356320        link_initialize(&info->link);
Note: See TracChangeset for help on using the changeset viewer.