summaryrefslogtreecommitdiffstats
path: root/include/linux/virtio.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/virtio.h')
-rw-r--r--include/linux/virtio.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/virtio.h b/include/linux/virtio.h
index 5f1f80c76468..cf8adb1f5b2c 100644
--- a/include/linux/virtio.h
+++ b/include/linux/virtio.h
@@ -119,6 +119,11 @@ struct virtio_driver {
#endif
};
+static inline struct virtio_driver *drv_to_virtio(struct device_driver *drv)
+{
+ return container_of(drv, struct virtio_driver, driver);
+}
+
int register_virtio_driver(struct virtio_driver *drv);
void unregister_virtio_driver(struct virtio_driver *drv);
#endif /* _LINUX_VIRTIO_H */
OpenPOWER on IntegriCloud