sclp: sort into categories
authorCornelia Huck <cornelia.huck@de.ibm.com>
Tue, 17 Mar 2015 12:44:39 +0000 (13:44 +0100)
committerCornelia Huck <cornelia.huck@de.ibm.com>
Thu, 30 Apr 2015 11:21:41 +0000 (13:21 +0200)
Sort the sclp consoles into the input category, just as virtio-serial.
Various other sclp devices don't have an obvious category, sort them
into misc.

Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
hw/char/sclpconsole-lm.c
hw/char/sclpconsole.c
hw/s390x/event-facility.c
hw/s390x/sclp.c
hw/s390x/sclpcpu.c
hw/s390x/sclpquiesce.c

index a9f5e62f24056194a72230e8e3a00984c5315278..02ac80b650ad395542a215e8d8c3d69862eae622 100644 (file)
@@ -364,6 +364,7 @@ static void console_class_init(ObjectClass *klass, void *data)
     ec->can_handle_event = can_handle_event;
     ec->read_event_data = read_event_data;
     ec->write_event_data = write_event_data;
+    set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
 }
 
 static const TypeInfo sclp_console_info = {
index 79891dfc5833bab911ba781f7c7808c360af6606..b014c7f5228876f5cd2f675827a5424ed96f6902 100644 (file)
@@ -266,6 +266,7 @@ static void console_class_init(ObjectClass *klass, void *data)
     ec->can_handle_event = can_handle_event;
     ec->read_event_data = read_event_data;
     ec->write_event_data = write_event_data;
+    set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
 }
 
 static const TypeInfo sclp_console_info = {
index 78da718362ce4a4c712309305c77bb73e3248ba7..1cb116a2975b18e3c6049669c5dd2ab4e38461d2 100644 (file)
@@ -362,6 +362,7 @@ static void init_event_facility_class(ObjectClass *klass, void *data)
 
     dc->reset = reset_event_facility;
     dc->vmsd = &vmstate_event_facility;
+    set_bit(DEVICE_CATEGORY_MISC, dc->categories);
     k->init = init_event_facility;
     k->command_handler = command_handler;
     k->event_pending = event_pending;
index a969975a787736ef4b9ae75e0f8d09b0e78ab595..b3a6c5e5a46afaaa8624e00dc7291010e9ee033c 100644 (file)
@@ -457,10 +457,19 @@ sclpMemoryHotplugDev *get_sclp_memory_hotplug_dev(void)
                                    TYPE_SCLP_MEMORY_HOTPLUG_DEV, NULL));
 }
 
+static void sclp_memory_hotplug_dev_class_init(ObjectClass *klass,
+                                               void *data)
+{
+    DeviceClass *dc = DEVICE_CLASS(klass);
+
+    set_bit(DEVICE_CATEGORY_MISC, dc->categories);
+}
+
 static TypeInfo sclp_memory_hotplug_dev_info = {
     .name = TYPE_SCLP_MEMORY_HOTPLUG_DEV,
     .parent = TYPE_SYS_BUS_DEVICE,
     .instance_size = sizeof(sclpMemoryHotplugDev),
+    .class_init = sclp_memory_hotplug_dev_class_init,
 };
 
 static void register_types(void)
index 3600fe231dbb6aa78dd2b6dc717042c2a35b0e36..2fe8b5aa40e872498411877bf02febfc1e3b092f 100644 (file)
@@ -88,12 +88,14 @@ static int irq_cpu_hotplug_init(SCLPEvent *event)
 static void cpu_class_init(ObjectClass *oc, void *data)
 {
     SCLPEventClass *k = SCLP_EVENT_CLASS(oc);
+    DeviceClass *dc = DEVICE_CLASS(oc);
 
     k->init = irq_cpu_hotplug_init;
     k->get_send_mask = send_mask;
     k->get_receive_mask = receive_mask;
     k->read_event_data = read_event_data;
     k->write_event_data = NULL;
+    set_bit(DEVICE_CATEGORY_MISC, dc->categories);
 }
 
 static const TypeInfo sclp_cpu_info = {
index 1a399bd1f0b9a60779d3e68ed54dd53b37529c14..ffa555313561f91a88b34175039619714e1fcb6a 100644 (file)
@@ -116,6 +116,7 @@ static void quiesce_class_init(ObjectClass *klass, void *data)
 
     dc->reset = quiesce_reset;
     dc->vmsd = &vmstate_sclpquiesce;
+    set_bit(DEVICE_CATEGORY_MISC, dc->categories);
     k->init = quiesce_init;
 
     k->get_send_mask = send_mask;