aboutsummaryrefslogtreecommitdiffstats
path: root/rust/helpers/rcu.c
diff options
context:
space:
mode:
authorDanilo Krummrich <[email protected]>2024-12-19 17:04:04 +0000
committerGreg Kroah-Hartman <[email protected]>2024-12-20 16:19:25 +0000
commitea7e18289f44b0aa597026f16e7f4f6daa0f13ee (patch)
tree3d76a00e48548d0cfdc4ea32b6761d405b85e38c /rust/helpers/rcu.c
parentrust: module: add trait `ModuleMetadata` (diff)
downloadkernel-ea7e18289f44b0aa597026f16e7f4f6daa0f13ee.tar.gz
kernel-ea7e18289f44b0aa597026f16e7f4f6daa0f13ee.zip
rust: implement generic driver registration
Implement the generic `Registration` type and the `RegistrationOps` trait. The `Registration` structure is the common type that represents a driver registration and is typically bound to the lifetime of a module. However, it doesn't implement actual calls to the kernel's driver core to register drivers itself. Instead the `RegistrationOps` trait is provided to subsystems, which have to implement `RegistrationOps::register` and `RegistrationOps::unregister`. Subsystems have to provide an implementation for both of those methods where the subsystem specific variants to register / unregister a driver have to implemented. For instance, the PCI subsystem would call __pci_register_driver() from `RegistrationOps::register` and pci_unregister_driver() from `DrvierOps::unregister`. Co-developed-by: Wedson Almeida Filho <[email protected]> Signed-off-by: Wedson Almeida Filho <[email protected]> Signed-off-by: Danilo Krummrich <[email protected]> Tested-by: Dirk Behme <[email protected]> Tested-by: Fabien Parent <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'rust/helpers/rcu.c')
0 files changed, 0 insertions, 0 deletions