summary refs log tree commit diff
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/Cargo.toml1
-rw-r--r--arch/src/fdt.rs9
2 files changed, 2 insertions, 8 deletions
diff --git a/arch/Cargo.toml b/arch/Cargo.toml
index f562fca..bf28560 100644
--- a/arch/Cargo.toml
+++ b/arch/Cargo.toml
@@ -5,7 +5,6 @@ authors = ["The Chromium OS Authors"]
 edition = "2018"
 
 [dependencies]
-byteorder = "*"
 devices = { path = "../devices" }
 io_jail = { path = "../io_jail" }
 kernel_cmdline = { path = "../kernel_cmdline" }
diff --git a/arch/src/fdt.rs b/arch/src/fdt.rs
index 71c791d..a3861d5 100644
--- a/arch/src/fdt.rs
+++ b/arch/src/fdt.rs
@@ -2,7 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-use byteorder::{BigEndian, ByteOrder};
 use libc::{c_char, c_int, c_void};
 use std::ffi::{CStr, CString};
 use std::fmt::{self, Display};
@@ -106,15 +105,11 @@ pub fn property(fdt: &mut Vec<u8>, name: &str, val: &[u8]) -> Result<()> {
 }
 
 fn cpu_to_fdt32(input: u32) -> [u8; 4] {
-    let mut buf = [0; 4];
-    BigEndian::write_u32(&mut buf, input);
-    buf
+    input.to_be_bytes()
 }
 
 fn cpu_to_fdt64(input: u64) -> [u8; 8] {
-    let mut buf = [0; 8];
-    BigEndian::write_u64(&mut buf, input);
-    buf
+    input.to_be_bytes()
 }
 
 pub fn property_u32(fdt: &mut Vec<u8>, name: &str, val: u32) -> Result<()> {