Commit 9da36b9f authored by Danilo Krummrich's avatar Danilo Krummrich
Browse files

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: default avatarIgor Korotin <igor.korotin.linux@gmail.com>
Link: https://lore.kernel.org/r/20250620152103.282763-1-igor.korotin.linux@gmail.com


Signed-off-by: default avatarDanilo Krummrich <dakr@kernel.org>
parent c69072d3
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -44,7 +44,9 @@ fn probe(
            dev_info!(dev, "Probed with info: '{}'.\n", info.0);
        }

        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)?;