Skip to content

Commit

Permalink
Remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinmehall committed Sep 28, 2024
1 parent 060f284 commit 4774c75
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
13 changes: 1 addition & 12 deletions src/enumeration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -465,20 +465,9 @@ impl UsbControllerType {
_ => None,
}
}

#[allow(dead_code)] // not used on all platforms
pub(crate) fn from_bcd(bcd: u16) -> Option<Self> {
match bcd & 0xF00 {
0x300 => Some(UsbControllerType::XHCI),
0x200 => Some(UsbControllerType::EHCI),
// assume open version
0x100 => Some(UsbControllerType::OHCI),
_ => None,
}
}
}

/// Information about a system USB bus. Aims to be a more useful and portable version of the Linux root hub device.
/// Information about a system USB bus.
///
/// Platform-specific fields:
/// * Linux: `path`, `parent_path`, `busnum`, `root_hub`
Expand Down
5 changes: 0 additions & 5 deletions src/platform/macos_iokit/enumeration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,6 @@ fn get_integer_property(device: &IoService, property: &'static str) -> Option<i6
})
}

fn get_byte_array_property(device: &IoService, property: &'static str) -> Option<Vec<u8>> {
let d = get_property::<CFData>(device, property)?;
Some(d.bytes().to_vec())
}

fn get_ascii_array_property(device: &IoService, property: &'static str) -> Option<String> {
let d = get_property::<CFData>(device, property)?;
Some(
Expand Down

0 comments on commit 4774c75

Please sign in to comment.