Changeset eea3e39 in mainline


Ignore:
Timestamp:
2011-10-31T09:46:52Z (12 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.

Location:
uspace
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/usbmid/usbmid.c

    rcae002c reea3e39  
    6363static usb_iface_t child_usb_iface = {
    6464        .get_hc_handle = usb_iface_get_hc_handle_hub_child_impl,
    65         .get_address = usb_iface_get_address_hub_impl,
     65        .get_address = usb_iface_get_address_forward_impl,
    6666        .get_interface = usb_iface_get_interface_impl
    6767};
  • uspace/lib/usb/include/usb/ddfiface.h

    rcae002c reea3e39  
    4040
    4141int usb_iface_get_hc_handle_hub_impl(ddf_fun_t *, devman_handle_t *);
    42 int usb_iface_get_address_hub_impl(ddf_fun_t *, devman_handle_t,
     42int usb_iface_get_address_forward_impl(ddf_fun_t *, devman_handle_t,
    4343    usb_address_t *);
    4444extern usb_iface_t usb_iface_hub_impl;
    4545
    4646int usb_iface_get_hc_handle_hub_child_impl(ddf_fun_t *, devman_handle_t *);
    47 int usb_iface_get_address_hub_child_impl(ddf_fun_t *, devman_handle_t,
     47int usb_iface_get_address_set_my_handle_impl(ddf_fun_t *, devman_handle_t,
    4848    usb_address_t *);
    4949extern usb_iface_t usb_iface_hub_child_impl;
  • 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
  • uspace/lib/usbdev/src/recognise.c

    rcae002c reea3e39  
    5050
    5151/** DDF operations of child devices. */
    52 ddf_dev_ops_t child_ops = {
     52static ddf_dev_ops_t child_ops = {
    5353        .interfaces[USB_DEV_IFACE] = &usb_iface_hub_child_impl
    5454};
     
    339339 * @param[in] hc_handle Handle of the host controller.
    340340 * @param[in] parent Parent device.
    341  * @param[in] dev_ops Child device ops.
     341 * @param[in] dev_ops Child device ops. Default child_ops will be used if NULL.
    342342 * @param[in] dev_data Arbitrary pointer to be stored in the child
    343343 *      as @c driver_data.
Note: See TracChangeset for help on using the changeset viewer.