summaryrefslogtreecommitdiff
path: root/Kernel/Devices/HID
diff options
context:
space:
mode:
Diffstat (limited to 'Kernel/Devices/HID')
-rw-r--r--Kernel/Devices/HID/KeyboardDevice.cpp8
-rw-r--r--Kernel/Devices/HID/KeyboardDevice.h10
-rw-r--r--Kernel/Devices/HID/MouseDevice.cpp6
-rw-r--r--Kernel/Devices/HID/MouseDevice.h8
4 files changed, 16 insertions, 16 deletions
diff --git a/Kernel/Devices/HID/KeyboardDevice.cpp b/Kernel/Devices/HID/KeyboardDevice.cpp
index b7b374cc3c..68a5efedc2 100644
--- a/Kernel/Devices/HID/KeyboardDevice.cpp
+++ b/Kernel/Devices/HID/KeyboardDevice.cpp
@@ -273,12 +273,12 @@ UNMAP_AFTER_INIT KeyboardDevice::~KeyboardDevice()
{
}
-bool KeyboardDevice::can_read(const FileDescription&, size_t) const
+bool KeyboardDevice::can_read(const OpenFileDescription&, size_t) const
{
return !m_queue.is_empty();
}
-KResultOr<size_t> KeyboardDevice::read(FileDescription&, u64, UserOrKernelBuffer& buffer, size_t size)
+KResultOr<size_t> KeyboardDevice::read(OpenFileDescription&, u64, UserOrKernelBuffer& buffer, size_t size)
{
size_t nread = 0;
SpinlockLocker lock(m_queue_lock);
@@ -306,12 +306,12 @@ KResultOr<size_t> KeyboardDevice::read(FileDescription&, u64, UserOrKernelBuffer
return nread;
}
-KResultOr<size_t> KeyboardDevice::write(FileDescription&, u64, const UserOrKernelBuffer&, size_t)
+KResultOr<size_t> KeyboardDevice::write(OpenFileDescription&, u64, const UserOrKernelBuffer&, size_t)
{
return 0;
}
-KResult KeyboardDevice::ioctl(FileDescription&, unsigned request, Userspace<void*> arg)
+KResult KeyboardDevice::ioctl(OpenFileDescription&, unsigned request, Userspace<void*> arg)
{
switch (request) {
case KEYBOARD_IOCTL_GET_NUM_LOCK: {
diff --git a/Kernel/Devices/HID/KeyboardDevice.h b/Kernel/Devices/HID/KeyboardDevice.h
index cbb705b605..6065474523 100644
--- a/Kernel/Devices/HID/KeyboardDevice.h
+++ b/Kernel/Devices/HID/KeyboardDevice.h
@@ -25,10 +25,10 @@ public:
virtual ~KeyboardDevice() override;
// ^CharacterDevice
- virtual KResultOr<size_t> read(FileDescription&, u64, UserOrKernelBuffer&, size_t) override;
- virtual bool can_read(const FileDescription&, size_t) const override;
- virtual KResultOr<size_t> write(FileDescription&, u64, const UserOrKernelBuffer&, size_t) override;
- virtual bool can_write(const FileDescription&, size_t) const override { return true; }
+ virtual KResultOr<size_t> read(OpenFileDescription&, u64, UserOrKernelBuffer&, size_t) override;
+ virtual bool can_read(const OpenFileDescription&, size_t) const override;
+ virtual KResultOr<size_t> write(OpenFileDescription&, u64, const UserOrKernelBuffer&, size_t) override;
+ virtual bool can_write(const OpenFileDescription&, size_t) const override { return true; }
// ^HIDDevice
virtual Type instrument_type() const override { return Type::Keyboard; }
@@ -37,7 +37,7 @@ public:
virtual mode_t required_mode() const override { return 0440; }
// ^File
- virtual KResult ioctl(FileDescription&, unsigned request, Userspace<void*> arg) override;
+ virtual KResult ioctl(OpenFileDescription&, unsigned request, Userspace<void*> arg) override;
virtual String device_name() const override { return String::formatted("keyboard{}", minor()); }
diff --git a/Kernel/Devices/HID/MouseDevice.cpp b/Kernel/Devices/HID/MouseDevice.cpp
index 6ad5658900..a3c263d570 100644
--- a/Kernel/Devices/HID/MouseDevice.cpp
+++ b/Kernel/Devices/HID/MouseDevice.cpp
@@ -18,13 +18,13 @@ MouseDevice::~MouseDevice()
{
}
-bool MouseDevice::can_read(const FileDescription&, size_t) const
+bool MouseDevice::can_read(const OpenFileDescription&, size_t) const
{
SpinlockLocker lock(m_queue_lock);
return !m_queue.is_empty();
}
-KResultOr<size_t> MouseDevice::read(FileDescription&, u64, UserOrKernelBuffer& buffer, size_t size)
+KResultOr<size_t> MouseDevice::read(OpenFileDescription&, u64, UserOrKernelBuffer& buffer, size_t size)
{
VERIFY(size > 0);
size_t nread = 0;
@@ -48,7 +48,7 @@ KResultOr<size_t> MouseDevice::read(FileDescription&, u64, UserOrKernelBuffer& b
return nread;
}
-KResultOr<size_t> MouseDevice::write(FileDescription&, u64, const UserOrKernelBuffer&, size_t)
+KResultOr<size_t> MouseDevice::write(OpenFileDescription&, u64, const UserOrKernelBuffer&, size_t)
{
return 0;
}
diff --git a/Kernel/Devices/HID/MouseDevice.h b/Kernel/Devices/HID/MouseDevice.h
index ad1c94cbe6..73105f9e89 100644
--- a/Kernel/Devices/HID/MouseDevice.h
+++ b/Kernel/Devices/HID/MouseDevice.h
@@ -23,10 +23,10 @@ public:
virtual ~MouseDevice() override;
// ^CharacterDevice
- virtual KResultOr<size_t> read(FileDescription&, u64, UserOrKernelBuffer&, size_t) override;
- virtual bool can_read(const FileDescription&, size_t) const override;
- virtual KResultOr<size_t> write(FileDescription&, u64, const UserOrKernelBuffer&, size_t) override;
- virtual bool can_write(const FileDescription&, size_t) const override { return true; }
+ virtual KResultOr<size_t> read(OpenFileDescription&, u64, UserOrKernelBuffer&, size_t) override;
+ virtual bool can_read(const OpenFileDescription&, size_t) const override;
+ virtual KResultOr<size_t> write(OpenFileDescription&, u64, const UserOrKernelBuffer&, size_t) override;
+ virtual bool can_write(const OpenFileDescription&, size_t) const override { return true; }
// ^HIDDevice
virtual Type instrument_type() const override { return Type::Mouse; }