Lines Matching defs:adev
348 struct acpi_device *adev;
397 adev = acpi_bus_get_acpi_device(handle);
398 if (!adev)
401 driver = adev->driver;
404 driver->ops.notify(adev, type);
407 acpi_bus_put_acpi_device(adev);
411 if (ACPI_SUCCESS(acpi_hotplug_schedule(adev, type)))
414 acpi_bus_put_acpi_device(adev);
535 * @adev: ACPI device in question
537 * Return: First physical node of ACPI device @adev
539 struct device *acpi_get_first_physical_node(struct acpi_device *adev)
541 struct mutex *physical_node_lock = &adev->physical_node_lock;
545 if (list_empty(&adev->physical_node_list)) {
550 node = list_first_entry(&adev->physical_node_list,
560 static struct acpi_device *acpi_primary_dev_companion(struct acpi_device *adev,
563 const struct device *phys_dev = acpi_get_first_physical_node(adev);
565 return phys_dev && phys_dev == dev ? adev : NULL;
570 * @adev: ACPI companion device
577 * Note that the caller have to provide valid @adev pointer.
579 bool acpi_device_is_first_physical_node(struct acpi_device *adev,
582 return !!acpi_primary_dev_companion(adev, dev);
608 struct acpi_device *adev;
610 adev = ACPI_COMPANION(dev);
611 if (!adev)
614 if (list_empty(&adev->pnp.ids))
617 return acpi_primary_dev_companion(adev, dev);
622 * @adev: ACPI device object to match.
630 static bool acpi_of_match_device(struct acpi_device *adev,
637 if (!adev)
640 of_compatible = adev->data.of_compatible;
666 static bool acpi_of_modalias(struct acpi_device *adev,
673 of_compatible = adev->data.of_compatible;
691 * @adev: ACPI device object to match
697 * If there is a compatible string for @adev, it will be copied to @modalias
700 void acpi_set_modalias(struct acpi_device *adev, const char *default_id,
703 if (!acpi_of_modalias(adev, modalias, len))
796 struct acpi_device *adev = ACPI_COMPANION(dev);
799 if (!acpi_of_match_device(adev, dev->driver->of_match_table, &match))