aboutsummaryrefslogtreecommitdiffstats
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 {
119#endif 119#endif
120}; 120};
121 121
122static inline struct virtio_driver *drv_to_virtio(struct device_driver *drv)
123{
124 return container_of(drv, struct virtio_driver, driver);
125}
126
122int register_virtio_driver(struct virtio_driver *drv); 127int register_virtio_driver(struct virtio_driver *drv);
123void unregister_virtio_driver(struct virtio_driver *drv); 128void unregister_virtio_driver(struct virtio_driver *drv);
124#endif /* _LINUX_VIRTIO_H */ 129#endif /* _LINUX_VIRTIO_H */