aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/char/virtio_console.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index 26a66ffd943e..2d87ce555140 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -1988,21 +1988,6 @@ static void remove_vqs(struct ports_device *portdev)
1988 kfree(portdev->out_vqs); 1988 kfree(portdev->out_vqs);
1989} 1989}
1990 1990
1991static void remove_controlq_data(struct ports_device *portdev)
1992{
1993 struct port_buffer *buf;
1994 unsigned int len;
1995
1996 if (!use_multiport(portdev))
1997 return;
1998
1999 while ((buf = virtqueue_get_buf(portdev->c_ivq, &len)))
2000 free_buf(buf, true);
2001
2002 while ((buf = virtqueue_detach_unused_buf(portdev->c_ivq)))
2003 free_buf(buf, true);
2004}
2005
2006/* 1991/*
2007 * Once we're further in boot, we get probed like any other virtio 1992 * Once we're further in boot, we get probed like any other virtio
2008 * device. 1993 * device.
@@ -2163,7 +2148,6 @@ static void virtcons_remove(struct virtio_device *vdev)
2163 * have to just stop using the port, as the vqs are going 2148 * have to just stop using the port, as the vqs are going
2164 * away. 2149 * away.
2165 */ 2150 */
2166 remove_controlq_data(portdev);
2167 remove_vqs(portdev); 2151 remove_vqs(portdev);
2168 kfree(portdev); 2152 kfree(portdev);
2169} 2153}
@@ -2208,7 +2192,6 @@ static int virtcons_freeze(struct virtio_device *vdev)
2208 */ 2192 */
2209 if (use_multiport(portdev)) 2193 if (use_multiport(portdev))
2210 virtqueue_disable_cb(portdev->c_ivq); 2194 virtqueue_disable_cb(portdev->c_ivq);
2211 remove_controlq_data(portdev);
2212 2195
2213 list_for_each_entry(port, &portdev->ports, list) { 2196 list_for_each_entry(port, &portdev->ports, list) {
2214 virtqueue_disable_cb(port->in_vq); 2197 virtqueue_disable_cb(port->in_vq);