浏览代码

Kernel/Storage: Remove redundant reference to a controller in IDEChannel

IDEChannel which is an ATAPort derived class holded a NonnullRefPtr to a
parent IDEController, although we can easily defer the usage of it to
not be in the IDEChannel code at all, so it allows to keep NonnullRefPtr
to the parent ATAController in the ATAPort base class and only there.
Liav A 3 年之前
父节点
当前提交
f96e8e97e6
共有 2 个文件被更改,包括 0 次插入3 次删除
  1. 0 2
      Kernel/Storage/ATA/GenericIDE/Channel.cpp
  2. 0 1
      Kernel/Storage/ATA/GenericIDE/Channel.h

+ 0 - 2
Kernel/Storage/ATA/GenericIDE/Channel.cpp

@@ -122,7 +122,6 @@ UNMAP_AFTER_INIT IDEChannel::IDEChannel(IDEController const& controller, u8 irq,
     , IRQHandler(irq)
     , IRQHandler(irq)
     , m_channel_type(type)
     , m_channel_type(type)
     , m_io_group(io_group)
     , m_io_group(io_group)
-    , m_parent_controller(controller)
 {
 {
 }
 }
 
 
@@ -131,7 +130,6 @@ UNMAP_AFTER_INIT IDEChannel::IDEChannel(IDEController const& controller, IOAddre
     , IRQHandler(type == ChannelType::Primary ? PATA_PRIMARY_IRQ : PATA_SECONDARY_IRQ)
     , IRQHandler(type == ChannelType::Primary ? PATA_PRIMARY_IRQ : PATA_SECONDARY_IRQ)
     , m_channel_type(type)
     , m_channel_type(type)
     , m_io_group(io_group)
     , m_io_group(io_group)
-    , m_parent_controller(controller)
 {
 {
 }
 }
 
 

+ 0 - 1
Kernel/Storage/ATA/GenericIDE/Channel.h

@@ -165,6 +165,5 @@ private:
     bool m_interrupts_enabled { true };
     bool m_interrupts_enabled { true };
 
 
     IOAddressGroup m_io_group;
     IOAddressGroup m_io_group;
-    NonnullRefPtr<IDEController> m_parent_controller;
 };
 };
 }
 }