Skip to contentSkip to conversation

Revert "USB: disable rust bindings from the build for now"

PATCH New Greg Kroah-Hartman 1 participant 1 message Oct 8, 2025

Subsystems (2)
lore
Share & tools
lore

Greg Kroah-Hartman

author maintainer
#0 lore raw

PATCH 1/1 Revert "USB: disable rust bindings from the build for now"

This reverts commit c584a1c7c8a192c13637bc51c7b63a9f15fe6474.

It brings the rust bindings for USB back into the build so that we can work off of this for future kernel releases.

---
 rust/bindings/bindings_helper.h | 1 +
 rust/helpers/helpers.c          | 1 +
 rust/kernel/lib.rs              | 2 ++
 samples/rust/Kconfig            | 2 +-
 4 files changed, 5 insertions(+), 1 deletion(-)
rust/bindings/bindings_helper.h +1 -0
index 04b75d4d01c3..ee2264df562e 100644
@@ -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>
rust/helpers/helpers.c +1 -0
index 551da6c9b506..16049d6e713f 100644
@@ -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"
rust/kernel/lib.rs +2 -0
index 3dd7bebe7888..9cf4ca0ae7a1 100644
@@ -138,6 +138,8 @@
 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;
samples/rust/Kconfig +1 -1
index c376eb899b7a..c1cc787a9add 100644
@@ -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.
 
Signature · 1 line
2.51.0