Skip to content

Commit 16f1ae8

Browse files
BlankkeAsakuraMizu
andauthored
fix(block,ahci): re-export simple_ahci::Hal (#4)
Co-authored-by: 朝倉水希 <[email protected]>
1 parent e7b4c66 commit 16f1ae8

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

axdriver_block/src/ahci.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
//! AHCI driver.
22
33
use axdriver_base::{BaseDriverOps, DevError, DevResult, DeviceType};
4-
use simple_ahci::{AhciDriver as SimpleAhciDriver, Hal};
4+
use simple_ahci::AhciDriver as SimpleAhciDriver;
5+
pub use simple_ahci::Hal as AhciHal;
56

67
use crate::BlockDriverOps;
78

89
/// AHCI driver based on the `simple_ahci` crate.
9-
pub struct AhciDriver<H: Hal>(SimpleAhciDriver<H>);
10+
pub struct AhciDriver<H: AhciHal>(SimpleAhciDriver<H>);
1011

11-
impl<H: Hal> AhciDriver<H> {
12+
impl<H: AhciHal> AhciDriver<H> {
1213
/// Try to construct a new AHCI driver from the given MMIO base address.
1314
///
1415
/// # Safety
@@ -23,7 +24,7 @@ impl<H: Hal> AhciDriver<H> {
2324
}
2425
}
2526

26-
impl<H: Hal> BaseDriverOps for AhciDriver<H> {
27+
impl<H: AhciHal> BaseDriverOps for AhciDriver<H> {
2728
fn device_name(&self) -> &str {
2829
"ahci"
2930
}
@@ -33,7 +34,7 @@ impl<H: Hal> BaseDriverOps for AhciDriver<H> {
3334
}
3435
}
3536

36-
impl<H: Hal> BlockDriverOps for AhciDriver<H> {
37+
impl<H: AhciHal> BlockDriverOps for AhciDriver<H> {
3738
fn block_size(&self) -> usize {
3839
self.0.block_size()
3940
}

0 commit comments

Comments
 (0)