Parcourir la source

Remove exports of interrupt submodule from acpi::platform

I'm not a fan of having all of these types exported from the `platform`
module - it confuses the view in the docs, and this will only become worse
as `platform` grows. Users should access it from the `interrupt` submodule
directly.
Isaac Woods il y a 3 ans
Parent
commit
fdd88add32
3 fichiers modifiés avec 15 ajouts et 25 suppressions
  1. 1 1
      acpi/src/lib.rs
  2. 12 10
      acpi/src/madt.rs
  3. 2 14
      acpi/src/platform/mod.rs

+ 1 - 1
acpi/src/lib.rs

@@ -68,7 +68,7 @@ pub use crate::{
     hpet::HpetInfo,
     madt::MadtError,
     mcfg::PciConfigRegions,
-    platform::{InterruptModel, PlatformInfo},
+    platform::{interrupt::InterruptModel, PlatformInfo},
 };
 pub use rsdp::{
     handler::{AcpiHandler, PhysicalMapping},

+ 12 - 10
acpi/src/madt.rs

@@ -1,18 +1,20 @@
 use crate::{
     platform::{
-        Apic,
-        InterruptModel,
-        InterruptSourceOverride,
-        IoApic,
-        LocalInterruptLine,
-        NmiLine,
-        NmiProcessor,
-        NmiSource,
-        Polarity,
+        interrupt::{
+            Apic,
+            InterruptModel,
+            InterruptSourceOverride,
+            IoApic,
+            LocalInterruptLine,
+            NmiLine,
+            NmiProcessor,
+            NmiSource,
+            Polarity,
+            TriggerMode,
+        },
         Processor,
         ProcessorInfo,
         ProcessorState,
-        TriggerMode,
     },
     sdt::SdtHeader,
     AcpiError,

+ 2 - 14
acpi/src/platform/mod.rs

@@ -1,22 +1,10 @@
 pub mod address;
 pub mod interrupt;
 
-use address::GenericAddress;
-pub use interrupt::{
-    Apic,
-    InterruptModel,
-    InterruptSourceOverride,
-    IoApic,
-    LocalInterruptLine,
-    NmiLine,
-    NmiProcessor,
-    NmiSource,
-    Polarity,
-    TriggerMode,
-};
-
 use crate::{fadt::Fadt, madt::Madt, AcpiError, AcpiHandler, AcpiTables, PowerProfile};
+use address::GenericAddress;
 use alloc::vec::Vec;
+use interrupt::InterruptModel;
 
 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
 pub enum ProcessorState {