diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2015-03-05 03:15:30 +0300 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2015-04-09 14:14:03 +0300 |
commit | 8a4b192f16751b031360af03bb73600a6025cd2d (patch) | |
tree | 0fd14eb0b6f0973daad0c2067dee631f2d9cff18 /drivers | |
parent | 90fe09d0c8adf33924940dfca77ad3ddbbae50c2 (diff) | |
download | linux-8a4b192f16751b031360af03bb73600a6025cd2d.tar.xz |
virtio_console: init work unconditionally
commit 4f6e24ed9de8634d6471ef86b382cba6d4e57ca8 upstream.
when multiport is off, we don't initialize config work,
but we then cancel uninitialized control_work on freeze.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/virtio_console.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index b79cf3e1b793..4d5fcc2d6c9c 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -2030,12 +2030,13 @@ static int virtcons_probe(struct virtio_device *vdev) spin_lock_init(&portdev->ports_lock); INIT_LIST_HEAD(&portdev->ports); + INIT_WORK(&portdev->control_work, &control_work_handler); + if (multiport) { unsigned int nr_added_bufs; spin_lock_init(&portdev->c_ivq_lock); spin_lock_init(&portdev->c_ovq_lock); - INIT_WORK(&portdev->control_work, &control_work_handler); nr_added_bufs = fill_queue(portdev->c_ivq, &portdev->c_ivq_lock); |