mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 09:13:55 -06:00
hw/i2c: name I2CNode list in I2CBus
To enable passing the current_devs field as a parameter, we need to use a named struct type. Tested: BMC firmware with i2c devices booted to userspace. Signed-off-by: Patrick Venture <venture@google.com> Reviewed-by: Hao Wu <wuhaotsh@google.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20210412194522.664594-2-venture@google.com> Signed-off-by: Corey Minyard <cminyard@mvista.com>
This commit is contained in:
parent
8fe9f1f891
commit
b98ec6896e
1 changed files with 3 additions and 1 deletions
|
@ -58,9 +58,11 @@ struct I2CNode {
|
||||||
QLIST_ENTRY(I2CNode) next;
|
QLIST_ENTRY(I2CNode) next;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
typedef QLIST_HEAD(I2CNodeList, I2CNode) I2CNodeList;
|
||||||
|
|
||||||
struct I2CBus {
|
struct I2CBus {
|
||||||
BusState qbus;
|
BusState qbus;
|
||||||
QLIST_HEAD(, I2CNode) current_devs;
|
I2CNodeList current_devs;
|
||||||
uint8_t saved_address;
|
uint8_t saved_address;
|
||||||
bool broadcast;
|
bool broadcast;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue