From: Robin Murphy Date: Tue, 5 Apr 2022 13:27:54 +0000 (+0100) Subject: ALSA: emu10k1: Stop using iommu_present() X-Git-Tag: v6.1-rc5~574^2~118 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e7ff672165c081e115aa8dbba52c9f6aa3078ce8;p=platform%2Fkernel%2Flinux-starfive.git ALSA: emu10k1: Stop using iommu_present() iommu_get_domain_for_dev() is already perfectly happy to return NULL if the given device has no IOMMU. Drop the unnecessary check in favour of just handling that condition appropriately. Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/9b506b4a4fe8a7f40aa8bad1aafc82426cf3dd92.1649165210.git.robin.murphy@arm.com Signed-off-by: Takashi Iwai --- diff --git a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_main.c index 86cc1ca..3880f35 100644 --- a/sound/pci/emu10k1/emu10k1_main.c +++ b/sound/pci/emu10k1/emu10k1_main.c @@ -1751,11 +1751,8 @@ static void snd_emu10k1_detect_iommu(struct snd_emu10k1 *emu) emu->iommu_workaround = false; - if (!iommu_present(emu->card->dev->bus)) - return; - domain = iommu_get_domain_for_dev(emu->card->dev); - if (domain && domain->type == IOMMU_DOMAIN_IDENTITY) + if (!domain || domain->type == IOMMU_DOMAIN_IDENTITY) return; dev_notice(emu->card->dev,