mirror of
https://github.com/torvalds/linux.git
synced 2026-03-13 21:26:14 +01:00
rust: platform: Set OF_ID_TABLE default to None in Driver trait
Provide a default value of `None` for `Driver::OF_ID_TABLE` to simplify driver implementations. Drivers that do not require OpenFirmware matching no longer need to import the `of` module or define the constant explicitly. This reduces unnecessary boilerplate and avoids pulling in unused dependencies. Signed-off-by: Igor Korotin <igor.korotin.linux@gmail.com> Link: https://lore.kernel.org/r/20250620154124.297158-1-igor.korotin.linux@gmail.com Signed-off-by: Danilo Krummrich <dakr@kernel.org>
This commit is contained in:
parent
7a5cb145a9
commit
ec3ef2175e
1 changed files with 1 additions and 1 deletions
|
|
@ -162,7 +162,7 @@ pub trait Driver: Send {
|
|||
type IdInfo: 'static;
|
||||
|
||||
/// The table of OF device ids supported by the driver.
|
||||
const OF_ID_TABLE: Option<of::IdTable<Self::IdInfo>>;
|
||||
const OF_ID_TABLE: Option<of::IdTable<Self::IdInfo>> = None;
|
||||
|
||||
/// Platform driver probe.
|
||||
///
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue