Changeset 7aaed09 in mainline for uspace/drv/bus/usb/ohci/ohci.c


Ignore:
Timestamp:
2011-12-18T14:02:30Z (12 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c868e2d
Parents:
3b71e84d (diff), 1761268 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 edited

Legend:

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

    r3b71e84d r7aaed09  
    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         usb_device_manager_t *manager =
    89             &dev_to_ohci(fun->dev)->hc.generic.dev_manager;
    90 
    91         const usb_address_t addr =
    92             usb_device_manager_find_address(manager, handle);
    93         if (addr < 0) {
    94                 return addr;
    95         }
    9687
    9788        if (address != NULL) {
    98                 *address = addr;
     89                *address = dev_to_ohci(fun->dev)->hc.rh.address;
    9990        }
    10091
     
    10899 * @return Error code.
    109100 */
    110 static int usb_iface_get_hc_handle(
     101static int rh_get_hc_handle(
    111102    ddf_fun_t *fun, devman_handle_t *handle)
    112103{
     
    122113/** Root hub USB interface */
    123114static usb_iface_t usb_iface = {
    124         .get_hc_handle = usb_iface_get_hc_handle,
    125         .get_address = usb_iface_get_address
     115        .get_hc_handle = rh_get_hc_handle,
     116        .get_my_address = rh_get_my_address,
    126117};
    127118/*----------------------------------------------------------------------------*/
Note: See TracChangeset for help on using the changeset viewer.