diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2015-01-04 06:25:30 -0500 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2015-01-06 09:35:36 -0500 |
commit | 945399a8c78ac225cdbaece0f94c0d8741b4e1d8 (patch) | |
tree | b1d1e06541b9adb51eae5fb6cad455677cbb35c2 /drivers/virtio | |
parent | 80e9541f7987f60471268b751aaa9b6800513fe9 (diff) |
virtio_pci: device-specific release callback
It turns out we need to add device-specific code
in release callback. Move it to virtio_pci_legacy.c.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/virtio')
-rw-r--r-- | drivers/virtio/virtio_pci_common.c | 9 | ||||
-rw-r--r-- | drivers/virtio/virtio_pci_common.h | 1 | ||||
-rw-r--r-- | drivers/virtio/virtio_pci_legacy.c | 9 |
3 files changed, 9 insertions, 10 deletions
diff --git a/drivers/virtio/virtio_pci_common.c b/drivers/virtio/virtio_pci_common.c index 5243868efd9a..9756f21b809e 100644 --- a/drivers/virtio/virtio_pci_common.c +++ b/drivers/virtio/virtio_pci_common.c | |||
@@ -422,15 +422,6 @@ int vp_set_vq_affinity(struct virtqueue *vq, int cpu) | |||
422 | return 0; | 422 | return 0; |
423 | } | 423 | } |
424 | 424 | ||
425 | void virtio_pci_release_dev(struct device *_d) | ||
426 | { | ||
427 | /* | ||
428 | * No need for a release method as we allocate/free | ||
429 | * all devices together with the pci devices. | ||
430 | * Provide an empty one to avoid getting a warning from core. | ||
431 | */ | ||
432 | } | ||
433 | |||
434 | #ifdef CONFIG_PM_SLEEP | 425 | #ifdef CONFIG_PM_SLEEP |
435 | static int virtio_pci_freeze(struct device *dev) | 426 | static int virtio_pci_freeze(struct device *dev) |
436 | { | 427 | { |
diff --git a/drivers/virtio/virtio_pci_common.h b/drivers/virtio/virtio_pci_common.h index adddb647b21d..5a497289b7e9 100644 --- a/drivers/virtio/virtio_pci_common.h +++ b/drivers/virtio/virtio_pci_common.h | |||
@@ -126,7 +126,6 @@ const char *vp_bus_name(struct virtio_device *vdev); | |||
126 | * - ignore the affinity request if we're using INTX | 126 | * - ignore the affinity request if we're using INTX |
127 | */ | 127 | */ |
128 | int vp_set_vq_affinity(struct virtqueue *vq, int cpu); | 128 | int vp_set_vq_affinity(struct virtqueue *vq, int cpu); |
129 | void virtio_pci_release_dev(struct device *); | ||
130 | 129 | ||
131 | int virtio_pci_legacy_probe(struct pci_dev *pci_dev, | 130 | int virtio_pci_legacy_probe(struct pci_dev *pci_dev, |
132 | const struct pci_device_id *id); | 131 | const struct pci_device_id *id); |
diff --git a/drivers/virtio/virtio_pci_legacy.c b/drivers/virtio/virtio_pci_legacy.c index 6c76f0f5658c..08d191527020 100644 --- a/drivers/virtio/virtio_pci_legacy.c +++ b/drivers/virtio/virtio_pci_legacy.c | |||
@@ -211,6 +211,15 @@ static const struct virtio_config_ops virtio_pci_config_ops = { | |||
211 | .set_vq_affinity = vp_set_vq_affinity, | 211 | .set_vq_affinity = vp_set_vq_affinity, |
212 | }; | 212 | }; |
213 | 213 | ||
214 | static void virtio_pci_release_dev(struct device *_d) | ||
215 | { | ||
216 | /* | ||
217 | * No need for a release method as we allocate/free | ||
218 | * all devices together with the pci devices. | ||
219 | * Provide an empty one to avoid getting a warning from core. | ||
220 | */ | ||
221 | } | ||
222 | |||
214 | /* the PCI probing function */ | 223 | /* the PCI probing function */ |
215 | int virtio_pci_legacy_probe(struct pci_dev *pci_dev, | 224 | int virtio_pci_legacy_probe(struct pci_dev *pci_dev, |
216 | const struct pci_device_id *id) | 225 | const struct pci_device_id *id) |