Changeset 0cd8089 in mainline for uspace/drv/bus/usb/vhc/connhost.c


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

libusbhost: Change usb_device_manager interface.

Use request_address instead of get_free_address.
Explicit USB address can be requested.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/vhc/connhost.c

    r5e07cbc0 r0cd8089  
    6262        VHC_DATA(vhc, fun);
    6363
    64         usb_address_t addr = usb_device_manager_get_free_address(
    65             &vhc->dev_manager, USB_SPEED_HIGH);
    66         if (addr < 0) {
    67                 return addr;
     64        usb_address_t addr = 1;
     65        const int ret = usb_device_manager_request_address(
     66            &vhc->dev_manager, &addr, false, USB_SPEED_HIGH);
     67        if (ret < 0) {
     68                return ret;
    6869        }
    6970
     
    8889        usb_log_debug("Binding handle %" PRIun " to address %d.\n",
    8990            handle, address);
    90         usb_device_manager_bind(&vhc->dev_manager, address, handle);
     91        usb_device_manager_bind_address(&vhc->dev_manager, address, handle);
    9192
    9293        return EOK;
     
    118119        VHC_DATA(vhc, fun);
    119120        usb_log_debug("Releasing address %d...\n", address);
    120         usb_device_manager_release(&vhc->dev_manager, address);
     121        usb_device_manager_release_address(&vhc->dev_manager, address);
    121122
    122123        return ENOTSUP;
Note: See TracChangeset for help on using the changeset viewer.