pc: Remove qemu_register_pc_machine() function

The helper is not needed anymore, as the PC machine classes are
registered using QOM directly.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
Eduardo Habkost 2015-05-15 14:18:57 -03:00 committed by Michael S. Tsirkin
parent 865906f7fd
commit d644b11657
2 changed files with 0 additions and 47 deletions

View File

@ -1543,51 +1543,6 @@ void ioapic_init_gsi(GSIState *gsi_state, const char *parent_name)
}
}
static void pc_generic_machine_class_init(ObjectClass *oc, void *data)
{
MachineClass *mc = MACHINE_CLASS(oc);
QEMUMachine *qm = data;
mc->family = qm->family;
mc->name = qm->name;
mc->alias = qm->alias;
mc->desc = qm->desc;
mc->init = qm->init;
mc->reset = qm->reset;
mc->hot_add_cpu = qm->hot_add_cpu;
mc->kvm_type = qm->kvm_type;
mc->block_default_type = qm->block_default_type;
mc->units_per_default_bus = qm->units_per_default_bus;
mc->max_cpus = qm->max_cpus;
mc->no_serial = qm->no_serial;
mc->no_parallel = qm->no_parallel;
mc->use_virtcon = qm->use_virtcon;
mc->use_sclp = qm->use_sclp;
mc->no_floppy = qm->no_floppy;
mc->no_cdrom = qm->no_cdrom;
mc->no_sdcard = qm->no_sdcard;
mc->is_default = qm->is_default;
mc->default_machine_opts = qm->default_machine_opts;
mc->default_boot_order = qm->default_boot_order;
mc->default_display = qm->default_display;
mc->compat_props = qm->compat_props;
mc->hw_version = qm->hw_version;
}
void qemu_register_pc_machine(QEMUMachine *m)
{
char *name = g_strconcat(m->name, TYPE_MACHINE_SUFFIX, NULL);
TypeInfo ti = {
.name = name,
.parent = TYPE_PC_MACHINE,
.class_init = pc_generic_machine_class_init,
.class_data = (void *)m,
};
type_register(&ti);
g_free(name);
}
static void pc_dimm_plug(HotplugHandler *hotplug_dev,
DeviceState *dev, Error **errp)
{

View File

@ -73,8 +73,6 @@ typedef struct PCMachineClass PCMachineClass;
#define PC_MACHINE_CLASS(klass) \
OBJECT_CLASS_CHECK(PCMachineClass, (klass), TYPE_PC_MACHINE)
void qemu_register_pc_machine(QEMUMachine *m);
/* PC-style peripherals (also used by other machines). */
typedef struct PcPciInfo {