Lines Matching defs:as_raw
210 // - `dev` is guaranteed to be valid while it's alive, and so is `dev.as_raw()`.
211 let raw_id = unsafe { bindings::i2c_match_id(table.as_ptr(), dev.as_raw()) };
386 fn as_raw(&self) -> *mut bindings::i2c_adapter {
395 // SAFETY: `self.as_raw` is a valid pointer to a `struct i2c_adapter`.
396 unsafe { (*self.as_raw()).nr }
426 unsafe { bindings::i2c_put_adapter(obj.as_ref().as_raw()) }
455 fn as_raw(&self) -> *const bindings::i2c_board_info {
477 fn as_raw(&self) -> *mut bindings::i2c_client {
497 unsafe { bindings::get_device(self.as_ref().as_raw()) };
502 unsafe { bindings::put_device(&raw mut (*obj.as_ref().as_raw()).dev) }
508 let raw = self.as_raw();
509 // SAFETY: By the type invariant of `Self`, `self.as_raw()` is a pointer to a valid
522 // SAFETY: By the type invariant of `Device`, `dev.as_raw()` is a valid pointer to a
524 if unsafe { bindings::i2c_verify_client(dev.as_raw()).is_null() } {
531 let idev = unsafe { container_of!(dev.as_raw(), bindings::i2c_client, dev) };
572 bindings::i2c_new_client_device(i2c_adapter.as_raw(), i2c_board_info.as_raw())