emul: Fix emul_espi_host.c type coercion

The data_host variable in the emul_espi_host_send_cw function should be
assigned the espi host emulator data and not the espi_emul data.

Assign the variable to correct reference.

Signed-off-by: Aaron Massey <aaronmassey@google.com>
This commit is contained in:
Aaron Massey 2022-07-29 11:44:52 -06:00 committed by Kumar Gala
parent e7263b19e1
commit 1cebee4a43

View file

@ -175,7 +175,7 @@ int emul_espi_host_send_vw(const struct device *espi_dev, enum espi_vwire_signal
__ASSERT_NO_MSG(api->find_emul);
emul_espi = api->find_emul(espi_dev, EMUL_ESPI_HOST_CHIPSEL);
data_host = espi_dev->data;
data_host = emul_espi->target->data;
idx = emul_host_find_index(data_host, vw);
if (idx < 0 || data_host->vw_state[idx].dir != ESPI_MASTER_TO_SLAVE) {