]> git.ipfire.org Git - thirdparty/linux.git/commit
rust: auxiliary: unregister on parent device unbind
authorDanilo Krummrich <dakr@kernel.org>
Mon, 20 Oct 2025 22:34:26 +0000 (00:34 +0200)
committerDanilo Krummrich <dakr@kernel.org>
Wed, 29 Oct 2025 17:29:32 +0000 (18:29 +0100)
commite4e679c8608e5c747081cc6ce63ee0b0e524c68d
treeba5c0a8dbb8abd3efae0bab5de059bc69c2b2e75
parent589b061975db3c7e87b819cc9a8006eb99ac4b5f
rust: auxiliary: unregister on parent device unbind

Guarantee that an auxiliary driver will be unbound before its parent is
unbound; there is no point in operating an auxiliary device whose parent
has been unbound.

In practice, this guarantee allows us to assume that for a bound
auxiliary device, also the parent device is bound.

This is useful when an auxiliary driver calls into its parent, since it
allows the parent to directly access device resources and its device
private data due to the guaranteed bound device context.

Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
drivers/gpu/nova-core/driver.rs
rust/kernel/auxiliary.rs
samples/rust/rust_driver_auxiliary.rs