/* This function will be invoked when usb hub plug out is detected and it would clean and release all hub class related resources. */
static rt_err_t rt_usbh_hub_disable(void *arg)
/* This function will be invoked when usb hub plug out is detected and it would clean and release all hub class related resources. */
static rt_err_t rt_usbh_hub_disable(void *arg)
{
    int i;
    uhub_t hub;
    struct uhintf* intf = (struct uhintf*)arg;
    RT_ASSERT(intf != RT_NULL);
    LOG_D("rt_usbh_hub_stop");
    hub = (uhub_t)intf->user_data;
    for(i=0; i<hub->num_ports; i++)
    {
        if(hub->child[i] != RT_NULL)
            rt_usbh_detach_instance(hub->child[i]);
    }
    if(hub != RT_NULL) rt_free(hub);
    return RT_EOK;
}