提交 cecdbdc3 编写于 作者: Y Yuan Liu 提交者: Michael S. Tsirkin

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: NYuan Liu <liuyuan@google.com>
Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
上级 8d390464
无相关合并请求
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部