Lines Matching defs:platform_device
5 //! C header: [`include/linux/platform_device.h`](srctree/include/linux/platform_device.h)
68 extern "C" fn probe_callback(pdev: *mut bindings::platform_device) -> kernel::ffi::c_int {
70 // `struct platform_device`.
84 extern "C" fn remove_callback(pdev: *mut bindings::platform_device) {
86 // `struct platform_device`.
213 /// This structure represents the Rust abstraction for a C `struct platform_device`. The
214 /// implementation abstracts the usage of an already existing C `struct platform_device` within Rust
219 /// A [`Device`] instance represents a valid `struct platform_device` created by the C portion of
223 Opaque<bindings::platform_device>,
228 fn as_raw(&self) -> *mut bindings::platform_device {
234 // SAFETY: `self.as_raw()` returns a valid pointer to a `struct platform_device`.
251 // platform_device` and `name` points to a valid C string.
345 // SAFETY: `self.as_raw` returns a valid pointer to a `struct platform_device`.
359 // SAFETY: `self.as_raw` returns a valid pointer to a `struct platform_device`.
372 // SAFETY: `self.as_raw` returns a valid pointer to a `struct platform_device`.
386 // SAFETY: `self.as_raw` returns a valid pointer to a `struct platform_device`.
486 // `struct platform_device`.
506 // `struct platform_device` as guaranteed by the corresponding C code.
507 let pdev = unsafe { container_of!(dev.as_raw(), bindings::platform_device, dev) };
509 // SAFETY: `pdev` is a valid pointer to a `struct platform_device`.