ACPI: scan: Simplify initialization of power and sleep buttons
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 11 Jan 2022 16:52:00 +0000 (17:52 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 12 Jan 2022 14:58:49 +0000 (15:58 +0100)
commit681e7187aef46f8d4e0fd0ddd2f888e3e5533cb2
treec1c6699087391f4f377bdbf27634370d4baef3e7
parentb6c55b162bcee62c43c18e59f38a4590be543032
ACPI: scan: Simplify initialization of power and sleep buttons

It should be perfectly fine to use ACPI if the "fixed" power or sleep
buttons cannot be initialized.  Moreover, running acpi_bus_scan()
successfully on ACPI_ROOT_OBJECT generally causes many devices to
be enumerated and probed, possibly including the entire PCI bus, so
unregistering acpi_root if the registration of the "fixed" buttons
fails is rather unhelpful.

For this reason, do not fail acpi_scan_init() when
acpi_bus_scan_fixed() fails and turn the latter into a void function.

While at it, drop the outdated and misleading comment from
acpi_bus_scan_fixed().

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
drivers/acpi/scan.c