Commit 183f6b8d authored by Cornelia Huck's avatar Cornelia Huck
Browse files

sclp: sort into categories



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: default avatarDavid Hildenbrand <dahi@linux.vnet.ibm.com>
Acked-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: default avatarCornelia Huck <cornelia.huck@de.ibm.com>
parent 4d1866de
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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 = {
+1 −0
Original line number Diff line number Diff line
@@ -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 = {
+1 −0
Original line number Diff line number Diff line
@@ -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;
+9 −0
Original line number Diff line number Diff line
@@ -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)
+2 −0
Original line number Diff line number Diff line
@@ -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 = {
Loading