aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/virtio_console.c
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2015-03-04 19:15:30 -0500
committerRusty Russell <rusty@rustcorp.com.au>2015-03-04 22:06:17 -0500
commit4f6e24ed9de8634d6471ef86b382cba6d4e57ca8 (patch)
treed6d8ef3f810d21ffa8d9f291afe399fcef60887b /drivers/char/virtio_console.c
parent6587457b4b3d663b237a0f95ddf6e67d1828c8ea (diff)
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.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)
2040 2040
2041 virtio_device_ready(portdev->vdev); 2041 virtio_device_ready(portdev->vdev);
2042 2042
2043 INIT_WORK(&portdev->control_work, &control_work_handler);
2044
2043 if (multiport) { 2045 if (multiport) {
2044 unsigned int nr_added_bufs; 2046 unsigned int nr_added_bufs;
2045 2047
2046 spin_lock_init(&portdev->c_ivq_lock); 2048 spin_lock_init(&portdev->c_ivq_lock);
2047 spin_lock_init(&portdev->c_ovq_lock); 2049 spin_lock_init(&portdev->c_ovq_lock);
2048 INIT_WORK(&portdev->control_work, &control_work_handler);
2049 2050
2050 nr_added_bufs = fill_queue(portdev->c_ivq, 2051 nr_added_bufs = fill_queue(portdev->c_ivq,
2051 &portdev->c_ivq_lock); 2052 &portdev->c_ivq_lock);