From a1ed9d3c60337be16b9fa1ed386d474138227190 Mon Sep 17 00:00:00 2001 From: Jesse Buhagiar Date: Mon, 30 May 2022 22:54:37 +1000 Subject: [PATCH] Kernel/USB: Rename `get_interfaces` to something more sensible This name was misleading, as it wasn't really "getting" anything. It has hence been renamed to `enumerate_interfaces` to reflect what it's actually doing. --- Kernel/Bus/USB/USBConfiguration.cpp | 2 +- Kernel/Bus/USB/USBConfiguration.h | 2 +- Kernel/Bus/USB/USBDevice.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Kernel/Bus/USB/USBConfiguration.cpp b/Kernel/Bus/USB/USBConfiguration.cpp index 572cf2a581..93229d1e88 100644 --- a/Kernel/Bus/USB/USBConfiguration.cpp +++ b/Kernel/Bus/USB/USBConfiguration.cpp @@ -12,7 +12,7 @@ namespace Kernel::USB { -ErrorOr USBConfiguration::get_interfaces() +ErrorOr USBConfiguration::enumerate_interfaces() { auto descriptor_hierarchy_buffer = TRY(FixedArray::try_create(m_descriptor.total_length)); // Buffer for us to store the entire hierarchy into diff --git a/Kernel/Bus/USB/USBConfiguration.h b/Kernel/Bus/USB/USBConfiguration.h index 0b2140a20e..0f8106af4b 100644 --- a/Kernel/Bus/USB/USBConfiguration.h +++ b/Kernel/Bus/USB/USBConfiguration.h @@ -35,7 +35,7 @@ public: Vector const& interfaces() const { return m_interfaces; } - ErrorOr get_interfaces(); + ErrorOr enumerate_interfaces(); private: Device& m_device; // Reference to the device linked to this configuration diff --git a/Kernel/Bus/USB/USBDevice.cpp b/Kernel/Bus/USB/USBDevice.cpp index 4db695f129..a1307116af 100644 --- a/Kernel/Bus/USB/USBDevice.cpp +++ b/Kernel/Bus/USB/USBDevice.cpp @@ -132,7 +132,7 @@ ErrorOr Device::enumerate_device() } USBConfiguration device_configuration(*this, configuration_descriptor); - TRY(device_configuration.get_interfaces()); + TRY(device_configuration.enumerate_interfaces()); m_configurations.append(device_configuration); }