libfdt: Remove duplicate FdtNode::from_mut()
The method duplicates FdtNodeMut::as_node() so remove it. Even if it's
pub, the only user seems to have been in pvmfw so replace it.
Test: m pvmfw
Test: atest liblibfdt.integration_test
Change-Id: I714a95d9a2c947e91f7bb5c86564ee13af898cbb
diff --git a/pvmfw/src/fdt.rs b/pvmfw/src/fdt.rs
index e83fe5a..1e37572 100644
--- a/pvmfw/src/fdt.rs
+++ b/pvmfw/src/fdt.rs
@@ -35,7 +35,6 @@
use libfdt::CellIterator;
use libfdt::Fdt;
use libfdt::FdtError;
-use libfdt::FdtNode;
use libfdt::FdtNodeMut;
use log::debug;
use log::error;
@@ -499,11 +498,8 @@
let name = cstr!("ns16550a");
let mut next = fdt.root_mut()?.next_compatible(name);
while let Some(current) = next? {
- let reg = FdtNode::from_mut(¤t)
- .reg()?
- .ok_or(FdtError::NotFound)?
- .next()
- .ok_or(FdtError::NotFound)?;
+ let reg =
+ current.as_node().reg()?.ok_or(FdtError::NotFound)?.next().ok_or(FdtError::NotFound)?;
next = if !serial_info.addrs.contains(®.addr) {
current.delete_and_next_compatible(name)
} else {