mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
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>
This commit is contained in:
parent
c4f00daa5b
commit
732c919cf0
5 changed files with 67 additions and 34 deletions
|
@ -96,7 +96,7 @@ int main(int argc, char **argv)
|
|||
if (s) {
|
||||
qtest_quit(s);
|
||||
}
|
||||
g_free(i2c);
|
||||
omap_i2c_free(i2c);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue