diff mbox series

backports: add virtio_reset_device

Message ID 20220221113704.ebf650b2a169.I3dd09cc0b68e7a93e003ef10216ec310d74e80de@changeid (mailing list archive)
State New, archived
Headers show
Series backports: add virtio_reset_device | expand

Commit Message

Johannes Berg Feb. 21, 2022, 10:37 a.m. UTC
From: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 backport/backport-include/linux/virtio.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 backport/backport-include/linux/virtio.h
diff mbox series

Patch

diff --git a/backport/backport-include/linux/virtio.h b/backport/backport-include/linux/virtio.h
new file mode 100644
index 000000000000..0bca8fa8d839
--- /dev/null
+++ b/backport/backport-include/linux/virtio.h
@@ -0,0 +1,12 @@ 
+#ifndef __BACKPORT_LINUX_VIRTIO_H
+#define __BACKPORT_LINUX_VIRTIO_H
+#include_next <linux/virtio.h>
+
+#if LINUX_VERSION_IS_LESS(5,17,0)
+static inline void virtio_reset_device(struct virtio_device *dev)
+{
+	dev->config->reset(dev);
+}
+#endif
+
+#endif /* __BACKPORT_LINUX_VIRTIO_H */