Lines Matching defs:Self
40 pdrv: &Opaque<Self::RegType>,
47 (*pdrv.get()).probe = Some(Self::probe_callback);
48 (*pdrv.get()).remove = Some(Self::remove_callback);
58 unsafe fn unregister(pdrv: &Opaque<Self::RegType>) {
138 pub const fn from_id(vendor: Vendor, device: u32) -> Self {
139 Self(bindings::pci_device_id {
155 pub const fn from_class(class: u32, class_mask: u32) -> Self {
156 Self(bindings::pci_device_id {
178 ) -> Self {
179 Self(bindings::pci_device_id {
247 /// const ID_TABLE: pci::IdTable<Self::IdInfo> = &PCI_TABLE;
251 /// _id_info: &Self::IdInfo,
252 /// ) -> Result<Pin<KBox<Self>>> {
269 const ID_TABLE: IdTable<Self::IdInfo>;
275 fn probe(dev: &Device<device::Core>, id_info: &Self::IdInfo) -> Result<Pin<KBox<Self>>>;
286 /// Otherwise, release operations for driver resources should be performed in `Self::drop`.
287 fn unbind(dev: &Device<device::Core>, this: Pin<&Self>) {
321 fn new(pdev: &Device, num: u32, name: &CStr) -> Result<Self> {
359 unsafe { Self::do_release(pdev, ioptr, num) };
387 unsafe { Self::do_release(&self.pdev, self.io.addr(), self.num) };
408 fn deref(&self) -> &Self::Target {
409 // SAFETY: By the type invariant of `Self`, the MMIO range in `self.io` is properly mapped.
610 unsafe fn dec_ref(obj: NonNull<Self>) {
618 // SAFETY: By the type invariant of `Self`, `self.as_raw()` is a pointer to a valid
630 fn try_from(dev: &device::Device<Ctx>) -> Result<Self, Self::Error> {