Skip to content

Commit 937a682

Browse files
committed
spi: Fix CStr
Co-developed-by: Martin Schmidt <[email protected]> Signed-off-by: Martin Schmidt <[email protected]> Co-developed-by: Arthur Cohen <[email protected]> Signed-off-by: Arthur Cohen <[email protected]> Signed-off-by: Esteban Blanc <[email protected]>
1 parent d905cc0 commit 937a682

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

rust/kernel/spi.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
use crate::bindings;
44
use crate::c_types;
55
use crate::error::{Error, Result};
6-
use crate::CStr;
6+
use crate::str::CStr;
77
use alloc::boxed::Box;
88
use core::pin::Pin;
99

@@ -23,7 +23,7 @@ impl SpiDevice {
2323
pub struct DriverRegistration {
2424
this_module: &'static crate::ThisModule,
2525
registered: bool,
26-
name: CStr<'static>,
26+
name: &'static CStr,
2727
spi_driver: bindings::spi_driver,
2828
}
2929

@@ -92,7 +92,7 @@ macro_rules! declare_spi_methods {
9292
}
9393

9494
impl DriverRegistration {
95-
fn new(this_module: &'static crate::ThisModule, name: CStr<'static>) -> Self {
95+
fn new(this_module: &'static crate::ThisModule, name: &'static CStr) -> Self {
9696
DriverRegistration {
9797
this_module,
9898
name,
@@ -104,7 +104,7 @@ impl DriverRegistration {
104104
// FIXME: Add documentation
105105
pub fn new_pinned<T: SpiMethods>(
106106
this_module: &'static crate::ThisModule,
107-
name: CStr<'static>,
107+
name: &'static CStr,
108108
) -> Result<Pin<Box<Self>>> {
109109
let mut registration = Pin::from(Box::try_new(Self::new(this_module, name))?);
110110

0 commit comments

Comments
 (0)