summaryrefslogtreecommitdiff
path: root/drivers/char
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2015-03-05 03:15:30 +0300
committerRusty Russell <rusty@rustcorp.com.au>2015-03-05 06:06:17 +0300
commit4f6e24ed9de8634d6471ef86b382cba6d4e57ca8 (patch)
treed6d8ef3f810d21ffa8d9f291afe399fcef60887b /drivers/char
parent6587457b4b3d663b237a0f95ddf6e67d1828c8ea (diff)
downloadlinux-4f6e24ed9de8634d6471ef86b382cba6d4e57ca8.tar.xz
virtio_console: init work unconditionally
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> Cc: stable@kernel.org
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/virtio_console.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index fae2dbbf5745..def736ddfc0e 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -2040,12 +2040,13 @@ static int virtcons_probe(struct virtio_device *vdev)
virtio_device_ready(portdev->vdev);
+ 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);