summary refs log tree commit diff stats
path: root/hw/s390x/virtio-ccw-gpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/s390x/virtio-ccw-gpu.c')
-rw-r--r--hw/s390x/virtio-ccw-gpu.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/s390x/virtio-ccw-gpu.c b/hw/s390x/virtio-ccw-gpu.c
index c301e2586b..75a9e4bb39 100644
--- a/hw/s390x/virtio-ccw-gpu.c
+++ b/hw/s390x/virtio-ccw-gpu.c
@@ -62,7 +62,9 @@ static const TypeInfo virtio_ccw_gpu = {
 
 static void virtio_ccw_gpu_register(void)
 {
-    type_register_static(&virtio_ccw_gpu);
+    if (have_virtio_ccw) {
+        type_register_static(&virtio_ccw_gpu);
+    }
 }
 
 type_init(virtio_ccw_gpu_register)