aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--rust/bindings/bindings_helper.h1
-rw-r--r--rust/helpers/helpers.c1
-rw-r--r--rust/kernel/lib.rs2
-rw-r--r--samples/rust/Kconfig2
4 files changed, 5 insertions, 1 deletions
diff --git a/rust/bindings/bindings_helper.h b/rust/bindings/bindings_helper.h
index 2e43c66635a2c9..d6906465e17ed5 100644
--- a/rust/bindings/bindings_helper.h
+++ b/rust/bindings/bindings_helper.h
@@ -80,6 +80,7 @@
#include <linux/slab.h>
#include <linux/task_work.h>
#include <linux/tracepoint.h>
+#include <linux/usb.h>
#include <linux/wait.h>
#include <linux/workqueue.h>
#include <linux/xarray.h>
diff --git a/rust/helpers/helpers.c b/rust/helpers/helpers.c
index 551da6c9b5064c..16049d6e713f7d 100644
--- a/rust/helpers/helpers.c
+++ b/rust/helpers/helpers.c
@@ -56,6 +56,7 @@
#include "task.c"
#include "time.c"
#include "uaccess.c"
+#include "usb.c"
#include "vmalloc.c"
#include "wait.c"
#include "workqueue.c"
diff --git a/rust/kernel/lib.rs b/rust/kernel/lib.rs
index 3dd7bebe78882a..9cf4ca0ae7a1ec 100644
--- a/rust/kernel/lib.rs
+++ b/rust/kernel/lib.rs
@@ -138,6 +138,8 @@ pub mod time;
pub mod tracepoint;
pub mod transmute;
pub mod types;
+#[cfg(CONFIG_USB = "y")]
+pub mod usb;
pub mod uaccess;
pub mod workqueue;
pub mod xarray;
diff --git a/samples/rust/Kconfig b/samples/rust/Kconfig
index c376eb899b7aae..c1cc787a9adda9 100644
--- a/samples/rust/Kconfig
+++ b/samples/rust/Kconfig
@@ -107,7 +107,7 @@ config SAMPLE_RUST_DRIVER_PLATFORM
config SAMPLE_RUST_DRIVER_USB
tristate "USB Driver"
- depends on USB = y && BROKEN
+ depends on USB = y
help
This option builds the Rust USB driver sample.