Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

xhci: Use device_iommu_mapped()

Replace the dev->iommu_group check with a proper function
call that better reprensents its purpose.

Cc: Mathias Nyman <mathias.nyman@intel.com>
Acked-by: Robin Murphy <robin.murphy@arm.com>
Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>

+1 -1
+1 -1
drivers/usb/host/xhci.c
··· 244 244 * an iommu. Doing anything when there is no iommu is definitely 245 245 * unsafe... 246 246 */ 247 - if (!(xhci->quirks & XHCI_ZERO_64B_REGS) || !dev->iommu_group) 247 + if (!(xhci->quirks & XHCI_ZERO_64B_REGS) || !device_iommu_mapped(dev)) 248 248 return; 249 249 250 250 xhci_info(xhci, "Zeroing 64bit base registers, expecting fault\n");