From 000ea484cd58164661277bb513c664a57770848d Mon Sep 17 00:00:00 2001 From: David Gow Date: Mon, 9 May 2022 22:14:22 +0800 Subject: [PATCH] rust: Hide irq::Domain behind CONFIG_IRQ_DOMAIN IRQ domains are not supported under all architectures, so hide the Domain struct (and its implementation) behind CONFIG_IRQ_DOMAIN. This is required for CONFIG_RUST to build and run under UML. Signed-off-by: David Gow --- rust/kernel/irq.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rust/kernel/irq.rs b/rust/kernel/irq.rs index ca62849a5dc066..b1d067de69258d 100644 --- a/rust/kernel/irq.rs +++ b/rust/kernel/irq.rs @@ -352,10 +352,12 @@ impl Drop for ChainedGuard<'_> { /// # Invariants /// /// The pointer `Domain::ptr` is non-null and valid. +#[cfg(CONFIG_IRQ_DOMAIN)] pub struct Domain { ptr: *mut bindings::irq_domain, } +#[cfg(CONFIG_IRQ_DOMAIN)] impl Domain { /// Constructs a new `struct irq_domain` wrapper. ///