]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
hw/arm/mps2-tz: Use TYPE_IOTKIT instead of hardcoded string
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>
Tue, 28 Apr 2020 15:46:50 +0000 (17:46 +0200)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 4 May 2020 09:32:46 +0000 (10:32 +0100)
By using the TYPE_* definitions for devices, we can:
 - quickly find where devices are used with 'git-grep'
 - easily rename a device (one-line change).

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20200428154650.21991-1-f4bug@amsat.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/arm/mps2-tz.c

index a8dea7dde1c0551d05db39f89c94fdb58b9b1300..2c43041564c22f1cfeab36258ca7760c45e92736 100644 (file)
@@ -395,7 +395,7 @@ static void mps2tz_common_init(MachineState *machine)
         exit(EXIT_FAILURE);
     }
 
-    sysbus_init_child_obj(OBJECT(machine), "iotkit", &mms->iotkit,
+    sysbus_init_child_obj(OBJECT(machine), TYPE_IOTKIT, &mms->iotkit,
                           sizeof(mms->iotkit), mmc->armsse_type);
     iotkitdev = DEVICE(&mms->iotkit);
     object_property_set_link(OBJECT(&mms->iotkit), OBJECT(system_memory),