diff options
author | Andreas Färber <afaerber@suse.de> | 2012-02-09 15:20:55 +0100 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2012-02-15 09:39:21 -0600 |
commit | 83f7d43a9ef70b1b91e465173e18c845420e931e (patch) | |
tree | c34cbc9d6f7986f2d643a9e7077a519386dbb55a /hw/vt82c686.c | |
parent | 59f971d451fbabee3194bb565f40846398ee6e6f (diff) |
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>
Diffstat (limited to 'hw/vt82c686.c')
-rw-r--r-- | hw/vt82c686.c | 29 |
1 files changed, 6 insertions, 23 deletions
diff --git a/hw/vt82c686.c b/hw/vt82c686.c index aa0954f487..fbab0bbc07 100644 --- a/hw/vt82c686.c +++ b/hw/vt82c686.c @@ -366,13 +366,6 @@ static TypeInfo via_ac97_info = { .class_init = via_ac97_class_init, }; -static void vt82c686b_ac97_register(void) -{ - type_register_static(&via_ac97_info); -} - -device_init(vt82c686b_ac97_register); - static int vt82c686b_mc97_initfn(PCIDevice *dev) { VT686MC97State *s = DO_UPCAST(VT686MC97State, dev, dev); @@ -414,13 +407,6 @@ static TypeInfo via_mc97_info = { .class_init = via_mc97_class_init, }; -static void vt82c686b_mc97_register(void) -{ - type_register_static(&via_mc97_info); -} - -device_init(vt82c686b_mc97_register); - /* vt82c686 pm init */ static int vt82c686b_pm_initfn(PCIDevice *dev) { @@ -497,13 +483,6 @@ static TypeInfo via_pm_info = { .class_init = via_pm_class_init, }; -static void vt82c686b_pm_register(void) -{ - type_register_static(&via_pm_info); -} - -device_init(vt82c686b_pm_register); - static const VMStateDescription vmstate_via = { .name = "vt82c686b", .version_id = 1, @@ -571,8 +550,12 @@ static TypeInfo via_info = { .class_init = via_class_init, }; -static void vt82c686b_register(void) +static void vt82c686b_register_types(void) { + type_register_static(&via_ac97_info); + type_register_static(&via_mc97_info); + type_register_static(&via_pm_info); type_register_static(&via_info); } -device_init(vt82c686b_register); + +type_init(vt82c686b_register_types) |