libqos: split I2CAdapter initialization and allocation
Provide *_init functions that populate an I2CAdapter struct without
allocating one, and make the existing *_create functions wrap them.
Because in the new setup *_create might return a pointer inside the
IMXI2C or OMAPI2C struct, create companion *_free functions to go
back to the outer pointer.
All this is temporary until allocation will be handled entirely by
qgraph.
Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
Showing
- tests/libqos/i2c-imx.c 22 additions, 15 deletionstests/libqos/i2c-imx.c
- tests/libqos/i2c-omap.c 21 additions, 11 deletionstests/libqos/i2c-omap.c
- tests/libqos/i2c.h 18 additions, 2 deletionstests/libqos/i2c.h
- tests/pca9552-test.c 1 addition, 1 deletiontests/pca9552-test.c
- tests/tmp105-test.c 1 addition, 1 deletiontests/tmp105-test.c
Loading
Please register or sign in to comment