Removes the device at the given address space range.
(&self, base: u64, len: u64)
| 182 | |
| 183 | /// Removes the device at the given address space range. |
| 184 | pub fn remove(&self, base: u64, len: u64) -> Result<()> { |
| 185 | if len == 0 { |
| 186 | return Err(Error::ZeroSizedRange); |
| 187 | } |
| 188 | |
| 189 | let bus_range = BusRange { base, len }; |
| 190 | |
| 191 | if self.devices.write().unwrap().remove(&bus_range).is_none() { |
| 192 | return Err(Error::MissingAddressRange); |
| 193 | } |
| 194 | |
| 195 | Ok(()) |
| 196 | } |
| 197 | |
| 198 | /// Removes all entries referencing the given device. |
| 199 | pub fn remove_by_device(&self, device: &dyn BusDeviceSync) -> Result<()> { |
no test coverage detected