Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/vhc/hub/hub.c

    r0f21c0c r70e5ad5  
    2727 */
    2828
    29 /** @addtogroup drvusbvhc
     29/** @addtogroup usb
    3030 * @{
    3131 */
     
    4040#include <stdlib.h>
    4141#include <driver.h>
     42#include <usb/usbdrv.h>
    4243
    4344#include "hub.h"
     
    154155}
    155156
    156 /** Disconnects a device from a hub.
    157  *
    158  * @param hub Hub the device was connected to.
    159  * @param device Device to be disconnected.
    160  * @return Error code.
    161  */
    162 int hub_disconnect_device(hub_t *hub, void *device)
    163 {
    164         size_t index = hub_find_device(hub, device);
    165         if (index == (size_t) -1) {
    166                 return ENOENT;
    167         }
    168 
    169         hub_port_t *port = &hub->ports[index];
    170 
    171         port->connected_device = NULL;
    172         port->state = HUB_PORT_STATE_DISCONNECTED;
    173         set_port_status_change(port, HUB_STATUS_C_PORT_CONNECTION);
    174 
    175         return EOK;
    176 }
    177 
    178157/** Find port device is connected to.
    179158 *
     
    194173        }
    195174
    196         return -1;
     175        return 0;
    197176}
    198177
Note: See TracChangeset for help on using the changeset viewer.