aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/emu10k1/emu10k1_main.c
diff options
context:
space:
mode:
authorRobin Murphy <robin.murphy@arm.com>2022-04-05 14:27:54 +0100
committerTakashi Iwai <tiwai@suse.de>2022-04-05 18:17:24 +0200
commite7ff672165c081e115aa8dbba52c9f6aa3078ce8 (patch)
tree5069c61c4501fedaa4050244e1ece9558d2ee076 /sound/pci/emu10k1/emu10k1_main.c
parentbc55cfd5718c7c23e5524582e9fa70b4d10f2433 (diff)
downloadlinux-e7ff672165c081e115aa8dbba52c9f6aa3078ce8.tar.gz
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 <robin.murphy@arm.com> Link: https://lore.kernel.org/r/9b506b4a4fe8a7f40aa8bad1aafc82426cf3dd92.1649165210.git.robin.murphy@arm.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/emu10k1/emu10k1_main.c')
-rw-r--r--sound/pci/emu10k1/emu10k1_main.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_main.c
index 86cc1ca025e40..3880f359e6889 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,