]> git.baikalelectronics.ru Git - kernel.git/commit
ACPI / button: make module loadable when booted in non-ACPI mode
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Mon, 23 Apr 2018 09:16:56 +0000 (11:16 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 24 Apr 2018 10:47:34 +0000 (12:47 +0200)
commite2e3e9da64fdf6825d4199033ac05d41342ea39d
tree7183d2191203d8d923f122f4b3a9dc3e60c101ca
parent5d30052dd442074c10ab35b64bd53a3dc43cea79
ACPI / button: make module loadable when booted in non-ACPI mode

Modules such as nouveau.ko and i915.ko have a link time dependency on
acpi_lid_open(), and due to its use of acpi_bus_register_driver(),
the button.ko module that provides it is only loadable when booted in
ACPI mode. However, the ACPI button driver can be built into the core
kernel as well, in which case the dependency can always be satisfied,
and the dependent modules can be loaded regardless of whether the
system was booted in ACPI mode or not.

So let's fix this asymmetry by making the ACPI button driver loadable
as a module even if not booted in ACPI mode, so it can provide the
acpi_lid_open() symbol in the same way as when built into the kernel.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
[ rjw: Minor adjustments of comments, whitespace and names. ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/button.c