]> www.infradead.org Git - users/jedix/linux-maple.git/commit
samples: rust: convert PCI rust sample driver to use try_access_with()
authorAlexandre Courbot <acourbot@nvidia.com>
Fri, 11 Apr 2025 12:09:39 +0000 (21:09 +0900)
committerDanilo Krummrich <dakr@kernel.org>
Tue, 22 Apr 2025 15:21:16 +0000 (17:21 +0200)
commit0c848b3adb45acc1722f94333e2a97bf1720e431
tree3bea773d26d30c7c646b7d71332baa1ab31dded9
parent80e62fcea4f3ce8c7cc3205d7543e532b255d322
samples: rust: convert PCI rust sample driver to use try_access_with()

This method limits the scope of the revocable guard and is considered
safer to use for most cases, so let's showcase it here.

Reviewed-by: Benno Lossin <benno.lossin@proton.me>
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Acked-by: Miguel Ojeda <ojeda@kernel.org>
Link: https://lore.kernel.org/r/20250411-try_with-v4-2-f470ac79e2e2@nvidia.com
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
samples/rust/rust_driver_pci.rs