The config_changed function works on the assumption of there being only one port and no hotplugging of ports. Abstract away the call to apply_config in a function call so that we can handle multiple ports later. Signed-off-by: Amit Shah <amit.shah@xxxxxxxxxx> --- drivers/char/virtio_console.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index cc720d3..e97188e 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -415,6 +415,12 @@ static void tx_intr(struct virtqueue *vq) schedule_work(&virtconsole.tx_work); } +static void config_intr(struct virtio_device *vdev) +{ + /* Handle console size changes */ + virtcons_apply_config(vdev); +} + /*D:370 Once we're further in boot, we get probed like any other virtio device. * At this stage we set up the output virtqueue. * @@ -505,7 +511,7 @@ static struct virtio_driver virtio_console = { .driver.owner = THIS_MODULE, .id_table = id_table, .probe = virtcons_probe, - .config_changed = virtcons_apply_config, + .config_changed = config_intr, }; static int __init init(void) -- 1.6.2.5 _______________________________________________ Virtualization mailing list Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/virtualization