sc53c94: Remove duplicate bus_obj.

sc53c94 is a ScsiDevice which has its own bus_obj which is set by register_device.
This commit is contained in:
joevt 2024-03-10 16:08:49 -07:00 committed by dingusdev
parent 338bbe27a8
commit 02a475e113
2 changed files with 4 additions and 5 deletions

View File

@ -43,10 +43,10 @@ Sc53C94::Sc53C94(uint8_t chip_id, uint8_t my_id) : ScsiDevice("SC53C94", my_id)
int Sc53C94::device_postinit() int Sc53C94::device_postinit()
{ {
this->bus_obj = dynamic_cast<ScsiBus*>(gMachineObj->get_comp_by_name("ScsiCurio")); ScsiBus* bus = dynamic_cast<ScsiBus*>(gMachineObj->get_comp_by_name("ScsiCurio"));
if (this->bus_obj) { if (bus) {
this->bus_obj->register_device(7, static_cast<ScsiDevice*>(this)); bus->register_device(7, static_cast<ScsiDevice*>(this));
this->bus_obj->attach_scsi_devices(""); bus->attach_scsi_devices("");
} }
this->int_ctrl = dynamic_cast<InterruptCtrl*>( this->int_ctrl = dynamic_cast<InterruptCtrl*>(

View File

@ -244,7 +244,6 @@ protected:
private: private:
uint8_t chip_id = 0; uint8_t chip_id = 0;
uint8_t my_bus_id = 0; uint8_t my_bus_id = 0;
ScsiBus* bus_obj;
uint32_t my_timer_id = 0; uint32_t my_timer_id = 0;
uint8_t cmd_fifo[2]; uint8_t cmd_fifo[2];