OSDN Git Service

vDPA/ifcvf: introduce get_dev_type() which returns virtio dev id
authorZhu Lingshan <lingshan.zhu@intel.com>
Thu, 12 Aug 2021 03:24:53 +0000 (11:24 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Sun, 5 Sep 2021 20:23:07 +0000 (16:23 -0400)
commit30326f9577342aac257ed9c036608de666b06389
tree5b4eef076733b3a08c0f7dda09491b774d7dfda3
parent7d2a07b769330c34b4deabeed939325c77a7ec2f
vDPA/ifcvf: introduce get_dev_type() which returns virtio dev id

This commit introduces a new function get_dev_type() which returns
the virtio device id of a device, to avoid duplicated code.

Signed-off-by: Zhu Lingshan <lingshan.zhu@intel.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Link: https://lore.kernel.org/r/20210812032454.24486-2-lingshan.zhu@intel.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/vdpa/ifcvf/ifcvf_main.c