Skip to content

Commit

Permalink
hw/i2c/bitbang_i2c: Remove unused dummy MemoryRegion
Browse files Browse the repository at this point in the history
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Acked-by: Corey Minyard <cminyard@mvista.com>
Message-id: 20230111085016.44551-3-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
  • Loading branch information
philmd authored and pm215 committed Jan 23, 2023
1 parent da8df26 commit 2b9339d
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions hw/i2c/bitbang_i2c.c
Expand Up @@ -165,9 +165,10 @@ void bitbang_i2c_init(bitbang_i2c_interface *s, I2CBus *bus)
OBJECT_DECLARE_SIMPLE_TYPE(GPIOI2CState, GPIO_I2C)

struct GPIOI2CState {
/*< private >*/
SysBusDevice parent_obj;
/*< public >*/

MemoryRegion dummy_iomem;
bitbang_i2c_interface bitbang;
int last_level;
qemu_irq out;
Expand All @@ -188,12 +189,8 @@ static void gpio_i2c_init(Object *obj)
{
DeviceState *dev = DEVICE(obj);
GPIOI2CState *s = GPIO_I2C(obj);
SysBusDevice *sbd = SYS_BUS_DEVICE(obj);
I2CBus *bus;

memory_region_init(&s->dummy_iomem, obj, "gpio_i2c", 0);
sysbus_init_mmio(sbd, &s->dummy_iomem);

bus = i2c_init_bus(dev, "i2c");
bitbang_i2c_init(&s->bitbang, bus);

Expand Down

0 comments on commit 2b9339d

Please sign in to comment.