summaryrefslogtreecommitdiff
path: root/Kernel/Devices/HID
diff options
context:
space:
mode:
authorBrian Gianforcaro <bgianf@serenityos.org>2021-08-31 23:44:55 -0700
committerAndreas Kling <kling@serenityos.org>2021-09-01 18:06:14 +0200
commit668c4299000e013852bd07e5df81750db672d607 (patch)
treef65ddce4c981fa983a3c54d2de90a3d2c15b8cc4 /Kernel/Devices/HID
parentf3baa5d8c915285ea109cf12553e497adb7051ca (diff)
downloadserenity-668c4299000e013852bd07e5df81750db672d607.zip
Kernel: Convert UserOrKernelBuffer callbacks to use AK::Bytes
Diffstat (limited to 'Kernel/Devices/HID')
-rw-r--r--Kernel/Devices/HID/KeyboardDevice.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Kernel/Devices/HID/KeyboardDevice.cpp b/Kernel/Devices/HID/KeyboardDevice.cpp
index 85c5611d18..485d5ccbb3 100644
--- a/Kernel/Devices/HID/KeyboardDevice.cpp
+++ b/Kernel/Devices/HID/KeyboardDevice.cpp
@@ -292,9 +292,9 @@ KResultOr<size_t> KeyboardDevice::read(FileDescription&, u64, UserOrKernelBuffer
lock.unlock();
- auto result = buffer.write_buffered<sizeof(Event)>(sizeof(Event), [&](u8* data, size_t data_bytes) {
- memcpy(data, &event, sizeof(Event));
- return data_bytes;
+ auto result = buffer.write_buffered<sizeof(Event)>(sizeof(Event), [&](Bytes bytes) {
+ memcpy(bytes.data(), &event, sizeof(Event));
+ return bytes.size();
});
if (result.is_error())
return result.error();