]> git.ipfire.org Git - thirdparty/linux.git/commit
rust: device: add device name method
authorTimur Tabi <ttabi@nvidia.com>
Thu, 19 Mar 2026 21:26:53 +0000 (16:26 -0500)
committerDanilo Krummrich <dakr@kernel.org>
Tue, 24 Mar 2026 22:51:23 +0000 (23:51 +0100)
commitd35ae50c5f48dfcd33cb24bf477ce912fa0af1f7
tree66e7e187b53b5541fdce788b7a1b4e810b71e1b6
parent651c27d6a7e2b92eb30f56738dc45e861c975921
rust: device: add device name method

Add a name() method to the `Device` type, which returns a CStr that
contains the device name.

Signed-off-by: Timur Tabi <ttabi@nvidia.com>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Tested-by: John Hubbard <jhubbard@nvidia.com>
Tested-by: Eliot Courtney <ecourtney@nvidia.com>
Link: https://patch.msgid.link/20260319212658.2541610-2-ttabi@nvidia.com
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
rust/helpers/device.c
rust/kernel/device.rs