summaryrefslogtreecommitdiff
path: root/Kernel/ACPI/ACPIParser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Kernel/ACPI/ACPIParser.cpp')
-rw-r--r--Kernel/ACPI/ACPIParser.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/Kernel/ACPI/ACPIParser.cpp b/Kernel/ACPI/ACPIParser.cpp
index c17a6366b7..f72d49176c 100644
--- a/Kernel/ACPI/ACPIParser.cpp
+++ b/Kernel/ACPI/ACPIParser.cpp
@@ -29,24 +29,19 @@
namespace Kernel {
namespace ACPI {
+
static Parser* s_acpi_parser;
Parser& Parser::the()
{
- ASSERT(s_acpi_parser != nullptr);
+ ASSERT(s_acpi_parser);
return *s_acpi_parser;
}
-void Parser::initialize_limited()
-{
- if (!Parser::is_initialized()) {
- s_acpi_parser = new Parser(false);
- }
-}
-
-bool Parser::is_initialized()
+void Parser::set_the(Parser& parser)
{
- return (s_acpi_parser != nullptr);
+ ASSERT(!s_acpi_parser);
+ s_acpi_parser = &parser;
}
Parser::Parser(bool usable)
@@ -56,7 +51,6 @@ Parser::Parser(bool usable)
} else {
klog() << "ACPI: Limited Initialization. Vital functions are disabled by a request";
}
- s_acpi_parser = this;
}
PhysicalAddress Parser::find_table(const char*)