mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-31 14:23:49 +01:00
rust: phy: implement Send for Registration
In preparation for requiring `Send` for `Module` implementations in the next patch. Cc: FUJITA Tomonori <[email protected]> Cc: Trevor Gross <[email protected]> Cc: [email protected] Signed-off-by: Wedson Almeida Filho <[email protected]> Reviewed-by: Alice Ryhl <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Miguel Ojeda <[email protected]>
This commit is contained in:
1 parent
8933cf4651
commit
df70d04d56
1 file changed
+4
@@ -640,6 +640,10 @@ pub struct Registration {
|
||||
drivers: Pin<&'static mut [DriverVTable]>,
|
||||
}
|
||||
|
||||
// SAFETY: The only action allowed in a `Registration` instance is dropping it, which is safe to do
|
||||
// from any thread because `phy_drivers_unregister` can be called from any thread context.
|
||||
unsafe impl Send for Registration {}
|
||||
|
||||
impl Registration {
|
||||
/// Registers a PHY driver.
|
||||
pub fn register(
|
||||
|
||||
Reference in new issue
Block a user