[PATCH v3 1/7] ACPI: Add acpi_device_clear_dep() helper function
Marc Zyngier
maz at kernel.org
Thu Jul 2 14:27:35 PDT 2026
On Wed, 01 Jul 2026 15:38:49 +0100,
Lorenzo Pieralisi <lpieralisi at kernel.org> wrote:
>
> Code clearing device dependencies in ACPI in drivers through
>
> acpi_dev_clear_dependencies()
>
> requires annoying ifdeffery to make sure it is compiled out on
> !CONFIG_ACPI configurations.
>
> Implement a wrapper function to clear device dependencies that can be used
> in device drivers without conditional compilation.
>
> Signed-off-by: Lorenzo Pieralisi <lpieralisi at kernel.org>
> Cc: "Rafael J. Wysocki" <rafael at kernel.org>
> ---
> include/linux/acpi.h | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/include/linux/acpi.h b/include/linux/acpi.h
> index 10d6c6c11bdf..4f950f5386d7 100644
> --- a/include/linux/acpi.h
> +++ b/include/linux/acpi.h
> @@ -94,6 +94,12 @@ static inline void acpi_preset_companion(struct device *dev,
> ACPI_COMPANION_SET(dev, acpi_find_child_device(parent, addr, false));
> }
>
> +static inline void acpi_device_clear_dep(struct device *dev)
uber nit: "clear_dep" is singular, while "clear_dependencies" is
obviously plural. acpi_device_clear_deps() would look slightly
clearer.
That's my useless comment of the evening.
M.
--
Jazz isn't dead. It just smells funny.
More information about the linux-arm-kernel
mailing list