]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
rust: driver: add DEVICE_DRIVER_OFFSET to the DriverLayout trait
authorDanilo Krummrich <dakr@kernel.org>
Wed, 7 Jan 2026 10:35:03 +0000 (11:35 +0100)
committerDanilo Krummrich <dakr@kernel.org>
Fri, 16 Jan 2026 00:17:29 +0000 (01:17 +0100)
commitc1d4519e1c36ffa01973e23af4502e69dcd84f39
tree26e7f83683b1feefa4a9606cdde88143bffc770f
parent0af1a9e4629a85964a7eebe58ebd2ca37c8c21fc
rust: driver: add DEVICE_DRIVER_OFFSET to the DriverLayout trait

Add an associated const DEVICE_DRIVER_OFFSET to the DriverLayout trait
indicating the offset of the embedded struct device_driver within
Self::DriverType, i.e. the specific driver structs, such as struct
pci_driver or struct platform_driver.

Acked-by: Alice Ryhl <aliceryhl@google.com>
Acked-by: Igor Korotin <igor.korotin.linux@gmail.com>
Link: https://patch.msgid.link/20260107103511.570525-5-dakr@kernel.org
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