diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2015-03-05 10:45:30 +1030 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2015-03-05 13:36:17 +1030 |
commit | 4f6e24ed9de8634d6471ef86b382cba6d4e57ca8 (patch) | |
tree | d6d8ef3f810d21ffa8d9f291afe399fcef60887b | |
parent | 6587457b4b3d663b237a0f95ddf6e67d1828c8ea (diff) | |
download | linux-4f6e24ed9de8634d6471ef86b382cba6d4e57ca8.tar.gz linux-4f6e24ed9de8634d6471ef86b382cba6d4e57ca8.tar.bz2 linux-4f6e24ed9de8634d6471ef86b382cba6d4e57ca8.zip |
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
-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 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); |