diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2015-03-05 01:15:30 +0100 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2015-03-05 04:06:17 +0100 |
commit | 4f6e24ed9de8634d6471ef86b382cba6d4e57ca8 (patch) | |
tree | d6d8ef3f810d21ffa8d9f291afe399fcef60887b /drivers/char/virtio_console.c | |
parent | Merge tag 'dma-buf-for-4.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/... (diff) | |
download | linux-4f6e24ed9de8634d6471ef86b382cba6d4e57ca8.tar.xz 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
Diffstat (limited to 'drivers/char/virtio_console.c')
-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); |