@@ -79,8 +79,6 @@ struct device_s {
7979 // Assigned on device allocation and remain constant for the device's lifetime
8080 hcd_pipe_handle_t default_pipe ; /**< Pipe handle for Control EP0 */
8181 hcd_port_handle_t port_hdl ; /**< HCD port handle */
82- usb_device_handle_t parent_dev_hdl ; /**< Device's parent device handle. NULL if device is connected to the root port */
83- uint8_t parent_port_num ; /**< Device's parent port number. 0 if device connected to the root port */
8482 usb_speed_t speed ; /**< Device's speed */
8583 unsigned int uid ; /**< Device's Unique ID */
8684 /*
@@ -388,8 +386,6 @@ static esp_err_t device_alloc(usbh_dev_params_t *params, device_t **dev_obj_ret)
388386 dev_obj -> dynamic .state = USB_DEVICE_STATE_DEFAULT ;
389387 dev_obj -> constant .default_pipe = default_pipe_hdl ;
390388 dev_obj -> constant .port_hdl = params -> root_port_hdl ;
391- dev_obj -> constant .parent_dev_hdl = params -> parent_dev_hdl ;
392- dev_obj -> constant .parent_port_num = params -> parent_port_num ;
393389 dev_obj -> constant .speed = params -> speed ;
394390 dev_obj -> constant .uid = params -> uid ;
395391 // Note: Enumeration related dev_obj->constant fields are initialized later using usbh_dev_set_...() functions
@@ -587,8 +583,6 @@ static inline void handle_free(device_t *dev_obj)
587583{
588584 // Cache a copy of the device's address as we are about to free the device object
589585 const unsigned int dev_uid = dev_obj -> constant .uid ;
590- usb_device_handle_t parent_dev_hdl = dev_obj -> constant .parent_dev_hdl ;
591- const uint8_t parent_port_num = dev_obj -> constant .parent_port_num ;
592586 bool all_free ;
593587 ESP_LOGD (USBH_TAG , "Freeing device %d" , dev_obj -> constant .address );
594588
@@ -613,8 +607,6 @@ static inline void handle_free(device_t *dev_obj)
613607 .event = USBH_EVENT_DEV_FREE ,
614608 .dev_free_data = {
615609 .dev_uid = dev_uid ,
616- .parent_dev_hdl = parent_dev_hdl ,
617- .port_num = parent_port_num ,
618610 }
619611 };
620612 p_usbh_obj -> constant .event_cb (& event_data , p_usbh_obj -> constant .event_cb_arg );
0 commit comments