]> git.proxmox.com Git - mirror_qemu.git/commitdiff
s390x/css: use define for "virtual-css-bridge" literal
authorSascha Silbe <silbe@linux.vnet.ibm.com>
Mon, 4 Jul 2016 13:46:20 +0000 (15:46 +0200)
committerCornelia Huck <cornelia.huck@de.ibm.com>
Mon, 11 Jul 2016 07:48:05 +0000 (09:48 +0200)
Introduce a TYPE_* define (like we already use for a couple of other
QOM types) for the name of the virtual CSS bridge QOM type instead of
sprinkling the same string literal over several source files.

Signed-off-by: Sascha Silbe <silbe@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
hw/s390x/s390-virtio-ccw.c
hw/s390x/virtio-ccw.c
hw/s390x/virtio-ccw.h

index 52f079a8841526be503533633a3edce44e4e3397..3b79e96b09d5b7d3a76f52cd3a464c4fdda54bbf 100644 (file)
@@ -29,7 +29,7 @@
 #include "hw/s390x/s390-virtio-ccw.h"
 
 static const char *const reset_dev_types[] = {
-    "virtual-css-bridge",
+    TYPE_VIRTUAL_CSS_BRIDGE,
     "s390-sclp-event-facility",
     "s390-flic",
     "diag288",
index 67d7867c56b9e6f962e58988cd4a0176e826ef17..0afc0d36a6d2aa367615f1eb673eaef35b46700c 100644 (file)
@@ -130,7 +130,7 @@ VirtualCssBus *virtual_css_bus_init(void)
     DeviceState *dev;
 
     /* Create bridge device */
-    dev = qdev_create(NULL, "virtual-css-bridge");
+    dev = qdev_create(NULL, TYPE_VIRTUAL_CSS_BRIDGE);
     qdev_init_nofail(dev);
 
     /* Create bus on bridge device */
@@ -1626,7 +1626,7 @@ static void virtual_css_bridge_class_init(ObjectClass *klass, void *data)
 }
 
 static const TypeInfo virtual_css_bridge_info = {
-    .name          = "virtual-css-bridge",
+    .name          = TYPE_VIRTUAL_CSS_BRIDGE,
     .parent        = TYPE_SYS_BUS_DEVICE,
     .instance_size = sizeof(SysBusDevice),
     .class_init    = virtual_css_bridge_class_init,
index 7243fb08beda4972544c78ce581352fa34d4d944..61446254167aff4529ff7b278650125f7223f749 100644 (file)
@@ -101,6 +101,9 @@ static inline int virtio_ccw_rev_max(VirtioCcwDevice *dev)
     return dev->max_rev;
 }
 
+/* virtual css bridge type */
+#define TYPE_VIRTUAL_CSS_BRIDGE "virtual-css-bridge"
+
 /* virtual css bus type */
 typedef struct VirtualCssBus {
     BusState parent_obj;