From: Greg Kroah-Hartman Date: Wed, 8 Oct 2025 12:10:28 +0000 (+0200) Subject: Revert "USB: disable rust bindings from the build for now" X-Git-Tag: v6.19-rc1~63^2~99 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a55e0079258f5c054f469e08c2dc349bbfd1943;p=thirdparty%2Flinux.git 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. Link: https://lore.kernel.org/r/2025100827-divorcee-steadier-b40b@gregkh Signed-off-by: Greg Kroah-Hartman --- diff --git a/rust/bindings/bindings_helper.h b/rust/bindings/bindings_helper.h index 2e43c66635a2c..d6906465e17ed 100644 --- a/rust/bindings/bindings_helper.h +++ b/rust/bindings/bindings_helper.h @@ -80,6 +80,7 @@ #include #include #include +#include #include #include #include diff --git a/rust/helpers/helpers.c b/rust/helpers/helpers.c index 551da6c9b5064..16049d6e713f7 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 3dd7bebe78882..9cf4ca0ae7a1e 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 c376eb899b7aa..c1cc787a9adda 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.