mirror of
https://github.com/torvalds/linux.git
synced 2026-01-25 07:47:50 +00:00
samples: rust: platform: conditionally call Self::properties_parse()
Only call Self::properties_parse() when the FwNode is an OF node. Once we add ACPI support, we don't want the ACPI device to fail probing in Self::properties_parse(). Signed-off-by: Igor Korotin <igor.korotin.linux@gmail.com> Link: https://lore.kernel.org/r/20250620152103.282763-1-igor.korotin.linux@gmail.com Signed-off-by: Danilo Krummrich <dakr@kernel.org>
This commit is contained in:
@@ -44,7 +44,9 @@ impl platform::Driver for SampleDriver {
|
||||
dev_info!(dev, "Probed with info: '{}'.\n", info.0);
|
||||
}
|
||||
|
||||
Self::properties_parse(dev)?;
|
||||
if dev.fwnode().is_some_and(|node| node.is_of_node()) {
|
||||
Self::properties_parse(dev)?;
|
||||
}
|
||||
|
||||
let drvdata = KBox::new(Self { pdev: pdev.into() }, GFP_KERNEL)?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user