diff options
Diffstat (limited to 'drivers/virtio/virtio_pci.c')
-rw-r--r-- | drivers/virtio/virtio_pci.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index 28d9cf7cf72f..24747aef1952 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
18 | #include <linux/list.h> | 18 | #include <linux/list.h> |
19 | #include <linux/pci.h> | 19 | #include <linux/pci.h> |
20 | #include <linux/slab.h> | ||
20 | #include <linux/interrupt.h> | 21 | #include <linux/interrupt.h> |
21 | #include <linux/virtio.h> | 22 | #include <linux/virtio.h> |
22 | #include <linux/virtio_config.h> | 23 | #include <linux/virtio_config.h> |
@@ -473,7 +474,8 @@ static void vp_del_vqs(struct virtio_device *vdev) | |||
473 | 474 | ||
474 | list_for_each_entry_safe(vq, n, &vdev->vqs, list) { | 475 | list_for_each_entry_safe(vq, n, &vdev->vqs, list) { |
475 | info = vq->priv; | 476 | info = vq->priv; |
476 | if (vp_dev->per_vq_vectors) | 477 | if (vp_dev->per_vq_vectors && |
478 | info->msix_vector != VIRTIO_MSI_NO_VECTOR) | ||
477 | free_irq(vp_dev->msix_entries[info->msix_vector].vector, | 479 | free_irq(vp_dev->msix_entries[info->msix_vector].vector, |
478 | vq); | 480 | vq); |
479 | vp_del_vq(vq); | 481 | vp_del_vq(vq); |
@@ -648,6 +650,7 @@ static int __devinit virtio_pci_probe(struct pci_dev *pci_dev, | |||
648 | goto out_req_regions; | 650 | goto out_req_regions; |
649 | 651 | ||
650 | pci_set_drvdata(pci_dev, vp_dev); | 652 | pci_set_drvdata(pci_dev, vp_dev); |
653 | pci_set_master(pci_dev); | ||
651 | 654 | ||
652 | /* we use the subsystem vendor/device id as the virtio vendor/device | 655 | /* we use the subsystem vendor/device id as the virtio vendor/device |
653 | * id. this allows us to use the same PCI vendor/device id for all | 656 | * id. this allows us to use the same PCI vendor/device id for all |
@@ -702,7 +705,7 @@ static struct pci_driver virtio_pci_driver = { | |||
702 | .name = "virtio-pci", | 705 | .name = "virtio-pci", |
703 | .id_table = virtio_pci_id_table, | 706 | .id_table = virtio_pci_id_table, |
704 | .probe = virtio_pci_probe, | 707 | .probe = virtio_pci_probe, |
705 | .remove = virtio_pci_remove, | 708 | .remove = __devexit_p(virtio_pci_remove), |
706 | #ifdef CONFIG_PM | 709 | #ifdef CONFIG_PM |
707 | .suspend = virtio_pci_suspend, | 710 | .suspend = virtio_pci_suspend, |
708 | .resume = virtio_pci_resume, | 711 | .resume = virtio_pci_resume, |