Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 180817
b: refs/heads/master
c: a9cdd48
h: refs/heads/master
i:
  180815: 2de8f2f
v: v3
  • Loading branch information
Amit Shah authored and Rusty Russell committed Feb 24, 2010
1 parent bd812e6 commit ef6cdfb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 298add723aecd7af461319fe815d935ef2c40d78
refs/heads/master: a9cdd4855738906043b8131cfe8055d6cde88ffe
11 changes: 8 additions & 3 deletions trunk/drivers/char/virtio_console.c
Original file line number Diff line number Diff line change
Expand Up @@ -838,6 +838,8 @@ static const struct file_operations port_debugfs_ops = {
/* Remove all port-specific data. */
static int remove_port(struct port *port)
{
struct port_buffer *buf;

spin_lock_irq(&port->portdev->ports_lock);
list_del(&port->list);
spin_unlock_irq(&port->portdev->ports_lock);
Expand All @@ -851,14 +853,17 @@ static int remove_port(struct port *port)
if (port->guest_connected)
send_control_msg(port, VIRTIO_CONSOLE_PORT_OPEN, 0);

while (port->in_vq->vq_ops->detach_unused_buf(port->in_vq))
;

sysfs_remove_group(&port->dev->kobj, &port_attribute_group);
device_destroy(pdrvdata.class, port->dev->devt);
cdev_del(&port->cdev);

/* Remove unused data this port might have received. */
discard_port_data(port);

/* Remove buffers we queued up for the Host to send us data in. */
while ((buf = port->in_vq->vq_ops->detach_unused_buf(port->in_vq)))
free_buf(buf);

kfree(port->name);

debugfs_remove(port->debugfs_file);
Expand Down

0 comments on commit ef6cdfb

Please sign in to comment.