From 247c92af2beaee26ad8fe5fd7cd04220681f156e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Mon, 12 Dec 2016 14:43:10 +0300 Subject: char: move null chardev to its own file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marc-André Lureau Reviewed-by: Eric Blake --- chardev/char.c | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'chardev/char.c') diff --git a/chardev/char.c b/chardev/char.c index ee6ceb3..2ca6c7c 100644 --- a/chardev/char.c +++ b/chardev/char.c @@ -560,28 +560,6 @@ static const TypeInfo char_type_info = { .class_init = char_class_init, }; -static void null_chr_open(Chardev *chr, - ChardevBackend *backend, - bool *be_opened, - Error **errp) -{ - *be_opened = false; -} - -static void char_null_class_init(ObjectClass *oc, void *data) -{ - ChardevClass *cc = CHARDEV_CLASS(oc); - - cc->open = null_chr_open; -} - -static const TypeInfo char_null_type_info = { - .name = TYPE_CHARDEV_NULL, - .parent = TYPE_CHARDEV, - .instance_size = sizeof(Chardev), - .class_init = char_null_class_init, -}; - /* MUX driver for serial I/O splitting */ #define MAX_MUX 4 #define MUX_BUFFER_SIZE 32 /* Must be a power of 2. */ @@ -5105,7 +5083,6 @@ static void register_types(void) type_register_static(&char_win_type_info); type_register_static(&char_win_stdio_type_info); #endif - type_register_static(&char_null_type_info); type_register_static(&char_socket_type_info); type_register_static(&char_udp_type_info); type_register_static(&char_ringbuf_type_info); -- cgit v1.1