virtio-pci-modern: factor out modern device initialization logic
authorJason Wang <jasowang@redhat.com>
Mon, 4 Jan 2021 06:54:47 +0000 (14:54 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 23 Feb 2021 12:52:57 +0000 (07:52 -0500)
commit117a9de2826ccb0d338afb03f07223b3cb789371
tree98c8caf938724b991fcd4c154b352129f691ebcf
parentb5d58094508724970ed9b68cdeca01e8f5333e0e
virtio-pci-modern: factor out modern device initialization logic

This patch factors out the modern device initialization logic into a
helper. Note that it still depends on the caller to enable pci device
which allows the caller to use e.g devres.

Signed-off-by: Jason Wang <jasowang@redhat.com>
Link: https://lore.kernel.org/r/20210104065503.199631-4-jasowang@redhat.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/virtio/virtio_pci_modern.c