diff --git a/headers/private/kernel/disk_device_manager/KPartition.h b/headers/private/kernel/disk_device_manager/KPartition.h index d009bd3805..96053bf915 100644 --- a/headers/private/kernel/disk_device_manager/KPartition.h +++ b/headers/private/kernel/disk_device_manager/KPartition.h @@ -137,8 +137,6 @@ public: void SetDevice(KDiskDevice *device); KDiskDevice *Device() const; - - void SetParent(KPartition *parent); KPartition *Parent() const; status_t AddChild(KPartition *partition, int32 index = -1); diff --git a/src/system/kernel/disk_device_manager/KPartition.cpp b/src/system/kernel/disk_device_manager/KPartition.cpp index 0499a03d9e..e003e1c779 100644 --- a/src/system/kernel/disk_device_manager/KPartition.cpp +++ b/src/system/kernel/disk_device_manager/KPartition.cpp @@ -858,14 +858,6 @@ KPartition::Device() const } -void -KPartition::SetParent(KPartition* parent) -{ - // Must be called in a {Add,Remove}Child() only! - fParent = parent; -} - - KPartition* KPartition::Parent() const { @@ -898,7 +890,7 @@ KPartition::AddChild(KPartition* partition, int32 index) _UpdateChildIndices(count, index); fPartitionData.child_count++; - partition->SetParent(this); + partition->fParent = this; partition->SetDevice(Device()); partition->SetPhysicalBlockSize(PhysicalBlockSize()); @@ -961,7 +953,7 @@ KPartition::RemoveChild(int32 index) _UpdateChildIndices(index, fChildren.Count()); partition->SetIndex(-1); fPartitionData.child_count--; - partition->SetParent(NULL); + partition->fParent = NULL; partition->SetDevice(NULL); // notify listeners FireChildRemoved(partition, index);