Changeset 27ed734c in mainline for uspace/drv/bus/usb/ohci/ohci.c


Ignore:
Timestamp:
2011-10-31T13:06:57Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5e07cbc0
Parents:
d25e0a4
Message:

usb: Rename get_address ⇒ get_my_address and remove redundant handle parameter.

If you want to know what address the device uses ask the device not host controller.

File:
1 edited

Legend:

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

    rd25e0a4 r27ed734c  
    7676}
    7777/*----------------------------------------------------------------------------*/
    78 /** Get address of the device identified by handle.
    79  *
    80  * @param[in] dev DDF instance of the device to use.
    81  * @param[in] iid (Unused).
    82  * @param[in] call Pointer to the call that represents interrupt.
    83  */
    84 static int usb_iface_get_address(
    85     ddf_fun_t *fun, devman_handle_t handle, usb_address_t *address)
     78/** Get USB address assigned to root hub.
     79 *
     80 * @param[in] fun Root hub function.
     81 * @param[out] address Store the address here.
     82 * @return Error code.
     83 */
     84static int rh_get_my_address(ddf_fun_t *fun, usb_address_t *address)
    8685{
    8786        assert(fun);
    88         assert(handle == 0);
    8987
    9088        if (address != NULL) {
     
    10199 * @return Error code.
    102100 */
    103 static int usb_iface_get_hc_handle(
     101static int rh_get_hc_handle(
    104102    ddf_fun_t *fun, devman_handle_t *handle)
    105103{
     
    115113/** Root hub USB interface */
    116114static usb_iface_t usb_iface = {
    117         .get_hc_handle = usb_iface_get_hc_handle,
    118         .get_address = usb_iface_get_address
     115        .get_hc_handle = rh_get_hc_handle,
     116        .get_my_address = rh_get_my_address,
    119117};
    120118/*----------------------------------------------------------------------------*/
Note: See TracChangeset for help on using the changeset viewer.