[PATCH 44/74] backports: add virtio_reset_device
Johannes Berg <[email protected]> Fri, 24 May 2024 19:07:56 +0200
| Newsgroups | org.kernel.vger.backports |
|---|---|
| Message-ID | <20240524190907.c51e0f2751bd.I3dd09cc0b68e7a93e003ef10216ec310d74e80de@changeid> |
From: Johannes Berg <[email protected]> We need this for hwsim. Signed-off-by: Johannes Berg <[email protected]> --- backport/backport-include/linux/virtio.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 backport/backport-include/linux/virtio.h diff --git a/backport/backport-include/linux/virtio.h b/backport/backport-include/linux/virtio.h new file mode 100644 index 000000000000..98c844918251 --- /dev/null +++ b/backport/backport-include/linux/virtio.h @@ -0,0 +1,13 @@ +#ifndef __BACKPORT_LINUX_VIRTIO_H +#define __BACKPORT_LINUX_VIRTIO_H +#include_next <linux/virtio.h> + +#if LINUX_VERSION_IS_LESS(5,17,0) +#include <linux/virtio_config.h> +static inline void virtio_reset_device(struct virtio_device *dev) +{ + dev->config->reset(dev); +} +#endif + +#endif /* __BACKPORT_LINUX_VIRTIO_H */ -- 2.45.1