aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2008-03-19 20:35:04 -0500
committerRusty Russell <rusty@rustcorp.com.au>2008-03-28 11:05:51 +1100
commitbd6c26900bae19bd51abedfc9a8a281afbba3a06 (patch)
treecb2058d113d81fa4b168b8675f000f8aecbf8b26 /drivers
parent3085354de635179d70c240e6d942bcbd1d93056c (diff)
downloadkernel_samsung_smdk4412-bd6c26900bae19bd51abedfc9a8a281afbba3a06.zip
kernel_samsung_smdk4412-bd6c26900bae19bd51abedfc9a8a281afbba3a06.tar.gz
kernel_samsung_smdk4412-bd6c26900bae19bd51abedfc9a8a281afbba3a06.tar.bz2
virtio_pci: unregister virtio device at device remove
Make sure to call unregister_virtio_device() when a virtio device is removed. Otherwise, virtio_pci.ko cannot be rmmod'd. This was spotted by Marcelo Tosatti. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/virtio/virtio_pci.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
index 59a8f73..6c8ecde 100644
--- a/drivers/virtio/virtio_pci.c
+++ b/drivers/virtio/virtio_pci.c
@@ -388,6 +388,7 @@ static void __devexit virtio_pci_remove(struct pci_dev *pci_dev)
{
struct virtio_pci_device *vp_dev = pci_get_drvdata(pci_dev);
+ unregister_virtio_device(&vp_dev->vdev);
free_irq(pci_dev->irq, vp_dev);
pci_set_drvdata(pci_dev, NULL);
pci_iounmap(pci_dev, vp_dev->ioaddr);