summaryrefslogtreecommitdiffstats
path: root/drivers/virtio
diff options
context:
space:
mode:
authorYuan Liu <liuyuan@google.com>2016-11-24 01:31:00 +0100
committerMichael S. Tsirkin <mst@redhat.com>2016-12-15 23:13:39 +0100
commitcecdbdc3771e5b8583a9b43b03335b4223a9a6c9 (patch)
tree1b95c19bda729066e6b2f4a3b718fd087d7e40c8 /drivers/virtio
parentvhost: remove unused feature bit (diff)
downloadlinux-cecdbdc3771e5b8583a9b43b03335b4223a9a6c9.tar.xz
linux-cecdbdc3771e5b8583a9b43b03335b4223a9a6c9.zip
virtio_mmio: Set dev.release() to avoid warning
Fix a warning thrown from virtio_mmio_remove(): Device 'virtio0' does not have a release() function The fix is according to virtio_pci_probe() of drivers/virtio/virtio_pci_common.c Signed-off-by: Yuan Liu <liuyuan@google.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/virtio')
-rw-r--r--drivers/virtio/virtio_mmio.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c
index 48bfea91dbca..d47a2fcef818 100644
--- a/drivers/virtio/virtio_mmio.c
+++ b/drivers/virtio/virtio_mmio.c
@@ -489,6 +489,7 @@ static const struct virtio_config_ops virtio_mmio_config_ops = {
};
+static void virtio_mmio_release_dev_empty(struct device *_d) {}
/* Platform device */
@@ -511,6 +512,7 @@ static int virtio_mmio_probe(struct platform_device *pdev)
return -ENOMEM;
vm_dev->vdev.dev.parent = &pdev->dev;
+ vm_dev->vdev.dev.release = virtio_mmio_release_dev_empty;
vm_dev->vdev.config = &virtio_mmio_config_ops;
vm_dev->pdev = pdev;
INIT_LIST_HEAD(&vm_dev->virtqueues);