Skip to content

Commit

Permalink
spi: Rename Registration -> DriverRegistration for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
CohenArthur committed May 3, 2021
1 parent b1cfe91 commit 25c0dd7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions rust/kernel/spi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ impl SpiDevice {
}
}

pub struct Registration {
pub struct DriverRegistration {
this_module: &'static crate::ThisModule,
name: CStr<'static>,
probe: Option<SpiMethod>,
Expand All @@ -22,9 +22,9 @@ pub struct Registration {
spi_driver: Option<bindings::spi_driver>,
}

impl Registration {
impl DriverRegistration {
pub fn new(this_module: &'static crate::ThisModule, name: CStr<'static>) -> Self {
Registration {
DriverRegistration {
this_module,
name,
probe: None,
Expand Down Expand Up @@ -62,7 +62,7 @@ impl Registration {
}
}

impl Drop for Registration {
impl Drop for DriverRegistration {
fn drop(&mut self) {
unsafe { bindings::driver_unregister(&mut self.spi_driver.unwrap().driver) } // FIXME: No unwrap? But it's safe?
}
Expand Down

0 comments on commit 25c0dd7

Please sign in to comment.