llseek: Some(bindings::seq_lseek),
release: Some(bindings::single_release),
open: Some(writer_open::<Self>),
- // SAFETY: `file_operations` supports zeroes in all fields.
- ..unsafe { core::mem::zeroed() }
+ ..pin_init::zeroed()
};
// SAFETY: `operations` is all stock `seq_file` implementations except for `writer_open`.
// `open`'s only requirement beyond what is provided to all open functions is that the
write: Some(write::<T>),
llseek: Some(bindings::seq_lseek),
release: Some(bindings::single_release),
- // SAFETY: `file_operations` supports zeroes in all fields.
- ..unsafe { core::mem::zeroed() }
+ ..pin_init::zeroed()
};
// SAFETY: `operations` is all stock `seq_file` implementations except for `writer_open`
// and `write`.
open: Some(write_only_open),
write: Some(write_only_write::<T>),
llseek: Some(bindings::noop_llseek),
- // SAFETY: `file_operations` supports zeroes in all fields.
- ..unsafe { core::mem::zeroed() }
+ ..pin_init::zeroed()
};
// SAFETY:
// * `write_only_open` populates the file private data with the inode private data
read: Some(blob_read::<T>),
llseek: Some(bindings::default_llseek),
open: Some(bindings::simple_open),
- // SAFETY: `file_operations` supports zeroes in all fields.
- ..unsafe { core::mem::zeroed() }
+ ..pin_init::zeroed()
};
// SAFETY:
write: Some(blob_write::<T>),
llseek: Some(bindings::default_llseek),
open: Some(bindings::simple_open),
- // SAFETY: `file_operations` supports zeroes in all fields.
- ..unsafe { core::mem::zeroed() }
+ ..pin_init::zeroed()
};
// SAFETY:
write: Some(blob_write::<T>),
llseek: Some(bindings::default_llseek),
open: Some(bindings::simple_open),
- // SAFETY: `file_operations` supports zeroes in all fields.
- ..unsafe { core::mem::zeroed() }
+ ..pin_init::zeroed()
};
// SAFETY: