summaryrefslogtreecommitdiff
path: root/src/usbh_driver_hub.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/usbh_driver_hub.c')
-rw-r--r--src/usbh_driver_hub.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/usbh_driver_hub.c b/src/usbh_driver_hub.c
index 87f8578..7dc99ea 100644
--- a/src/usbh_driver_hub.c
+++ b/src/usbh_driver_hub.c
@@ -449,13 +449,8 @@ static void event(usbh_device_t *dev, usbh_packet_callback_data_t cb_data)
}
} else {
LOG_PRINTF("\t\t\t\tDISCONNECT EVENT\n");
- if (hub->device[port]->drv && hub->device[port]->drvdata) {
- hub->device[port]->drv->remove(hub->device[port]->drvdata);
- }
- hub->device[port]->address = -1;
+ device_remove(hub->device[port]);
- hub->device[port]->drv = 0;
- hub->device[port]->drvdata = 0;
hub->device[port] = 0;
hub->current_port = CURRENT_PORT_NONE;
hub->state = EVENT_STATE_POLL_REQ;