mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
chardev: remove needless class method
"chr_option_parsed" is only implemented by the "mux" chardev, we can specialize the code there to avoid the needless generic class method. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
692277f38d
commit
5eed493d01
2 changed files with 2 additions and 5 deletions
|
@ -386,10 +386,9 @@ void suspend_mux_open(void)
|
|||
static int chardev_options_parsed_cb(Object *child, void *opaque)
|
||||
{
|
||||
Chardev *chr = (Chardev *)child;
|
||||
ChardevClass *class = CHARDEV_GET_CLASS(chr);
|
||||
|
||||
if (!chr->be_open && class->chr_options_parsed) {
|
||||
class->chr_options_parsed(chr);
|
||||
if (!chr->be_open && CHARDEV_IS_MUX(chr)) {
|
||||
open_muxes(chr);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -412,7 +411,6 @@ static void char_mux_class_init(ObjectClass *oc, void *data)
|
|||
cc->chr_accept_input = mux_chr_accept_input;
|
||||
cc->chr_add_watch = mux_chr_add_watch;
|
||||
cc->chr_be_event = mux_chr_be_event;
|
||||
cc->chr_options_parsed = open_muxes;
|
||||
cc->chr_update_read_handler = mux_chr_update_read_handlers;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue