rust: net::phy add module_phy_driver macro
authorFUJITA Tomonori <fujita.tomonori@gmail.com>
Wed, 13 Dec 2023 00:42:09 +0000 (09:42 +0900)
committerDavid S. Miller <davem@davemloft.net>
Fri, 15 Dec 2023 09:35:50 +0000 (09:35 +0000)
commit2fe11d5ab35daee5e8f5ecf49767ddd3204fdfa9
treee3776c61b748e56f446b5d9b0612494799776e00
parentf20fd5449ada3872dcd67aca397f0e27ca2e8ad6
rust: net::phy add module_phy_driver macro

This macro creates an array of kernel's `struct phy_driver` and
registers it. This also corresponds to the kernel's
`MODULE_DEVICE_TABLE` macro, which embeds the information for module
loading into the module binary file.

A PHY driver should use this macro.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Benno Lossin <benno.lossin@proton.me>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Trevor Gross <tmgross@umich.edu>
Signed-off-by: David S. Miller <davem@davemloft.net>
rust/kernel/net/phy.rs