Thread (8 messages) flat view 8 messages, 2 authors, 1d ago

Re: [PATCH v25 2/4] rust: leds: add Mode trait

From: Markus Probst <markus.probst@posteo.de>
Date: 2026-09-13 16:24:11
Also in: linux-leds, linux-pci, lkml

On Sun, 2026-09-13 at 16:15 +0000, Markus Probst wrote:
quoted hunk ↗ jump to hunk
Add the `led::Mode` trait to allow for other types of led class devices
in `led::LedOps`.

Signed-off-by: Markus Probst <markus.probst@posteo.de>
---
 rust/kernel/led.rs        | 37 ++++++++++++++++++++++++++-----------
 rust/kernel/led/normal.rs | 12 ++++++++++--
 2 files changed, 36 insertions(+), 13 deletions(-)
diff --git a/rust/kernel/led.rs b/rust/kernel/led.rs
index deda8cc548a8..7cd8f0504649 100644
--- a/rust/kernel/led.rs
+++ b/rust/kernel/led.rs
@@ -4,11 +4,7 @@
 //!
 //! C header: [`include/linux/leds.h`](srctree/include/linux/leds.h)
 
-use core::{
-    marker::PhantomData,
-    mem::transmute,
-    ptr::NonNull, //
-};
+use core::{marker::PhantomData, mem::transmute, ops::Deref, ptr::NonNull};
supposed to be vertical.

Thanks
- Markus Probst

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help