aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/utils.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2021-04-07 19:58:20 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2021-04-08 19:50:12 +0200
commit8eb99e9a64a07ea08070591bdc2615526a103e62 (patch)
treee7b14a4d75f6884aca4f78fb352a550d1ed24167 /drivers/acpi/utils.c
parentLinux 5.12-rc6 (diff)
downloadlinux-dev-8eb99e9a64a07ea08070591bdc2615526a103e62.tar.xz
linux-dev-8eb99e9a64a07ea08070591bdc2615526a103e62.zip
ACPI: utils: Add acpi_reduced_hardware() helper
Add a getter for the acpi_gbl_reduced_hardware variable so that modules can check if they are running on an ACPI reduced-hw platform or not. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/utils.c')
-rw-r--r--drivers/acpi/utils.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c
index 682edd913b3b..b20774c48c74 100644
--- a/drivers/acpi/utils.c
+++ b/drivers/acpi/utils.c
@@ -872,6 +872,17 @@ acpi_dev_get_first_match_dev(const char *hid, const char *uid, s64 hrv)
}
EXPORT_SYMBOL(acpi_dev_get_first_match_dev);
+/**
+ * acpi_reduced_hardware - Return if this is an ACPI-reduced-hw machine
+ *
+ * Return true when running on an ACPI-reduced-hw machine, false otherwise.
+ */
+bool acpi_reduced_hardware(void)
+{
+ return acpi_gbl_reduced_hardware;
+}
+EXPORT_SYMBOL_GPL(acpi_reduced_hardware);
+
/*
* acpi_backlight= handling, this is done here rather then in video_detect.c
* because __setup cannot be used in modules.