summaryrefslogtreecommitdiff
path: root/Kernel
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2023-02-19 23:14:42 +0100
committerAndreas Kling <kling@serenityos.org>2023-02-21 00:54:04 +0100
commit68c97812993c77f131b1fe614c853c1aea395bf2 (patch)
treef51dabf8e7cf55901f3eb0c648b16b4cf0fe0bc8 /Kernel
parent053afbf2d17aaa14a09d0ef377e6396429e9b371 (diff)
downloadserenity-68c97812993c77f131b1fe614c853c1aea395bf2.zip
Kernel: Fix const-correctness of PCI::DeviceIdentifier usage
Diffstat (limited to 'Kernel')
-rw-r--r--Kernel/Bus/PCI/Device.h4
-rw-r--r--Kernel/FileSystem/SysFS/Subsystems/Bus/PCI/DeviceDirectory.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/Kernel/Bus/PCI/Device.h b/Kernel/Bus/PCI/Device.h
index 418c3ae3d9..58a47f0657 100644
--- a/Kernel/Bus/PCI/Device.h
+++ b/Kernel/Bus/PCI/Device.h
@@ -16,7 +16,7 @@ namespace Kernel::PCI {
class Device {
public:
- DeviceIdentifier& device_identifier() const { return *m_pci_identifier; };
+ DeviceIdentifier const& device_identifier() const { return *m_pci_identifier; };
virtual ~Device() = default;
@@ -38,7 +38,7 @@ protected:
explicit Device(DeviceIdentifier const& pci_identifier);
private:
- NonnullRefPtr<DeviceIdentifier> m_pci_identifier;
+ NonnullRefPtr<DeviceIdentifier const> m_pci_identifier;
};
template<typename... Parameters>
diff --git a/Kernel/FileSystem/SysFS/Subsystems/Bus/PCI/DeviceDirectory.h b/Kernel/FileSystem/SysFS/Subsystems/Bus/PCI/DeviceDirectory.h
index c02361d8ef..05042fb754 100644
--- a/Kernel/FileSystem/SysFS/Subsystems/Bus/PCI/DeviceDirectory.h
+++ b/Kernel/FileSystem/SysFS/Subsystems/Bus/PCI/DeviceDirectory.h
@@ -16,14 +16,14 @@ namespace Kernel {
class PCIDeviceSysFSDirectory final : public SysFSDirectory {
public:
static NonnullLockRefPtr<PCIDeviceSysFSDirectory> create(SysFSDirectory const&, PCI::DeviceIdentifier const&);
- PCI::DeviceIdentifier& device_identifier() const { return *m_device_identifier; }
+ PCI::DeviceIdentifier const& device_identifier() const { return *m_device_identifier; }
virtual StringView name() const override { return m_device_directory_name->view(); }
private:
PCIDeviceSysFSDirectory(NonnullOwnPtr<KString> device_directory_name, SysFSDirectory const&, PCI::DeviceIdentifier const&);
- NonnullRefPtr<PCI::DeviceIdentifier> m_device_identifier;
+ NonnullRefPtr<PCI::DeviceIdentifier const> m_device_identifier;
NonnullOwnPtr<KString> m_device_directory_name;
};