mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/7] rust: treewide: remove driver unbind callbacks
@ 2026-11-12  0:52 Danilo Krummrich
  2026-11-12  0:52 ` [PATCH 1/7] rust: pci: remove the unbind() callback Danilo Krummrich
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Danilo Krummrich @ 2026-11-12  0:52 UTC (permalink / raw)
  To: gregkh, rafael, dakr, johan, david.m.ertman, iweiny, leon, ojeda,
	boqun, gary, bjorn3_gh, lossin, a.hindborg, aliceryhl, tmgross,
	daniel.almeida, tamird, acourbot, work, igor.korotin, bhelgaas,
	kwilczynski, markus.probst
  Cc: driver-core, rust-for-linux, linux-kernel, linux-pci,
	linux-serial, linux-usb

The driver model uses native Rust lifetimes, allowing driver data to
retain device resources and a bound device reference for use in its
destructor. Separate teardown callbacks are therefore no longer needed.

Remove unbind() from the PCI, platform, auxiliary, serdev and I2C driver
traits, and disconnect() from the USB driver trait. Move the affected
sample teardown into destructors and update the driver documentation.

Danilo Krummrich (7):
  rust: pci: remove the unbind() callback
  rust: platform: remove the unbind() callback
  rust: auxiliary: remove the unbind() callback
  rust: serdev: remove the unbind() callback
  rust: i2c: remove the unbind() callback
  rust: usb: remove the disconnect() callback
  rust: driver: document teardown through destructors

 rust/kernel/auxiliary.rs        | 34 ++++-----------------------
 rust/kernel/driver.rs           | 18 ++++++---------
 rust/kernel/i2c.rs              | 31 ++++---------------------
 rust/kernel/pci.rs              | 34 ++++-----------------------
 rust/kernel/platform.rs         | 34 ++++-----------------------
 rust/kernel/serdev.rs           | 41 ++++-----------------------------
 rust/kernel/usb.rs              | 36 +++++------------------------
 samples/rust/rust_driver_i2c.rs | 18 ++++++++++-----
 samples/rust/rust_driver_pci.rs |  7 ++----
 samples/rust/rust_driver_usb.rs | 11 +++++----
 samples/rust/rust_i2c_client.rs | 12 +++++-----
 11 files changed, 59 insertions(+), 217 deletions(-)


base-commit: de7625abe4e92f1fb0047ed5f163b2ecaba77e50
-- 
2.56.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-11-12  9:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-12  0:52 [PATCH 0/7] rust: treewide: remove driver unbind callbacks Danilo Krummrich
2026-11-12  0:52 ` [PATCH 1/7] rust: pci: remove the unbind() callback Danilo Krummrich
2026-11-12  0:52 ` [PATCH 2/7] rust: platform: " Danilo Krummrich
2026-11-12  0:52 ` [PATCH 3/7] rust: auxiliary: " Danilo Krummrich
2026-11-12  0:52 ` [PATCH 4/7] rust: serdev: " Danilo Krummrich
2026-11-12  0:52 ` [PATCH 5/7] rust: i2c: " Danilo Krummrich
2026-11-12  0:53 ` [PATCH 6/7] rust: usb: remove the disconnect() callback Danilo Krummrich
2026-11-12  0:53 ` [PATCH 7/7] rust: driver: document teardown through destructors Danilo Krummrich
2026-11-12  9:47 ` [PATCH 0/7] rust: treewide: remove driver unbind callbacks Gary Guo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®