Skip to content

Commit

Permalink
Forgot to deinit smbus and eeprom
Browse files Browse the repository at this point in the history
  • Loading branch information
ergo720 committed Aug 20, 2024
1 parent cac11f5 commit e7aed64
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/hw/machine.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ class machine {
m_cpu.deinit();
m_cmos.deinit();
m_nv2a.deinit();
m_smbus.deinit();
}
void start() { m_cpu.start(); }
void exit() { m_cpu.exit(); }
Expand Down
8 changes: 8 additions & 0 deletions src/hw/smbus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,14 @@ smbus::reset()
m_block_off = 0;
}

void
smbus::deinit()
{
for (auto dev : m_devs) {
dev.second->deinit();
}
}

bool
smbus::init()
{
Expand Down
1 change: 1 addition & 0 deletions src/hw/smbus.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class smbus {
public:
smbus(machine *machine) : m_machine(machine) {}
bool init();
void deinit();
void reset();
void update_io_logging() { update_io(true); }
template<bool log = false>
Expand Down

0 comments on commit e7aed64

Please sign in to comment.