|
From: | Gerd Hoffmann |
Subject: | Re: [Qemu-devel] [PATCH 2/3] virtio-console: Add a virtio-serial bus, support for multiple devices and ports |
Date: | Mon, 04 Jan 2010 10:23:50 +0100 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.4pre) Gecko/20090922 Fedora/3.0-3.9.b4.fc12 Lightning/1.0pre Thunderbird/3.0b4 |
Hi,
@@ -321,13 +321,9 @@ void qdev_machine_creation_done(void) CharDriverState *qdev_init_chardev(DeviceState *dev) { static int next_serial; - static int next_virtconsole; + /* FIXME: This is a nasty hack that needs to go away. */ - if (strncmp(dev->info->name, "virtio", 6) == 0) { - return virtcon_hds[next_virtconsole++]; - } else { - return serial_hds[next_serial++]; - } + return serial_hds[next_serial++]; }I believe the FIXME is about the nasty special case for "virtio". Since you fix that, better remove the FIXME.I did that in a previous submission and Gerd asked me to keep it. Even the serial init can be changed, I guess.Okay, Gerd's the authority on this.
Yes, serial drivers should use a chardev property instead of qdev_init_chardev(). You can try to zap this function altogether, but I think there are still serial drivers using this so this would break the (full, all archs) build.
cheers, Gerd
[Prev in Thread] | Current Thread | [Next in Thread] |