do not check if device is closed

This commit is contained in:
sakimisu
2023-02-07 22:54:51 +08:00
parent f99e03c850
commit 3fa3f3e356
2 changed files with 1 additions and 9 deletions

View File

@@ -126,10 +126,6 @@ int usbh_audio_close(struct usbh_audio *audio_class, const char *name)
uint8_t intf = 0xff; uint8_t intf = 0xff;
uint8_t altsetting = 1; uint8_t altsetting = 1;
if (audio_class->is_opened == false) {
return 0;
}
for (size_t i = 0; i < audio_class->module_num; i++) { for (size_t i = 0; i < audio_class->module_num; i++) {
if (strcmp(name, audio_class->module[i].name) == 0) { if (strcmp(name, audio_class->module[i].name) == 0) {
intf = audio_class->module[i].data_intf; intf = audio_class->module[i].data_intf;

View File

@@ -251,10 +251,6 @@ int usbh_video_close(struct usbh_video *video_class)
USB_LOG_INFO("Close video device\r\n"); USB_LOG_INFO("Close video device\r\n");
if (video_class->is_opened == false) {
return 0;
}
video_class->is_opened = false; video_class->is_opened = false;
if (video_class->isoin) { if (video_class->isoin) {