On Tue, Mar 13, 2018 at 04:22:53AM +0000, Nipun Gupta wrote: > > Isn't this one or the other one but not both? > > > > Something like: > > > > if (dev->of_node) > > of_dma_deconfigure(dev); > > else > > acpi_dma_deconfigure(dev); > > > > should work. > > I understand your point. Seems reasonable as we should not expect > the 'of/acpi DMA deconfigure' API to not fail when they are not configured. > > But, here we would also need to get dma_device (just as we get in > 'pci_dma_configure') and need a check on it as for PCI there 'of_node' > is present in the dma_dev.
Both of_dma_deconfigure and acpi_dma_deconfigure just end up calling arch_teardown_dma_ops. So my preference would be to just remove of_dma_deconfigure and acpi_dma_deconfigure and call arch_teardown_dma_ops as a prep patch before this one. _______________________________________________ iommu mailing list firstname.lastname@example.org https://lists.linuxfoundation.org/mailman/listinfo/iommu