diff options
| author | Abhinav Ananthu <abhinav.ogl@gmail.com> | 2025-08-12 09:01:02 +0530 |
|---|---|---|
| committer | Danilo Krummrich <dakr@kernel.org> | 2025-08-15 20:05:20 +0200 |
| commit | b0d73ad126957df989c26d78bd4747a270244dd0 (patch) | |
| tree | 245abf586cadb1038e62a99d2492ca1a9b38f0f2 /rust/kernel/pci.rs | |
| parent | 4005dac6573128d6e7b46c4ed43df1b23dab7765 (diff) | |
rust: pci: use c_* types via kernel prelude
Update PCI FFI callback signatures to use `c_` from the prelude,
instead of accessing it via `kernel::ffi::`.
Signed-off-by: Abhinav Ananthu <abhinav.ogl@gmail.com>
Reviewed-by: Benno Lossin <lossin@kernel.org>
Link: https://lore.kernel.org/r/20250812033101.5257-1-abhinav.ogl@gmail.com
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'rust/kernel/pci.rs')
| -rw-r--r-- | rust/kernel/pci.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rust/kernel/pci.rs b/rust/kernel/pci.rs index 3bf1737635a9..71d25dbcb392 100644 --- a/rust/kernel/pci.rs +++ b/rust/kernel/pci.rs @@ -60,7 +60,7 @@ impl<T: Driver + 'static> Adapter<T> { extern "C" fn probe_callback( pdev: *mut bindings::pci_dev, id: *const bindings::pci_device_id, - ) -> kernel::ffi::c_int { + ) -> c_int { // SAFETY: The PCI bus only ever calls the probe callback with a valid pointer to a // `struct pci_dev`. // @@ -347,7 +347,7 @@ impl<const SIZE: usize> Bar<SIZE> { // `ioptr` is valid by the safety requirements. // `num` is valid by the safety requirements. unsafe { - bindings::pci_iounmap(pdev.as_raw(), ioptr as *mut kernel::ffi::c_void); + bindings::pci_iounmap(pdev.as_raw(), ioptr as *mut c_void); bindings::pci_release_region(pdev.as_raw(), num); } } |
