Home
last modified time | relevance | path

Searched refs:as_ref (Results 1 – 25 of 62) sorted by relevance

123

/linux/rust/kernel/
H A Dplatform.rs104 let info = unsafe { <Self as driver::Adapter>::id_info(pdev.as_ref()) }; in probe_callback()
109 pdev.as_ref().set_drvdata(data)?; in probe_callback()
124 let data = unsafe { pdev.as_ref().drvdata_borrow::<T::Data<'_>>() }; in remove_callback()
316 .map(|resource| unsafe { IoRequest::new(self.as_ref(), resource) }) in io_request_by_index()
324 .map(|resource| unsafe { IoRequest::new(self.as_ref(), resource) }) in io_request_by_name()
419 Ok(unsafe { IrqRequest::new(self.as_ref(), irq as u32) }) in irq_by_index()
433 Ok(unsafe { IrqRequest::new(self.as_ref(), irq as u32) }) in optional_irq_by_index()
446 Ok(unsafe { IrqRequest::new(self.as_ref(), irq as u32) }) in irq_by_name()
462 Ok(unsafe { IrqRequest::new(self.as_ref(), irq as u32) }) in optional_irq_by_name()
540 unsafe { bindings::get_device(self.as_ref().as_raw()) }; in inc_ref()
[all …]
H A Dcpufreq.rs461 fn as_ref(&self) -> &bindings::cpufreq_policy {
476 unsafe { CpuId::from_u32_unchecked(self.as_ref().cpu) } in min()
482 Hertz::from_khz(self.as_ref().min as usize) in set_min()
495 Hertz::from_khz(self.as_ref().max as usize) in set_max()
508 Hertz::from_khz(self.as_ref().cur as usize) in suspend_freq()
514 Hertz::from_khz(self.as_ref().suspend_freq as usize) in set_suspend_freq()
577 self.as_ref().fast_switch_possible in set_fast_switch_possible()
618 if self.as_ref().freq_table.is_null() { in freq_table()
624 Ok(unsafe { Table::from_raw(self.as_ref().freq_table) })
641 if self.as_ref() in data()
456 fn as_ref(&self) -> &bindings::cpufreq_policy { as_ref() method
[all...]
H A Di2c.rs154 unsafe { <Self as driver::Adapter>::id_info(idev.as_ref()) } in probe_callback()
160 idev.as_ref().set_drvdata(data)?; in probe_callback()
172 let data = unsafe { idev.as_ref().drvdata_borrow::<T::Data<'_>>() }; in remove_callback()
184 let data = unsafe { idev.as_ref().drvdata_borrow::<T::Data<'_>>() }; in shutdown_callback()
428 unsafe { bindings::i2c_put_adapter(obj.as_ref().as_raw()) } in dec_ref()
499 unsafe { bindings::get_device(self.as_ref().as_raw()) }; in inc_ref()
504 unsafe { bindings::put_device(&raw mut (*obj.as_ref().as_raw()).dev) } in dec_ref()
509 fn as_ref(&self) -> &device::Device<Ctx> { in as_ref() method
H A Dauxiliary.rs104 adev.as_ref().set_drvdata(data)?; in remove_callback()
119 let data = unsafe { adev.as_ref().drvdata_borrow::<T::Data<'_>>() };
279 self.as_ref(),
353 unsafe { self.as_ref().parent().unwrap_unchecked() } in new()
382 unsafe { bindings::get_device(self.as_ref().as_raw()) }; in new()
399 fn as_ref(&self) -> &device::Device<Ctx> { in drop()
312 fn as_ref(&self) -> &device::Device<Ctx> { as_ref() method
H A Dusb.rs98 let dev: &device::Device<device::CoreInternal<'_>> = intf.as_ref(); in probe_callback()
111 let dev: &device::Device<device::CoreInternal<'_>> = intf.as_ref(); in disconnect_callback()
365 fn as_ref(&self) -> &device::Device<Ctx> { in as_ref()
376 fn as_ref(&self) -> &Device { in as_ref()
453 fn as_ref(&self) -> &device::Device<Ctx> { in as_ref()
364 fn as_ref(&self) -> &device::Device<Ctx> { as_ref() method
375 fn as_ref(&self) -> &Device { as_ref() method
452 fn as_ref(&self) -> &device::Device<Ctx> { as_ref() method
H A Ddma.rs70 // - By the type invariant of `device::Device`, `self.as_ref().as_raw()` is valid.
73 to_result(unsafe { bindings::dma_set_mask(self.as_ref().as_raw(), mask.value()) })
87 // - By the type invariant of `device::Device`, `self.as_ref().as_raw()` is valid.
90 to_result(unsafe { bindings::dma_set_coherent_mask(self.as_ref().as_raw(), mask.value()) })
106 // - By the type invariant of `device::Device`, `self.as_ref().as_raw()` is valid.
110 bindings::dma_set_mask_and_coherent(self.as_ref().as_raw(), mask.value())
125 // - By the type invariant of `device::Device`, `self.as_ref().as_raw()` is valid.
128 unsafe { bindings::dma_set_max_seg_size(self.as_ref().as_raw(), size) }
553 unsafe { self.0.as_ref() } in deref_mut()
645 pub unsafe fn as_ref(
638 pub unsafe fn as_ref(&self) -> &T { as_ref() method
[all...]
H A Dmodule_param.rs72 let arg: &BStr = arg.as_ref(); in set_param()
159 self.value.as_ref().unwrap_or(&self.default)
H A Dpci.rs124 pdev.as_ref().set_drvdata(data)?; in remove_callback()
139 let data = unsafe { pdev.as_ref().drvdata_borrow::<T::Data<'_>>() };
506 fn as_ref(&self) -> &device::Device<Ctx> { in try_from()
490 fn as_ref(&self) -> &device::Device<Ctx> { as_ref() method
H A Dstr.rs70 .strip_prefix(pattern.as_ref().deref())
168 fn as_ref(&self) -> &BStr {
174 fn as_ref(&self) -> &BStr {
390 fn as_ref(&self) -> &BStr {
155 fn as_ref(&self) -> &BStr { as_ref() method
161 fn as_ref(&self) -> &BStr { as_ref() method
377 fn as_ref(&self) -> &BStr { as_ref() method
H A Dopp.rs454 let clk_names = clk_names.as_ref().map_or(ptr::null(), |c| c.as_ptr()); in set()
455 let regulator_names = regulator_names.as_ref().map_or(ptr::null(), |c| c.as_ptr()); in set()
459 .as_ref() in set()
464 .as_ref() in set()
469 .as_ref() in set()
/linux/rust/kernel/str/
H A Dparse_int.rs33 [b'0', b'x' | b'X', rest @ ..] => (16, rest.as_ref()), in strip_radix()
34 [b'0', b'o' | b'O', rest @ ..] => (8, rest.as_ref()), in strip_radix()
35 [b'0', b'b' | b'B', rest @ ..] => (2, rest.as_ref()), in strip_radix()
84 let (radix, digits) = strip_radix(rest.as_ref()); in from_str()
/linux/rust/zerocopy/src/
H A Dsplit_at.rs374 (l.as_ref(), r.as_ref()) in via_immutable()
423 (l.as_ref(), r.as_ref()) in via_into_bytes()
472 (l.as_ref(), r.as_ref()) in via_unaligned()
556 Ok((l, r)) => Ok((l.as_ref(), r.as_ref())), in via_runtime_check()
596 (l.as_ref(), r.as_ref()) in via_unchecked()
817 unsafe { Split::new(self.source.as_ref(), self.l_len) } in into_ref()
/linux/samples/rust/
H A Drust_driver_i2c.rs45 let dev = idev.as_ref(); in probe()
57 dev_info!(idev.as_ref(), "Shutdown Rust I2C driver sample.\n"); in probe()
61 dev_info!(idev.as_ref(), "Unbind Rust I2C driver sample.\n"); in shutdown()
H A Drust_i2c_client.rs116 pdev.as_ref(), in probe()
126 i2c::Registration::new(&adapter, &BOARD_INFO, pdev.as_ref()) in probe()
136 pdev.as_ref(), in unbind()
H A Drust_driver_auxiliary.rs108 pdev.as_ref(),
121 pdev.as_ref(),
H A Drust_driver_usb.rs36 let dev: &device::Device<Core<'_>> = intf.as_ref(); in disconnect()
43 let dev: &device::Device<Core<'_>> = intf.as_ref();
H A Drust_driver_pci.rs
H A Drust_dma.rs86 Coherent::zeroed_slice(pdev.as_ref(), TEST_VALUES.len(), GFP_KERNEL)?; in probe()
95 let sgt = SGTable::new(pdev.as_ref(), pages, DataDirection::ToDevice, GFP_KERNEL); in check_dma()
H A Drust_driver_platform.rs110 let dev = pdev.as_ref(); in probe()
H A Drust_driver_faux.rs28 let fdev = reg.as_ref(); in init()
/linux/rust/kernel/sync/
H A Dset_once.rs31 /// assert_eq!(None, value.as_ref());
35 /// assert_eq!(Some(&42u8), value.as_ref());
40 /// assert_eq!(Some(&42u8), value.as_ref());
69 pub fn as_ref(&self) -> Option<&T> { in as_ref() method
111 self.as_ref().copied() in copy()
/linux/drivers/android/binder/
H A Derror.rs75 BR_FAILED_REPLY => match self.source.as_ref() { in fmt()
83 _ => match self.source.as_ref() { in fmt()
H A Dtransaction.rs216 Some(self.from_parent.as_ref()?.clone()) in clone_next()
237 if core::ptr::eq(thread, transaction.from.as_ref()) { in find_from()
361 let target_node_match = match (self.target_node.as_ref(), old.target_node.as_ref()) { in can_replace()
/linux/rust/kernel/pci/
H A Dirq.rs161 Ok(unsafe { IrqVector::new(IrqRequest::new(self.dev.as_ref(), irq as u32), self) }) in register()
/linux/rust/zerocopy/src/pointer/
H A Dinvariant.rs153 (*ptr.into_unalign().as_ref()).into_inner() in read()
168 *ptr.as_ref() in read()

123