summaryrefslogtreecommitdiff
path: root/rust/kernel/of.rs
diff options
context:
space:
mode:
authorBenjamin Tissoires <bentiss@kernel.org>2025-09-30 16:31:10 +0200
committerBenjamin Tissoires <bentiss@kernel.org>2025-09-30 16:31:10 +0200
commitd325efac5938efa3c2a25df72a1bd1af16cd0ed8 (patch)
tree6bb0db4f21bd6359bb32f3beeb63231477b09ef3 /rust/kernel/of.rs
parentbba920e6f803138587248079de47ad3464a396f6 (diff)
parentd1dd75c6500c74b91c5286fd3277710371d3e3ca (diff)
Merge branch 'for-6.18/core' into for-linus
- allow HID-BPF to rebind a driver to hid-multitouch (Benjamin Tissoires) - Change hid_driver to use a const char* for .name (Rahul Rameshbabu)
Diffstat (limited to 'rust/kernel/of.rs')
-rw-r--r--rust/kernel/of.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/rust/kernel/of.rs b/rust/kernel/of.rs
index 0888469bddb7..b76b35265df2 100644
--- a/rust/kernel/of.rs
+++ b/rust/kernel/of.rs
@@ -27,7 +27,7 @@ unsafe impl RawDeviceIdIndex for DeviceId {
const DRIVER_DATA_OFFSET: usize = core::mem::offset_of!(bindings::of_device_id, data);
fn index(&self) -> usize {
- self.0.data as _
+ self.0.data as usize
}
}
@@ -39,10 +39,10 @@ impl DeviceId {
// SAFETY: FFI type is valid to be zero-initialized.
let mut of: bindings::of_device_id = unsafe { core::mem::zeroed() };
- // TODO: Use `clone_from_slice` once the corresponding types do match.
+ // TODO: Use `copy_from_slice` once stabilized for `const`.
let mut i = 0;
while i < src.len() {
- of.compatible[i] = src[i] as _;
+ of.compatible[i] = src[i];
i += 1;
}