]> www.infradead.org Git - users/jedix/linux-maple.git/commit
rust: miscdevice: change how f_ops vtable is constructed
authorAlice Ryhl <aliceryhl@google.com>
Thu, 27 Feb 2025 13:22:31 +0000 (13:22 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Mar 2025 17:20:36 +0000 (18:20 +0100)
commit74fc34937d72d04e89e4f75ea66147cdc9b785f5
tree69f843d944991c1fc155d3d7a427bfdc2978df97
parent264ff8415aed324584acc85740596f6e1df7b663
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>
rust/kernel/miscdevice.rs