mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
hw/i2c: Rename i2c_create_slave() as i2c_slave_create_simple()
We use "create_simple" names for functions that allocate, initialize, configure and realize device objects: pci_create_simple(), isa_create_simple(), usb_create_simple(). For consistency, rename i2c_create_slave() as i2c_slave_create_simple(). Since we have to update all the callers, also let it return a I2CSlave object. Suggested-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Corey Minyard <cminyard@mvista.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20200705224154.16917-5-f4bug@amsat.org> Signed-off-by: Corey Minyard <cminyard@mvista.com>
This commit is contained in:
parent
2616f57231
commit
1373b15bb5
16 changed files with 54 additions and 53 deletions
|
@ -787,7 +787,7 @@ static void spitz_i2c_setup(PXA2xxState *cpu)
|
|||
DeviceState *wm;
|
||||
|
||||
/* Attach a WM8750 to the bus */
|
||||
wm = i2c_create_slave(bus, TYPE_WM8750, 0);
|
||||
wm = DEVICE(i2c_slave_create_simple(bus, TYPE_WM8750, 0));
|
||||
|
||||
spitz_wm8750_addr(wm, 0, 0);
|
||||
qdev_connect_gpio_out(cpu->gpio, SPITZ_GPIO_WM,
|
||||
|
@ -802,7 +802,7 @@ static void spitz_i2c_setup(PXA2xxState *cpu)
|
|||
static void spitz_akita_i2c_setup(PXA2xxState *cpu)
|
||||
{
|
||||
/* Attach a Max7310 to Akita I2C bus. */
|
||||
i2c_create_slave(pxa2xx_i2c_bus(cpu->i2c[0]), "max7310",
|
||||
i2c_slave_create_simple(pxa2xx_i2c_bus(cpu->i2c[0]), "max7310",
|
||||
AKITA_MAX_ADDR);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue