diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2015-03-05 10:45:30 +1030 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-26 15:00:58 +0100 |
commit | 811fe127d8934539ebb9ee38abd3f9d55159e1ca (patch) | |
tree | eb5e0f31be7d2239f16d4f959fecd6bd99d50f45 /drivers | |
parent | 12bda52e8f3720c7398e95b10462b185a7dafa4b (diff) | |
download | lwn-811fe127d8934539ebb9ee38abd3f9d55159e1ca.tar.gz lwn-811fe127d8934539ebb9ee38abd3f9d55159e1ca.zip |
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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 fc45567ad3ac..ec3bd62eeaf6 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -2023,12 +2023,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); |