| /linux/rust/kernel/ |
| H A D | platform.rs | 101 let info = <Self as driver::Adapter>::id_info(pdev.as_ref()); in probe_callback() 106 pdev.as_ref().set_drvdata(data)?; in probe_callback() 121 let data = unsafe { pdev.as_ref().drvdata_borrow::<T>() }; in remove_callback() 310 .map(|resource| unsafe { IoRequest::new(self.as_ref(), resource) }) in io_request_by_index() 318 .map(|resource| unsafe { IoRequest::new(self.as_ref(), resource) }) in io_request_by_name() 397 Ok(unsafe { IrqRequest::new(self.as_ref(), irq as u32) }) in irq_by_index() 411 Ok(unsafe { IrqRequest::new(self.as_ref(), irq as u32) }) in optional_irq_by_index() 424 Ok(unsafe { IrqRequest::new(self.as_ref(), irq as u32) }) in irq_by_name() 440 Ok(unsafe { IrqRequest::new(self.as_ref(), irq as u32) }) in optional_irq_by_name() 518 unsafe { bindings::get_device(self.as_ref().as_raw()) }; in inc_ref() [all …]
|
| H A D | cpufreq.rs | 455 fn as_ref(&self) -> &bindings::cpufreq_policy { in as_ref() method 470 unsafe { CpuId::from_u32_unchecked(self.as_ref().cpu) } in cpu() 476 Hertz::from_khz(self.as_ref().min as usize) in min() 489 Hertz::from_khz(self.as_ref().max as usize) in max() 502 Hertz::from_khz(self.as_ref().cur as usize) in cur() 508 Hertz::from_khz(self.as_ref().suspend_freq as usize) in suspend_freq() 571 self.as_ref().fast_switch_possible in fast_switch_possible() 612 if self.as_ref().freq_table.is_null() { in freq_table() 618 Ok(unsafe { Table::from_raw(self.as_ref().freq_table) }) in freq_table() 635 if self.as_ref() in data() [all...] |
| H A D | i2c.rs | 164 Self::i2c_id_info(idev).or_else(|| <Self as driver::Adapter>::id_info(idev.as_ref())); in probe_callback() 169 idev.as_ref().set_drvdata(data)?; in probe_callback() 181 let data = unsafe { idev.as_ref().drvdata_borrow::<T>() }; in remove_callback() 193 let data = unsafe { idev.as_ref().drvdata_borrow::<T>() }; in shutdown_callback() 427 unsafe { bindings::i2c_put_adapter(obj.as_ref().as_raw()) } in dec_ref() 498 unsafe { bindings::get_device(self.as_ref().as_raw()) }; in inc_ref() 503 unsafe { bindings::put_device(&raw mut (*obj.as_ref().as_raw()).dev) } in dec_ref() 508 fn as_ref(&self) -> &device::Device<Ctx> { in as_ref() method
|
| H A D | auxiliary.rs | 95 adev.as_ref().set_drvdata(data)?; in probe_callback() 110 let data = unsafe { adev.as_ref().drvdata_borrow::<T>() }; in remove_callback() 266 unsafe { self.as_ref().parent().unwrap_unchecked() } in parent() 295 unsafe { bindings::get_device(self.as_ref().as_raw()) }; in inc_ref() 312 fn as_ref(&self) -> &device::Device<Ctx> { in as_ref() method
|
| H A D | usb.rs | 97 let dev: &device::Device<device::CoreInternal> = intf.as_ref(); in probe_callback() 110 let dev: &device::Device<device::CoreInternal> = intf.as_ref(); in disconnect_callback() 364 fn as_ref(&self) -> &device::Device<Ctx> { in as_ref() method 375 fn as_ref(&self) -> &Device { in as_ref() method 452 fn as_ref(&self) -> &device::Device<Ctx> { in as_ref() method
|
| H A D | dma.rs | 48 to_result(unsafe { bindings::dma_set_mask(self.as_ref().as_raw(), mask.value()) }) in dma_set_mask() 65 to_result(unsafe { bindings::dma_set_coherent_mask(self.as_ref().as_raw(), mask.value()) }) in dma_set_coherent_mask() 85 bindings::dma_set_mask_and_coherent(self.as_ref().as_raw(), mask.value()) in dma_set_mask_and_coherent() 103 unsafe { bindings::dma_set_max_seg_size(self.as_ref().as_raw(), size) } in dma_set_max_seg_size()
|
| H A D | module_param.rs | 73 let arg: &BStr = arg.as_ref(); in set_param() 138 self.value.as_ref().unwrap_or(&self.default) in value()
|
| H A D | opp.rs | 454 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 D | str.rs | 57 .strip_prefix(pattern.as_ref().deref()) in strip_prefix() 155 fn as_ref(&self) -> &BStr { in as_ref() method 161 fn as_ref(&self) -> &BStr { in as_ref() method 374 fn as_ref(&self) -> &BStr { in as_ref() method
|
| H A D | pci.rs | 118 pdev.as_ref().set_drvdata(data)?; in probe_callback() 133 let data = unsafe { pdev.as_ref().drvdata_borrow::<T>() }; in remove_callback() 490 fn as_ref(&self) -> &device::Device<Ctx> { in as_ref() method
|
| H A D | faux.rs | 63 fn as_ref(&self) -> &device::Device { in drop() 54 fn as_ref(&self) -> &device::Device { as_ref() method
|
| H A D | device.rs | 606 fn as_ref(&self) -> &Device<Ctx> { in as_ref() method 730 $crate::device::Device::$method($dev.as_ref(), $crate::prelude::fmt!($($f)*))
|
| /linux/rust/kernel/str/ |
| H A D | parse_int.rs | 33 [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 D | rust_dma.rs | 68 CoherentAllocation::alloc_coherent(pdev.as_ref(), TEST_VALUES.len(), GFP_KERNEL)?; in probe() 77 let sgt = SGTable::new(pdev.as_ref(), pages, DataDirection::ToDevice, GFP_KERNEL); in probe()
|
| H A D | rust_driver_i2c.rs | 47 let dev = idev.as_ref(); in probe() 59 dev_info!(idev.as_ref(), "Shutdown Rust I2C driver sample.\n"); in shutdown() 63 dev_info!(idev.as_ref(), "Unbind Rust I2C driver sample.\n"); in unbind()
|
| H A D | rust_i2c_client.rs | 117 pdev.as_ref(), in probe() 127 i2c::Registration::new(&adapter, &BOARD_INFO, pdev.as_ref()) in probe() 134 pdev.as_ref(), in unbind()
|
| H A D | rust_driver_auxiliary.rs | 76 _reg0 <- auxiliary::Registration::new(pdev.as_ref(), AUXILIARY_NAME, 0, MODULE_NAME), in probe() 77 _reg1 <- auxiliary::Registration::new(pdev.as_ref(), AUXILIARY_NAME, 1, MODULE_NAME), in probe()
|
| H A D | rust_driver_usb.rs | 36 let dev: &device::Device<Core> = intf.as_ref(); in disconnect() 43 let dev: &device::Device<Core> = intf.as_ref();
|
| H A D | rust_driver_pci.rs | 117 let bar = bar.access(pdev.as_ref())?; in probe() 132 if let Ok(bar) = this.bar.access(pdev.as_ref()) { in unbind()
|
| H A D | rust_driver_platform.rs | 111 let dev = pdev.as_ref(); in probe()
|
| H A D | rust_driver_faux.rs | |
| /linux/rust/kernel/sync/ |
| H A D | set_once.rs | 31 /// 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/rust/kernel/pci/ |
| H A D | irq.rs | 111 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 D | error.rs | 83 BR_FAILED_REPLY => match self.source.as_ref() { in fmt()
|
| H A D | thread.rs | 352 if core::ptr::eq(thread, transaction.from.as_ref()) { in pop_transaction_to_reply() 478 let mut t_opt = inner.current_transaction.as_ref(); in debug_print() 482 t_opt = t.from_parent.as_ref(); in debug_print() 973 let aligned_secctx_size = match secctx.as_ref() { in copy_transaction_data() 1069 object.as_ref(), in copy_transaction_data() 1116 inner.pop_transaction_to_reply(thread.as_ref()) in unwind_transaction_stack() 1190 if core::ptr::eq(self, cur.from.as_ref()) { in top_of_transaction_stack()
|