Changeset eea3e39 in mainline for uspace/lib/usb/src/ddfiface.c


Ignore:
Timestamp:
2011-10-31T09:46:52Z (14 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3562cd18
Parents:
cae002c
Message:

libusb: Rename get_address implementations.

The new names describe the functionality better.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usb/src/ddfiface.c

    rcae002c reea3e39  
    4545usb_iface_t  usb_iface_hub_impl = {
    4646        .get_hc_handle = usb_iface_get_hc_handle_hub_impl,
    47         .get_address = usb_iface_get_address_hub_impl
     47        .get_address = usb_iface_get_address_forward_impl,
    4848};
    4949
     
    5151usb_iface_t  usb_iface_hub_child_impl = {
    5252        .get_hc_handle = usb_iface_get_hc_handle_hub_child_impl,
    53         .get_address = usb_iface_get_address_hub_child_impl
     53        .get_address = usb_iface_get_address_set_my_handle_impl
    5454};
    5555
     
    125125 * @return Error code.
    126126 */
    127 int usb_iface_get_address_hub_impl(ddf_fun_t *fun, devman_handle_t handle,
     127int usb_iface_get_address_forward_impl(ddf_fun_t *fun, devman_handle_t handle,
    128128    usb_address_t *address)
    129129{
    130130        assert(fun);
    131        
     131
    132132        async_sess_t *parent_sess =
    133133            devman_parent_device_connect(EXCHANGE_SERIALIZE, fun->handle,
     
    135135        if (!parent_sess)
    136136                return ENOMEM;
    137        
     137
    138138        async_exch_t *exch = async_exchange_begin(parent_sess);
    139        
     139
    140140        sysarg_t addr;
    141141        int rc = async_req_2_1(exch, DEV_IFACE_ID(USB_DEV_IFACE),
    142142            IPC_M_USB_GET_ADDRESS, handle, &addr);
    143        
     143
    144144        async_exchange_end(exch);
    145145        async_hangup(parent_sess);
    146        
     146
    147147        if (rc != EOK)
    148148                return rc;
    149        
     149
    150150        if (address != NULL)
    151151                *address = (usb_address_t) addr;
    152        
     152
    153153        return EOK;
    154154}
     
    157157 * a hub driver.
    158158 *
     159 * This implementation eccepts 0 as valid handle and replaces it with fun's
     160 * handle.
     161 *
    159162 * @param[in] fun Device function the operation is running on.
    160163 * @param[in] handle Devman handle of USB device we want address of.
     
    162165 * @return Error code.
    163166 */
    164 int usb_iface_get_address_hub_child_impl(ddf_fun_t *fun,
     167int usb_iface_get_address_set_my_handle_impl(ddf_fun_t *fun,
    165168    devman_handle_t handle, usb_address_t *address)
    166169{
     
    168171                handle = fun->handle;
    169172        }
    170         return usb_iface_get_address_hub_impl(fun, handle, address);
     173        return usb_iface_get_address_forward_impl(fun, handle, address);
    171174}
    172175
Note: See TracChangeset for help on using the changeset viewer.