BACKPORT: rust: miscdevice: change how f_ops vtable is constructed
I was helping someone with writing a new Rust abstraction, and we were using the miscdevice abstraction as an example. While doing this, it became clear to me that the way I implemented the f_ops vtable is confusing to new Rust users, and that the approach used by the block abstractions is less confusing. Thus, update the miscdevice abstractions to use the same approach as rust/kernel/block/mq/operations.rs. Sorry about the large diff. This changes the indentation of a large amount of code. Reviewed-by:Christian Schrefl <chrisi.schrefl@gmail.com> Signed-off-by:
Alice Ryhl <aliceryhl@google.com> Link: https://lore.kernel.org/r/20250227-miscdevice-fops-change-v1-1-c9e9b75d67eb@google.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Bug: 429146594 [ aliceryhl: also adjust llseek and similar to new style ] (cherry picked from commit 74fc3493) Change-Id: Ie87c5015d483a4c5a27ab17ae8a836a8956d1092 Signed-off-by:
Alice Ryhl <aliceryhl@google.com>
Loading
Please sign in to comment