diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/virtio.h | 5 |
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 | ||
| 122 | static inline struct virtio_driver *drv_to_virtio(struct device_driver *drv) | ||
| 123 | { | ||
| 124 | return container_of(drv, struct virtio_driver, driver); | ||
| 125 | } | ||
| 126 | |||
| 122 | int register_virtio_driver(struct virtio_driver *drv); | 127 | int register_virtio_driver(struct virtio_driver *drv); |
| 123 | void unregister_virtio_driver(struct virtio_driver *drv); | 128 | void unregister_virtio_driver(struct virtio_driver *drv); |
| 124 | #endif /* _LINUX_VIRTIO_H */ | 129 | #endif /* _LINUX_VIRTIO_H */ |
