Skip to content

Commit

Permalink
virtio_console: init work unconditionally
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Amit Shah <[email protected]>
Signed-off-by: Rusty Russell <[email protected]>
Cc: [email protected]
  • Loading branch information
mstsirkin authored and rustyrussell committed Mar 5, 2015
1 parent 6587457 commit 4f6e24e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/char/virtio_console.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4f6e24e

Please sign in to comment.