aboutsummaryrefslogtreecommitdiff
path: root/backends/testdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'backends/testdev.c')
-rw-r--r--backends/testdev.c7
1 files changed, 5 insertions, 2 deletions
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);