hw/arm/nrf51_soc: set object owner in memory_region_init_ram
authorkumar sourav <sourav.jb1988@gmail.com>
Fri, 1 Feb 2019 14:55:41 +0000 (14:55 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 1 Feb 2019 14:55:41 +0000 (14:55 +0000)
set object owner in memory_region_init_ram() instead
of NULL.

Signed-off-by: kumar sourav <sourav.jb1988@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 20190125155630.17430-1-sourav.jb1988@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/arm/nrf51_soc.c

index 1630c27594038d6ef8d1a480c8e12eb6d4ddfd12..3a1c7e200cc885f965c439ae68e251b2b6a02fa5 100644 (file)
@@ -89,7 +89,8 @@ static void nrf51_soc_realize(DeviceState *dev_soc, Error **errp)
     }
     memory_region_add_subregion(&s->container, NRF51_FLASH_BASE, &s->flash);
 
-    memory_region_init_ram(&s->sram, NULL, "nrf51.sram", s->sram_size, &err);
+    memory_region_init_ram(&s->sram, OBJECT(s), "nrf51.sram", s->sram_size,
+                           &err);
     if (err) {
         error_propagate(errp, err);
         return;