diff options
Diffstat (limited to 'backends')
-rw-r--r-- | backends/baum.c | 8 | ||||
-rw-r--r-- | backends/msmouse.c | 7 | ||||
-rw-r--r-- | backends/testdev.c | 7 |
3 files changed, 16 insertions, 6 deletions
diff --git a/backends/baum.c b/backends/baum.c index b045ef49c5..2e404a11cc 100644 --- a/backends/baum.c +++ b/backends/baum.c @@ -671,8 +671,12 @@ fail_handle: static void register_types(void) { - register_char_driver("braille", CHARDEV_BACKEND_KIND_BRAILLE, NULL, - chr_baum_init); + static const CharDriver driver = { + .kind = CHARDEV_BACKEND_KIND_BRAILLE, + .create = chr_baum_init, + }; + + register_char_driver(&driver); } type_init(register_types); diff --git a/backends/msmouse.c b/backends/msmouse.c index 733ca80f48..2490b2c073 100644 --- a/backends/msmouse.c +++ b/backends/msmouse.c @@ -179,8 +179,11 @@ static CharDriverState *qemu_chr_open_msmouse(const char *id, static void register_types(void) { - register_char_driver("msmouse", CHARDEV_BACKEND_KIND_MSMOUSE, NULL, - qemu_chr_open_msmouse); + static const CharDriver driver = { + .kind = CHARDEV_BACKEND_KIND_MSMOUSE, + .create = qemu_chr_open_msmouse, + }; + register_char_driver(&driver); } type_init(register_types); diff --git a/backends/testdev.c b/backends/testdev.c index 60156e320e..cd25094f86 100644 --- a/backends/testdev.c +++ b/backends/testdev.c @@ -130,8 +130,11 @@ static CharDriverState *chr_testdev_init(const char *id, static void register_types(void) { - register_char_driver("testdev", CHARDEV_BACKEND_KIND_TESTDEV, NULL, - chr_testdev_init); + static const CharDriver driver = { + .kind = CHARDEV_BACKEND_KIND_TESTDEV, + .create = chr_testdev_init, + }; + register_char_driver(&driver); } type_init(register_types); |