Thread Object *owner as the first argument through omap_lcdc_init()
and omap_dma_init(), matching the earlier conversion of omap1.c
sub-block helpers. omap310_mpu_init() passes its parent through.

No functional change intended.

Assisted-by: Kiro
Signed-off-by: Alexander Graf <[email protected]>
---
 hw/arm/omap1.c         | 4 ++--
 hw/display/omap_lcdc.c | 5 +++--
 hw/dma/omap_dma.c      | 4 ++--
 include/hw/arm/omap.h  | 5 +++--
 4 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/hw/arm/omap1.c b/hw/arm/omap1.c
index be6af35e26..474a3902fe 100644
--- a/hw/arm/omap1.c
+++ b/hw/arm/omap1.c
@@ -3800,7 +3800,7 @@ struct omap_mpu_state_s *omap310_mpu_init(Object *parent, 
MemoryRegion *dram,
         dma_irqs[i] = qdev_get_gpio_in(s->ih[omap1_dma_irq_map[i].ih],
                                        omap1_dma_irq_map[i].intr);
     }
-    s->dma = omap_dma_init(0xfffed800, dma_irqs, system_memory,
+    s->dma = omap_dma_init(parent, 0xfffed800, dma_irqs, system_memory,
                            qdev_get_gpio_in(s->ih[0], OMAP_INT_DMA_LCD),
                            s, omap_findclk(s, "dma_ck"));
 
@@ -3835,7 +3835,7 @@ struct omap_mpu_state_s *omap310_mpu_init(Object *parent, 
MemoryRegion *dram,
                     qdev_get_gpio_in(s->ih[1], OMAP_INT_OS_TIMER),
                     omap_findclk(s, "clk32-kHz"));
 
-    s->lcd = omap_lcdc_init(system_memory, 0xfffec000,
+    s->lcd = omap_lcdc_init(parent, system_memory, 0xfffec000,
                             qdev_get_gpio_in(s->ih[0], OMAP_INT_LCD_CTRL),
                             omap_dma_get_lcdch(s->dma),
                             omap_findclk(s, "lcd_ck"));
diff --git a/hw/display/omap_lcdc.c b/hw/display/omap_lcdc.c
index b88ea5f2f1..3f6066e3a8 100644
--- a/hw/display/omap_lcdc.c
+++ b/hw/display/omap_lcdc.c
@@ -489,7 +489,8 @@ static const GraphicHwOps omap_ops = {
     .gfx_update  = omap_update_display,
 };
 
-struct omap_lcd_panel_s *omap_lcdc_init(MemoryRegion *sysmem,
+struct omap_lcd_panel_s *omap_lcdc_init(Object *owner,
+                                        MemoryRegion *sysmem,
                                         hwaddr base,
                                         qemu_irq irq,
                                         struct omap_dma_lcd_channel_s *dma,
@@ -502,7 +503,7 @@ struct omap_lcd_panel_s *omap_lcdc_init(MemoryRegion 
*sysmem,
     s->sysmem = sysmem;
     omap_lcdc_reset(s);
 
-    memory_region_init_io(&s->iomem, NULL, &omap_lcdc_ops, s, "omap.lcdc", 
0x100);
+    memory_region_init_io(&s->iomem, owner, &omap_lcdc_ops, s, "omap.lcdc", 
0x100);
     memory_region_add_subregion(sysmem, base, &s->iomem);
 
     s->con = qemu_graphic_console_create(NULL, 0, &omap_ops, s);
diff --git a/hw/dma/omap_dma.c b/hw/dma/omap_dma.c
index 77f1441498..b130ba2480 100644
--- a/hw/dma/omap_dma.c
+++ b/hw/dma/omap_dma.c
@@ -1089,7 +1089,7 @@ static void omap_dma_clk_update(void *opaque, int line, 
int on)
             soc_dma_set_request(s->ch[i].dma, on);
 }
 
-struct soc_dma_s *omap_dma_init(hwaddr base, qemu_irq *irqs,
+struct soc_dma_s *omap_dma_init(Object *owner, hwaddr base, qemu_irq *irqs,
                                 MemoryRegion *sysmem,
                                 qemu_irq lcd_irq,
                                 struct omap_mpu_state_s *mpu, omap_clk clk)
@@ -1127,7 +1127,7 @@ struct soc_dma_s *omap_dma_init(hwaddr base, qemu_irq 
*irqs,
     omap_dma_reset(s->dma);
     omap_dma_clk_update(s, 0, 1);
 
-    memory_region_init_io(&s->iomem, NULL, &omap_dma_ops, s, "omap.dma", 
memsize);
+    memory_region_init_io(&s->iomem, owner, &omap_dma_ops, s, "omap.dma", 
memsize);
     memory_region_add_subregion(sysmem, base, &s->iomem);
 
     mpu->drq = s->dma->drq;
diff --git a/include/hw/arm/omap.h b/include/hw/arm/omap.h
index e000dffe13..591abf752b 100644
--- a/include/hw/arm/omap.h
+++ b/include/hw/arm/omap.h
@@ -173,7 +173,7 @@ void omap_gpio_set_clk(Omap1GpioState *gpio, omap_clk clk);
 
 /* omap_dma.c */
 struct soc_dma_s;
-struct soc_dma_s *omap_dma_init(hwaddr base, qemu_irq *irqs,
+struct soc_dma_s *omap_dma_init(Object *owner, hwaddr base, qemu_irq *irqs,
                                 MemoryRegion *sysmem,
                                 qemu_irq lcd_irq,
                                 struct omap_mpu_state_s *mpu, omap_clk clk);
@@ -296,7 +296,8 @@ void omap_mcbsp_i2s_attach(struct omap_mcbsp_s *s, I2SCodec 
*slave);
 /* omap_lcdc.c */
 struct omap_lcd_panel_s;
 void omap_lcdc_reset(struct omap_lcd_panel_s *s);
-struct omap_lcd_panel_s *omap_lcdc_init(MemoryRegion *sysmem,
+struct omap_lcd_panel_s *omap_lcdc_init(Object *owner,
+                                        MemoryRegion *sysmem,
                                         hwaddr base,
                                         qemu_irq irq,
                                         struct omap_dma_lcd_channel_s *dma,
-- 
2.47.1


Reply via email to