Skip to content

Commit

Permalink
crates/drivers: Initialize serial device in new()
Browse files Browse the repository at this point in the history
Signed-off-by: Nick Spinale <[email protected]>
  • Loading branch information
nspin committed Jun 12, 2024
1 parent 2db6cb4 commit e430ff5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion crates/drivers/sel4-pl011-driver/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ impl Driver {
this
}

pub fn init(&mut self) {
fn init(&mut self) {
self.device.init();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ const ASSISTANT: Channel = Channel::new(1);

#[protection_domain]
fn init() -> Driver<DriverImpl> {
let mut driver_impl =
let driver_impl =
unsafe { DriverImpl::new(memory_region_symbol!(pl011_register_block: *mut ()).as_ptr()) };
driver_impl.init();
Driver::new(driver_impl, DEVICE, ASSISTANT)
}

0 comments on commit e430ff5

Please sign in to comment.