Home
last modified time | relevance | path

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

12

/linux/rust/kernel/
H A Dplatform.rs103 let info = <Self as driver::Adapter>::id_info(pdev.as_ref()); in probe_callback()
108 pdev.as_ref().set_drvdata(data)?; in probe_callback()
123 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_name()
324 .map(|resource| unsafe { IoRequest::new(self.as_ref(), resource) })
403 Ok(unsafe { IrqRequest::new(self.as_ref(), irq as u32) }) in optional_irq_by_index()
417 Ok(unsafe { IrqRequest::new(self.as_ref(), irq as u32) }) in irq_by_name()
430 Ok(unsafe { IrqRequest::new(self.as_ref(), irq as u32) }) in optional_irq_by_name()
446 Ok(unsafe { IrqRequest::new(self.as_ref(), irq as u32) })
524 unsafe { bindings::get_device(self.as_ref() in dec_ref()
528 fn as_ref(&self) -> &device::Device<Ctx> { as_ref() method
[all...]
H A Dcpufreq.rs456 fn as_ref(&self) -> &bindings::cpufreq_policy { in as_ref() method
471 unsafe { CpuId::from_u32_unchecked(self.as_ref().cpu) } in cpu()
477 Hertz::from_khz(self.as_ref().min as usize) in min()
490 Hertz::from_khz(self.as_ref().max as usize) in max()
503 Hertz::from_khz(self.as_ref().cur as usize) in cur()
509 Hertz::from_khz(self.as_ref().suspend_freq as usize) in suspend_freq()
572 self.as_ref().fast_switch_possible in fast_switch_possible()
613 if self.as_ref().freq_table.is_null() { in freq_table()
619 Ok(unsafe { Table::from_raw(self.as_ref().freq_table) }) in freq_table()
636 if self.as_ref() in data()
[all...]
H A Di2c.rs163 Self::i2c_id_info(idev).or_else(|| <Self as driver::Adapter>::id_info(idev.as_ref())); in probe_callback()
168 idev.as_ref().set_drvdata(data)?; in probe_callback()
180 let data = unsafe { idev.as_ref().drvdata_borrow::<T::Data<'_>>() }; in remove_callback()
192 let data = unsafe { idev.as_ref().drvdata_borrow::<T::Data<'_>>() }; in shutdown_callback()
435 unsafe { bindings::i2c_put_adapter(obj.as_ref().as_raw()) }
506 unsafe { bindings::get_device(self.as_ref().as_raw()) };
511 unsafe { bindings::put_device(&raw mut (*obj.as_ref().as_raw()).dev) } in as_ref()
516 fn as_ref(&self) -> &device::Device<Ctx> { in as_ref()
508 fn as_ref(&self) -> &device::Device<Ctx> { as_ref() method
H A Dauxiliary.rs101 adev.as_ref().set_drvdata(data)?; in remove_callback()
116 let data = unsafe { adev.as_ref().drvdata_borrow::<T::Data<'_>>() };
289 self.as_ref(),
321 unsafe { self.as_ref().parent().unwrap_unchecked() }
350 unsafe { bindings::get_device(self.as_ref().as_raw()) }; in new()
367 fn as_ref(&self) -> &device::Device<Ctx> { in new()
312 fn as_ref(&self) -> &device::Device<Ctx> { as_ref() method
H A Dusb.rs95 let dev: &device::Device<device::CoreInternal<'_>> = intf.as_ref(); in probe_callback()
108 let dev: &device::Device<device::CoreInternal<'_>> = intf.as_ref(); in disconnect_callback()
373 fn as_ref(&self) -> &device::Device<Ctx> {
384 fn as_ref(&self) -> &Device {
461 fn as_ref(&self) -> &device::Device<Ctx> {
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 Dmodule_param.rs72 let arg: &BStr = arg.as_ref(); in set_param()
137 self.value.as_ref().unwrap_or(&self.default) in value()
H A Ddma.rs62 // - By the type invariant of `device::Device`, `self.as_ref().as_raw()` is valid. in dma_set_mask()
65 to_result(unsafe { bindings::dma_set_mask(self.as_ref().as_raw(), mask.value()) }) in dma_set_mask()
79 // - By the type invariant of `device::Device`, `self.as_ref().as_raw()` is valid. in dma_set_coherent_mask()
82 to_result(unsafe { bindings::dma_set_coherent_mask(self.as_ref().as_raw(), mask.value()) }) in dma_set_coherent_mask()
98 // - By the type invariant of `device::Device`, `self.as_ref().as_raw()` is valid. in dma_set_mask_and_coherent()
102 bindings::dma_set_mask_and_coherent(self.as_ref().as_raw(), mask.value()) in dma_set_mask_and_coherent()
117 // - By the type invariant of `device::Device`, `self.as_ref().as_raw()` is valid. in dma_set_max_seg_size()
120 unsafe { bindings::dma_set_max_seg_size(self.as_ref().as_raw(), size) } in dma_set_max_seg_size()
545 unsafe { self.0.as_ref() } in deref()
638 pub unsafe fn as_ref( method
[all...]
H A Dpci.rs118 pdev.as_ref().set_drvdata(data)?; in probe_callback()
133 let data = unsafe { pdev.as_ref().drvdata_borrow::<T::Data<'_>>() }; in remove_callback()
497 fn as_ref(&self) -> &device::Device<Ctx> { in as_ref()
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()
H A Dfaux.rs63 fn as_ref(&self) -> &device::Device { in drop()
54 fn as_ref(&self) -> &device::Device { as_ref() method
/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/samples/rust/
H A Drust_driver_i2c.rs48 let dev = idev.as_ref(); in probe()
60 dev_info!(idev.as_ref(), "Shutdown Rust I2C driver sample.\n"); in shutdown()
64 dev_info!(idev.as_ref(), "Unbind Rust I2C driver sample.\n"); in unbind()
H A Drust_i2c_client.rs118 pdev.as_ref(), in probe()
128 i2c::Registration::new(&adapter, &BOARD_INFO, pdev.as_ref()) in probe()
138 pdev.as_ref(), in unbind()
H A Drust_driver_auxiliary.rs89 pdev.as_ref(), in connect()
102 pdev.as_ref(), in connect()
H A Drust_driver_usb.rs37 let dev: &device::Device<Core<'_>> = intf.as_ref(); in disconnect()
44 let dev: &device::Device<Core<'_>> = intf.as_ref();
H A Drust_driver_pci.rs
H A Drust_dma.rs77 Coherent::zeroed_slice(pdev.as_ref(), TEST_VALUES.len(), GFP_KERNEL)?; in probe()
86 let sgt = SGTable::new(pdev.as_ref(), pages, DataDirection::ToDevice, GFP_KERNEL); in probe()
H A Drust_driver_platform.rs112 let dev = pdev.as_ref(); in probe()
H A Drust_driver_faux.rs
/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()
H A Daref.rs159 unsafe { self.ptr.as_ref() } in from()
/linux/rust/kernel/pci/
H A Dirq.rs111 Ok(unsafe { IrqRequest::new(self.dev.as_ref(), irq as u32) }) in try_into()
159 devres::register(dev.as_ref(), irq_vecs, GFP_KERNEL)?; in register()
/linux/drivers/android/binder/
H A Dtransaction.rs217 Some(self.from_parent.as_ref()?.clone()) in clone_next()
238 if core::ptr::eq(thread, transaction.from.as_ref()) { in find_from()
362 let target_node_match = match (self.target_node.as_ref(), old.target_node.as_ref()) { in can_replace()
H A Derror.rs75 BR_FAILED_REPLY => match self.source.as_ref() { in fmt()

12