[PATCH v1 01/17] ACPI: bus: Use acpi/acpi_bus.h without CONFIG_ACPI
Sudeep Holla
sudeep.holla at kernel.org
Tue Sep 22 02:50:57 PDT 2026
On Mon, Sep 21, 2026 at 09:45:59PM +0200, Rafael J. Wysocki wrote:
> From: "Rafael J. Wysocki" <rafael.j.wysocki at intel.com>
>
> Corrently acpi/acpi_bus.h is included in linux/acpi.h only if
> CONFIG_ACPI is set, but it contains declarations that are useful
> otherwise too.
>
> For consistency, modify linux/acpi.h to always include acpi/acpi_bus.h
> and update the latter to avoid exposing too much when CONFIG_ACPI is
> not set.
>
> Since acpi_has_method() is called from some code build when
> CONFIG_ACPI is unset, add a stub for it to the !CONFIG_ACPI
> block in acpi/acpi_bus.h.
>
Reviewed-by: Sudeep Holla <sudeep.holla at kernel.org>
I was planning to just pull acpi_device_hid() out so that I can get rid
of CONFIG_ACPI in [1]. This looks much more elegant. Thanks for doing it.
--
Regards,
Sudeep
[1] https://lore.kernel.org/all/20260915-acpi_scmi_pcc-v5-4-298579e9f359@kernel.org
More information about the linux-arm-kernel
mailing list