1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 06:07:44 +00:00

Kernel/VirtIO: Remove the m_class_name member

This class member was used only to determine the device type when
printing messages to the debug log. Instead, remove this class member,
and add a quick way to find the device type according to how the VirtIO
specification says to do that.

This simplifies construction of VirtIODevices a bit, because now the
constructor doesn't need to ask for a String identified with the device
type.
This commit is contained in:
Liav A 2021-08-27 11:41:27 +03:00 committed by Andreas Kling
parent 5a0aa66b73
commit 9a03c00f45
8 changed files with 56 additions and 35 deletions

View file

@ -13,7 +13,7 @@ namespace Kernel {
unsigned VirtIOConsole::next_device_id = 0;
UNMAP_AFTER_INIT VirtIOConsole::VirtIOConsole(PCI::Address address)
: VirtIODevice(address, "VirtIOConsole")
: VirtIODevice(address)
, m_device_id(next_device_id++)
{
if (auto cfg = get_config(ConfigurationType::Device)) {