]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
rust: driver: introduce a DriverLayout trait
authorDanilo Krummrich <dakr@kernel.org>
Wed, 7 Jan 2026 10:35:02 +0000 (11:35 +0100)
committerDanilo Krummrich <dakr@kernel.org>
Fri, 16 Jan 2026 00:16:44 +0000 (01:16 +0100)
commit0af1a9e4629a85964a7eebe58ebd2ca37c8c21fc
tree1e29b5527f924d339ccb5ffaa3416c8f80f51037
parent5f4476e98387618ce22bb93fb5c11142827458ec
rust: driver: introduce a DriverLayout trait

The DriverLayout trait describes the layout of a specific driver
structure, such as `struct pci_driver` or `struct platform_driver`.

In a first step, this replaces the associated type RegType of the
RegistrationOps with the DriverLayout::DriverType associated type.

Acked-by: Alice Ryhl <aliceryhl@google.com>
Acked-by: Igor Korotin <igor.korotin.linux@gmail.com>
Link: https://patch.msgid.link/20260107103511.570525-4-dakr@kernel.org
[ Rename driver::Driver to driver::DriverLayout, as it represents the
  layout of a driver structure rather than the driver structure itself.
  - Danilo ]
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
rust/kernel/auxiliary.rs
rust/kernel/driver.rs
rust/kernel/i2c.rs
rust/kernel/pci.rs
rust/kernel/platform.rs
rust/kernel/usb.rs