Loading sound/usb/usb_audio_qmi_svc.c +14 −22 Original line number Original line Diff line number Diff line Loading @@ -856,6 +856,18 @@ static void uaudio_dev_intf_cleanup(struct usb_device *udev, info->in_use = false; info->in_use = false; } } static void uaudio_event_ring_cleanup_free(struct uaudio_dev *dev) { clear_bit(dev->card_num, &uaudio_qdev->card_slot); /* all audio devices are disconnected */ if (!uaudio_qdev->card_slot) { uaudio_iommu_unmap(MEM_EVENT_RING, IOVA_BASE, PAGE_SIZE, PAGE_SIZE); xhci_sec_event_ring_cleanup(dev->udev, uaudio_qdev->intr_num); uaudio_dbg("all audio devices disconnected\n"); } } static void uaudio_dev_cleanup(struct uaudio_dev *dev) static void uaudio_dev_cleanup(struct uaudio_dev *dev) { { int if_idx; int if_idx; Loading @@ -879,17 +891,7 @@ static void uaudio_dev_cleanup(struct uaudio_dev *dev) /* free interface info */ /* free interface info */ kfree(dev->info); kfree(dev->info); dev->info = NULL; dev->info = NULL; uaudio_event_ring_cleanup_free(dev); clear_bit(dev->card_num, &uaudio_qdev->card_slot); /* all audio devices are disconnected */ if (!uaudio_qdev->card_slot) { uaudio_iommu_unmap(MEM_EVENT_RING, IOVA_BASE, PAGE_SIZE, PAGE_SIZE); xhci_sec_event_ring_cleanup(dev->udev, uaudio_qdev->intr_num); uaudio_dbg("all audio devices disconnected\n"); } dev->udev = NULL; dev->udev = NULL; } } Loading Loading @@ -961,17 +963,7 @@ static void uaudio_dev_release(struct kref *kref) uaudio_dbg("for dev %pK\n", dev); uaudio_dbg("for dev %pK\n", dev); atomic_set(&dev->in_use, 0); atomic_set(&dev->in_use, 0); uaudio_event_ring_cleanup_free(dev); clear_bit(dev->card_num, &uaudio_qdev->card_slot); /* all audio devices are disconnected */ if (!uaudio_qdev->card_slot) { xhci_sec_event_ring_cleanup(dev->udev, uaudio_qdev->intr_num); uaudio_iommu_unmap(MEM_EVENT_RING, IOVA_BASE, PAGE_SIZE, PAGE_SIZE); uaudio_dbg("all audio devices disconnected\n"); } wake_up(&dev->disconnect_wq); wake_up(&dev->disconnect_wq); } } Loading Loading
sound/usb/usb_audio_qmi_svc.c +14 −22 Original line number Original line Diff line number Diff line Loading @@ -856,6 +856,18 @@ static void uaudio_dev_intf_cleanup(struct usb_device *udev, info->in_use = false; info->in_use = false; } } static void uaudio_event_ring_cleanup_free(struct uaudio_dev *dev) { clear_bit(dev->card_num, &uaudio_qdev->card_slot); /* all audio devices are disconnected */ if (!uaudio_qdev->card_slot) { uaudio_iommu_unmap(MEM_EVENT_RING, IOVA_BASE, PAGE_SIZE, PAGE_SIZE); xhci_sec_event_ring_cleanup(dev->udev, uaudio_qdev->intr_num); uaudio_dbg("all audio devices disconnected\n"); } } static void uaudio_dev_cleanup(struct uaudio_dev *dev) static void uaudio_dev_cleanup(struct uaudio_dev *dev) { { int if_idx; int if_idx; Loading @@ -879,17 +891,7 @@ static void uaudio_dev_cleanup(struct uaudio_dev *dev) /* free interface info */ /* free interface info */ kfree(dev->info); kfree(dev->info); dev->info = NULL; dev->info = NULL; uaudio_event_ring_cleanup_free(dev); clear_bit(dev->card_num, &uaudio_qdev->card_slot); /* all audio devices are disconnected */ if (!uaudio_qdev->card_slot) { uaudio_iommu_unmap(MEM_EVENT_RING, IOVA_BASE, PAGE_SIZE, PAGE_SIZE); xhci_sec_event_ring_cleanup(dev->udev, uaudio_qdev->intr_num); uaudio_dbg("all audio devices disconnected\n"); } dev->udev = NULL; dev->udev = NULL; } } Loading Loading @@ -961,17 +963,7 @@ static void uaudio_dev_release(struct kref *kref) uaudio_dbg("for dev %pK\n", dev); uaudio_dbg("for dev %pK\n", dev); atomic_set(&dev->in_use, 0); atomic_set(&dev->in_use, 0); uaudio_event_ring_cleanup_free(dev); clear_bit(dev->card_num, &uaudio_qdev->card_slot); /* all audio devices are disconnected */ if (!uaudio_qdev->card_slot) { xhci_sec_event_ring_cleanup(dev->udev, uaudio_qdev->intr_num); uaudio_iommu_unmap(MEM_EVENT_RING, IOVA_BASE, PAGE_SIZE, PAGE_SIZE); uaudio_dbg("all audio devices disconnected\n"); } wake_up(&dev->disconnect_wq); wake_up(&dev->disconnect_wq); } } Loading