From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: rust-for-linux@vger.kernel.org, linux-usb@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: [PATCH] Revert "USB: disable rust bindings from the build for now"
Date: Wed, 8 Oct 2025 14:10:28 +0200 [thread overview]
Message-ID: <2025100827-divorcee-steadier-b40b@gregkh> (raw)
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.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
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(-)
diff --git a/rust/bindings/bindings_helper.h b/rust/bindings/bindings_helper.h
index 04b75d4d01c3..ee2264df562e 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 551da6c9b506..16049d6e713f 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 3dd7bebe7888..9cf4ca0ae7a1 100644
--- a/rust/kernel/lib.rs
+++ b/rust/kernel/lib.rs
@@ -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;
diff --git a/samples/rust/Kconfig b/samples/rust/Kconfig
index c376eb899b7a..c1cc787a9add 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.
--
2.51.0
reply other threads:[~2025-10-08 12:10 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2025100827-divorcee-steadier-b40b@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=rust-for-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.