mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
qom: Unify type registration
Replace device_init() with generalized type_init(). While at it, unify naming convention: type_init([$prefix_]register_types) Also, type_init() is a function, so add preceding blank line where necessary and don't put a semicolon after the closing brace. Signed-off-by: Andreas Färber <afaerber@suse.de> Cc: Anthony Liguori <anthony@codemonkey.ws> Cc: malc <av1474@comtv.ru> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
committed by
Anthony Liguori
parent
59f971d451
commit
83f7d43a9e
@@ -184,10 +184,10 @@ static TypeInfo virtio_9p_info = {
|
||||
.class_init = virtio_9p_class_init,
|
||||
};
|
||||
|
||||
static void virtio_9p_register_devices(void)
|
||||
static void virtio_9p_register_types(void)
|
||||
{
|
||||
type_register_static(&virtio_9p_info);
|
||||
virtio_9p_set_fd_limit();
|
||||
}
|
||||
|
||||
device_init(virtio_9p_register_devices)
|
||||
type_init(virtio_9p_register_types)
|
||||
|
||||
+2
-2
@@ -238,9 +238,9 @@ static TypeInfo a9mp_priv_info = {
|
||||
.class_init = a9mp_priv_class_init,
|
||||
};
|
||||
|
||||
static void a9mp_register_devices(void)
|
||||
static void a9mp_register_types(void)
|
||||
{
|
||||
type_register_static(&a9mp_priv_info);
|
||||
}
|
||||
|
||||
device_init(a9mp_register_devices)
|
||||
type_init(a9mp_register_types)
|
||||
|
||||
@@ -1372,9 +1372,9 @@ static TypeInfo ac97_info = {
|
||||
.class_init = ac97_class_init,
|
||||
};
|
||||
|
||||
static void ac97_register (void)
|
||||
static void ac97_register_types (void)
|
||||
{
|
||||
type_register_static (&ac97_info);
|
||||
}
|
||||
device_init (ac97_register);
|
||||
|
||||
type_init (ac97_register_types)
|
||||
|
||||
+2
-2
@@ -426,12 +426,12 @@ static TypeInfo piix4_pm_info = {
|
||||
.class_init = piix4_pm_class_init,
|
||||
};
|
||||
|
||||
static void piix4_pm_register(void)
|
||||
static void piix4_pm_register_types(void)
|
||||
{
|
||||
type_register_static(&piix4_pm_info);
|
||||
}
|
||||
|
||||
device_init(piix4_pm_register);
|
||||
type_init(piix4_pm_register_types)
|
||||
|
||||
static uint32_t gpe_readb(void *opaque, uint32_t addr)
|
||||
{
|
||||
|
||||
+2
-2
@@ -168,9 +168,9 @@ static TypeInfo ads7846_info = {
|
||||
.class_init = ads7846_class_init,
|
||||
};
|
||||
|
||||
static void ads7846_register_devices(void)
|
||||
static void ads7846_register_types(void)
|
||||
{
|
||||
type_register_static(&ads7846_info);
|
||||
}
|
||||
|
||||
device_init(ads7846_register_devices)
|
||||
type_init(ads7846_register_types)
|
||||
|
||||
+3
-2
@@ -824,8 +824,9 @@ static TypeInfo typhoon_pcihost_info = {
|
||||
.class_init = typhoon_pcihost_class_init,
|
||||
};
|
||||
|
||||
static void typhoon_register(void)
|
||||
static void typhoon_register_types(void)
|
||||
{
|
||||
type_register_static(&typhoon_pcihost_info);
|
||||
}
|
||||
device_init(typhoon_register);
|
||||
|
||||
type_init(typhoon_register_types)
|
||||
|
||||
+2
-2
@@ -493,11 +493,11 @@ static TypeInfo pbm_pci_bridge_info = {
|
||||
.class_init = pbm_pci_bridge_class_init,
|
||||
};
|
||||
|
||||
static void pbm_register_devices(void)
|
||||
static void pbm_register_types(void)
|
||||
{
|
||||
type_register_static(&pbm_host_info);
|
||||
type_register_static(&pbm_pci_host_info);
|
||||
type_register_static(&pbm_pci_bridge_info);
|
||||
}
|
||||
|
||||
device_init(pbm_register_devices)
|
||||
type_init(pbm_register_types)
|
||||
|
||||
@@ -781,9 +781,9 @@ static TypeInfo apic_info = {
|
||||
.class_init = apic_class_init,
|
||||
};
|
||||
|
||||
static void apic_register_devices(void)
|
||||
static void apic_register_types(void)
|
||||
{
|
||||
type_register_static(&apic_info);
|
||||
}
|
||||
|
||||
device_init(apic_register_devices)
|
||||
type_init(apic_register_types)
|
||||
|
||||
+2
-2
@@ -313,9 +313,9 @@ static TypeInfo apic_common_type = {
|
||||
.abstract = true,
|
||||
};
|
||||
|
||||
static void register_devices(void)
|
||||
static void register_types(void)
|
||||
{
|
||||
type_register_static(&apic_common_type);
|
||||
}
|
||||
|
||||
device_init(register_devices);
|
||||
type_init(register_types)
|
||||
|
||||
+2
-2
@@ -243,9 +243,9 @@ static TypeInfo applesmc_isa_info = {
|
||||
.class_init = qdev_applesmc_class_init,
|
||||
};
|
||||
|
||||
static void applesmc_register_devices(void)
|
||||
static void applesmc_register_types(void)
|
||||
{
|
||||
type_register_static(&applesmc_isa_info);
|
||||
}
|
||||
|
||||
device_init(applesmc_register_devices)
|
||||
type_init(applesmc_register_types)
|
||||
|
||||
+2
-2
@@ -252,10 +252,10 @@ static TypeInfo mpcore_priv_info = {
|
||||
.class_init = mpcore_priv_class_init,
|
||||
};
|
||||
|
||||
static void arm11mpcore_register_devices(void)
|
||||
static void arm11mpcore_register_types(void)
|
||||
{
|
||||
type_register_static(&mpcore_rirq_info);
|
||||
type_register_static(&mpcore_priv_info);
|
||||
}
|
||||
|
||||
device_init(arm11mpcore_register_devices)
|
||||
type_init(arm11mpcore_register_types)
|
||||
|
||||
+2
-2
@@ -184,9 +184,9 @@ static TypeInfo l2x0_info = {
|
||||
.class_init = l2x0_class_init,
|
||||
};
|
||||
|
||||
static void l2x0_register_device(void)
|
||||
static void l2x0_register_types(void)
|
||||
{
|
||||
type_register_static(&l2x0_info);
|
||||
}
|
||||
|
||||
device_init(l2x0_register_device)
|
||||
type_init(l2x0_register_types)
|
||||
|
||||
+2
-2
@@ -335,9 +335,9 @@ static TypeInfo arm_mptimer_info = {
|
||||
.class_init = arm_mptimer_class_init,
|
||||
};
|
||||
|
||||
static void arm_mptimer_register_devices(void)
|
||||
static void arm_mptimer_register_types(void)
|
||||
{
|
||||
type_register_static(&arm_mptimer_info);
|
||||
}
|
||||
|
||||
device_init(arm_mptimer_register_devices)
|
||||
type_init(arm_mptimer_register_types)
|
||||
|
||||
+2
-2
@@ -425,9 +425,9 @@ static TypeInfo arm_sysctl_info = {
|
||||
.class_init = arm_sysctl_class_init,
|
||||
};
|
||||
|
||||
static void arm_sysctl_register_devices(void)
|
||||
static void arm_sysctl_register_types(void)
|
||||
{
|
||||
type_register_static(&arm_sysctl_info);
|
||||
}
|
||||
|
||||
device_init(arm_sysctl_register_devices)
|
||||
type_init(arm_sysctl_register_types)
|
||||
|
||||
+2
-2
@@ -383,10 +383,10 @@ static TypeInfo sp804_info = {
|
||||
.class_init = sp804_class_init,
|
||||
};
|
||||
|
||||
static void arm_timer_register_devices(void)
|
||||
static void arm_timer_register_types(void)
|
||||
{
|
||||
type_register_static(&icp_pit_info);
|
||||
type_register_static(&sp804_info);
|
||||
}
|
||||
|
||||
device_init(arm_timer_register_devices)
|
||||
type_init(arm_timer_register_types)
|
||||
|
||||
+2
-2
@@ -266,9 +266,9 @@ static TypeInfo bitband_info = {
|
||||
.class_init = bitband_class_init,
|
||||
};
|
||||
|
||||
static void armv7m_register_devices(void)
|
||||
static void armv7m_register_types(void)
|
||||
{
|
||||
type_register_static(&bitband_info);
|
||||
}
|
||||
|
||||
device_init(armv7m_register_devices)
|
||||
type_init(armv7m_register_types)
|
||||
|
||||
+2
-2
@@ -417,9 +417,9 @@ static TypeInfo armv7m_nvic_info = {
|
||||
.class_init = armv7m_nvic_class_init,
|
||||
};
|
||||
|
||||
static void armv7m_nvic_register_devices(void)
|
||||
static void armv7m_nvic_register_types(void)
|
||||
{
|
||||
type_register_static(&armv7m_nvic_info);
|
||||
}
|
||||
|
||||
device_init(armv7m_nvic_register_devices)
|
||||
type_init(armv7m_nvic_register_types)
|
||||
|
||||
+2
-2
@@ -237,9 +237,9 @@ static TypeInfo gpio_i2c_info = {
|
||||
.class_init = gpio_i2c_class_init,
|
||||
};
|
||||
|
||||
static void bitbang_i2c_register(void)
|
||||
static void bitbang_i2c_register_types(void)
|
||||
{
|
||||
type_register_static(&gpio_i2c_info);
|
||||
}
|
||||
|
||||
device_init(bitbang_i2c_register)
|
||||
type_init(bitbang_i2c_register_types)
|
||||
|
||||
+3
-2
@@ -804,9 +804,10 @@ static TypeInfo bonito_pcihost_info = {
|
||||
.class_init = bonito_pcihost_class_init,
|
||||
};
|
||||
|
||||
static void bonito_register(void)
|
||||
static void bonito_register_types(void)
|
||||
{
|
||||
type_register_static(&bonito_pcihost_info);
|
||||
type_register_static(&bonito_info);
|
||||
}
|
||||
device_init(bonito_register);
|
||||
|
||||
type_init(bonito_register_types)
|
||||
|
||||
@@ -594,9 +594,9 @@ static TypeInfo emulated_card_info = {
|
||||
.class_init = emulated_class_initfn,
|
||||
};
|
||||
|
||||
static void ccid_card_emulated_register_devices(void)
|
||||
static void ccid_card_emulated_register_types(void)
|
||||
{
|
||||
type_register_static(&emulated_card_info);
|
||||
}
|
||||
|
||||
device_init(ccid_card_emulated_register_devices)
|
||||
type_init(ccid_card_emulated_register_types)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user