summaryrefslogtreecommitdiff
path: root/Kernel/Storage/PATADiskDevice.cpp
diff options
context:
space:
mode:
authorLiav A <liavalb@gmail.com>2021-03-27 06:22:55 +0300
committerAndreas Kling <kling@serenityos.org>2021-03-27 16:40:16 +0100
commitdfb6b296cf9ae8b5afa19cf2ea6813f0d774fcb1 (patch)
treee5d2aa91a74c932c46eb876857a1e06e72b1d5c2 /Kernel/Storage/PATADiskDevice.cpp
parent531037db7ecff1b340cdfd3a8c8f8c689585e4af (diff)
downloadserenity-dfb6b296cf9ae8b5afa19cf2ea6813f0d774fcb1.zip
Kernel: Make IDEChannel Ref-counted
Technically not supported by the original ATA specification, IDE hot swapping is still in practice possible, so the only sane way to start support it is with ref-counting the IDEChannel object so if we remove a PATADiskDevice, it's not gone with it.
Diffstat (limited to 'Kernel/Storage/PATADiskDevice.cpp')
-rw-r--r--Kernel/Storage/PATADiskDevice.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/Storage/PATADiskDevice.cpp b/Kernel/Storage/PATADiskDevice.cpp
index 4649b71581..1e6b6cba29 100644
--- a/Kernel/Storage/PATADiskDevice.cpp
+++ b/Kernel/Storage/PATADiskDevice.cpp
@@ -58,8 +58,8 @@ const char* PATADiskDevice::class_name() const
void PATADiskDevice::start_request(AsyncBlockDeviceRequest& request)
{
- bool use_dma = !m_channel.m_io_group.bus_master_base().is_null() && m_channel.m_dma_enabled.resource();
- m_channel.start_request(request, use_dma, is_slave(), m_capabilities);
+ bool use_dma = !m_channel->m_io_group.bus_master_base().is_null() && m_channel->m_dma_enabled.resource();
+ m_channel->start_request(request, use_dma, is_slave(), m_capabilities);
}
String PATADiskDevice::device_name() const