[PATCH 3/4] rust: i2c: import pin_init::zeroed() from ffi

Alice Ryhl posted 4 patches 1 week, 5 days ago
[PATCH 3/4] rust: i2c: import pin_init::zeroed() from ffi
Posted by Alice Ryhl 1 week, 5 days ago
The zeroed() helper was re-exported from the ffi crate. As this usage of
zeroed() has nothing to do with pin-init, use the new re-export.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
 rust/kernel/i2c.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/rust/kernel/i2c.rs b/rust/kernel/i2c.rs
index 491e6cc25cf42619ebfd88af731db47efb8db93c..731bacff0990c8b9b2fe8601f07470b68032f3e8 100644
--- a/rust/kernel/i2c.rs
+++ b/rust/kernel/i2c.rs
@@ -46,7 +46,7 @@ impl DeviceId {
     pub const fn new(id: &'static CStr) -> Self {
         let src = id.to_bytes_with_nul();
         build_assert!(src.len() <= Self::I2C_NAME_SIZE, "ID exceeds 20 bytes");
-        let mut i2c: bindings::i2c_device_id = pin_init::zeroed();
+        let mut i2c: bindings::i2c_device_id = ffi::zeroed();
         let mut i = 0;
         while i < src.len() {
             i2c.name[i] = src[i];
@@ -433,7 +433,7 @@ impl I2cBoardInfo {
     pub const fn new(type_: &'static CStr, addr: u16) -> Self {
         let src = type_.to_bytes_with_nul();
         build_assert!(src.len() <= Self::I2C_TYPE_SIZE, "Type exceeds 20 bytes");
-        let mut i2c_board_info: bindings::i2c_board_info = pin_init::zeroed();
+        let mut i2c_board_info: bindings::i2c_board_info = ffi::zeroed();
         let mut i: usize = 0;
         while i < src.len() {
             i2c_board_info.type_[i] = src[i];

-- 
2.52.0.457.g6b5491de43-goog