mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
ACPI: Introduce has_acpi_companion()
Now that the ACPI companions of devices are represented by pointers to struct fwnode_handle, it is not quite efficient to check whether or not an ACPI companion of a device is present by evaluating the ACPI_COMPANION() macro. For this reason, introduce a special static inline routine for that, has_acpi_companion(), and update the code to use it where applicable. Signed-off-by: Rafael J. Wysocki <[email protected]>
This commit is contained in:
parent
ce793486e2
commit
ca5b74d267
4 changed files with 15 additions and 5 deletions
|
|
@ -684,7 +684,7 @@ static struct intel_iommu *device_to_iommu(struct device *dev, u8 *bus, u8 *devf
|
|||
if (dev_is_pci(dev)) {
|
||||
pdev = to_pci_dev(dev);
|
||||
segment = pci_domain_nr(pdev->bus);
|
||||
} else if (ACPI_COMPANION(dev))
|
||||
} else if (has_acpi_companion(dev))
|
||||
dev = &ACPI_COMPANION(dev)->dev;
|
||||
|
||||
rcu_read_lock();
|
||||
|
|
|
|||
Loading…
Reference in a new issue