Skip to content

Commit

Permalink
Remove the function_exists method of ConfigRegionAccess
Browse files Browse the repository at this point in the history
It isn't used anywhere and pci_types can implement it itself if it needs
to by checking if the vendor and device id fields are both 0xFFFF.

Fixes #14
  • Loading branch information
bjorn3 authored and IsaacWoods committed Jun 15, 2024
1 parent 2c1c472 commit f02cac2
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ pub type InterruptPin = u8;

// TODO: documentation
pub trait ConfigRegionAccess {
fn function_exists(&self, address: PciAddress) -> bool;

/// Performs a PCI read at `address` with `offset`.
///
/// # Safety
Expand All @@ -93,11 +91,6 @@ pub trait ConfigRegionAccess {
}

impl<T: ConfigRegionAccess + ?Sized> ConfigRegionAccess for &T {
#[inline]
fn function_exists(&self, address: PciAddress) -> bool {
(**self).function_exists(address)
}

#[inline]
unsafe fn read(&self, address: PciAddress, offset: u16) -> u32 {
(**self).read(address, offset)
Expand Down

0 comments on commit f02cac2

Please sign in to comment.