Ignore:
File:
1 edited

Legend:

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

    rbc1c6fb r357a302  
    3939#include <usbhc_iface.h>
    4040#include <errno.h>
    41 #include <assert.h>
    4241
    4342/** Check that HC connection is alright.
     
    5756 *
    5857 * @param connection Opened connection to host controller.
    59  * @param speed Speed of the device that will respond on the default address.
    6058 * @return Error code.
    6159 */
     
    8785 *
    8886 * @param connection Opened connection to host controller.
    89  * @param speed Speed of the new device (device that will be assigned
    90  *    the returned address).
    9187 * @return Assigned USB address or negative error code.
    9288 */
     
    147143/** Wrapper for registering attached device to the hub.
    148144 *
    149  * The @p enable_port function is expected to enable signaling on given
     145 * The @p enable_port function is expected to enable singalling on given
    150146 * port.
    151147 * The two arguments to it can have arbitrary meaning
     
    155151 *
    156152 * If the @p enable_port fails (i.e. does not return EOK), the device
    157  * addition is canceled.
     153 * addition is cancelled.
    158154 * The return value is then returned (it is good idea to use different
    159155 * error codes than those listed as return codes by this function itself).
    160156 *
    161  * @param[in] parent Parent device (i.e. the hub device).
    162  * @param[in] connection Opened connection to host controller.
    163  * @param[in] dev_speed New device speed.
    164  * @param[in] enable_port Function for enabling signaling through the port the
     157 * @param parent Parent device (i.e. the hub device).
     158 * @param connection Opened connection to host controller.
     159 * @param dev_speed New device speed.
     160 * @param enable_port Function for enabling signalling through the port the
    165161 *      device is attached to.
    166  * @param[in] port_no Port number (passed through to @p enable_port).
    167  * @param[in] arg Any data argument to @p enable_port.
     162 * @param port_no Port number (passed through to @p enable_port).
     163 * @param arg Any data argument to @p enable_port.
    168164 * @param[out] assigned_address USB address of the device.
    169165 * @param[out] assigned_handle Devman handle of the new device.
    170  * @param[in] dev_ops Child device ops.
    171  * @param[in] new_dev_data Arbitrary pointer to be stored in the child
    172  *      as @c driver_data.
    173  * @param[out] new_fun Storage where pointer to allocated child function
    174  *      will be written.
    175166 * @return Error code.
    176167 * @retval ENOENT Connection to HC not opened.
     
    181172 *      request or requests for descriptors when creating match ids).
    182173 */
    183 int usb_hc_new_device_wrapper(ddf_dev_t *parent, usb_hc_connection_t *connection,
     174int usb_hc_new_device_wrapper(device_t *parent, usb_hc_connection_t *connection,
    184175    usb_speed_t dev_speed,
    185176    int (*enable_port)(int port_no, void *arg), int port_no, void *arg,
    186     usb_address_t *assigned_address, devman_handle_t *assigned_handle,
    187     ddf_dev_ops_t *dev_ops, void *new_dev_data, ddf_fun_t **new_fun)
     177    usb_address_t *assigned_address, devman_handle_t *assigned_handle)
    188178{
    189179        CHECK_CONNECTION(connection);
     
    209199
    210200        /*
    211          * Enable the port (i.e. allow signaling through this port).
     201         * Enable the port (i.e. allow signalling through this port).
    212202         */
    213203        rc = enable_port(port_no, arg);
     
    261251        devman_handle_t child_handle;
    262252        rc = usb_device_register_child_in_devman(dev_addr, dev_conn.hc_handle,
    263             parent, &child_handle,
    264             dev_ops, new_dev_data, new_fun);
     253            parent, &child_handle);
    265254        if (rc != EOK) {
    266255                rc = ESTALL;
Note: See TracChangeset for help on using the changeset viewer.