summaryrefslogtreecommitdiff
path: root/include/linux/errqueue.h
diff options
context:
space:
mode:
authorDanilo Krummrich <dakr@kernel.org>2026-05-05 18:23:09 +0300
committerDanilo Krummrich <dakr@kernel.org>2026-05-11 16:26:12 +0300
commit95ade775c4ab9b9b3d7cfa2d45283e93fbfa4e7a (patch)
tree9bdc9f86bb1966ff13d0734bc3e9a2548e7bcdb6 /include/linux/errqueue.h
parentfd3b87ff0232f46e1ad53a48609a3853c8757c6c (diff)
downloadlinux-95ade775c4ab9b9b3d7cfa2d45283e93fbfa4e7a.tar.xz
rust: driver core: remove drvdata() and driver_type
When drvdata() was introduced in commit 6f61a2637abe ("rust: device: introduce Device::drvdata()"), its commit message already noted that a direct accessor to the driver's bus device private data is not commonly required -- bus callbacks provide access through &self, and other entry points (IRQs, workqueues, IOCTLs, etc.) carry their own private data. The sole motivation for drvdata() was inter-driver interaction -- an auxiliary driver deriving the parent's bus device private data from the parent device. However, drvdata() exposes the driver's bus device private data beyond the driver's own scope. This creates ordering constraints; for instance drvdata may not be set yet when the first caller of drvdata() can appear. It also forces the driver's bus device private data to outlive all registrations that access it, which causes unnecessary complications. Private data should be private to the entity that issues it, i.e. bus device private data belongs to bus callbacks, class device private data to class callbacks, IRQ private data to the IRQ handler, etc. With registration-private data now available through the auxiliary bus, there is no remaining user of drvdata(), thus remove it. Reviewed-by: Alice Ryhl <aliceryhl@google.com> Link: https://patch.msgid.link/20260505152400.3905096-4-dakr@kernel.org Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'include/linux/errqueue.h')
0 files changed, 0 insertions, 0 deletions