[PATCH v2 24/27] rust: usb: add __rust_helper to helpers

From: Alice Ryhl
Date: Mon Jan 05 2026 - 07:58:33 EST


This is needed to inline these helpers into Rust code.

Reviewed-by: Boqun Feng <boqun.feng@xxxxxxxxx>
Reviewed-by: Gary Guo <gary@xxxxxxxxxxx>
Signed-off-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>
---
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Cc: linux-usb@xxxxxxxxxxxxxxx
Cc: Daniel Almeida <daniel.almeida@xxxxxxxxxxxxx>
---
rust/helpers/usb.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/rust/helpers/usb.c b/rust/helpers/usb.c
index fb2aad0cbf4d26ac7fb1a3f176ee7a1d30800f92..eff1cf7be3c2d10b7e9248252d354eb8a4fd4c94 100644
--- a/rust/helpers/usb.c
+++ b/rust/helpers/usb.c
@@ -2,7 +2,8 @@

#include <linux/usb.h>

-struct usb_device *rust_helper_interface_to_usbdev(struct usb_interface *intf)
+__rust_helper struct usb_device *
+rust_helper_interface_to_usbdev(struct usb_interface *intf)
{
return interface_to_usbdev(intf);
}

--
2.52.0.351.gbe84eed79e-goog