aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/virtio.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/virtio.h b/include/linux/virtio.h
index eb34cf774473..ff6714e6d0f5 100644
--- a/include/linux/virtio.h
+++ b/include/linux/virtio.h
@@ -126,4 +126,13 @@ static inline struct virtio_driver *drv_to_virtio(struct device_driver *drv)
126 126
127int register_virtio_driver(struct virtio_driver *drv); 127int register_virtio_driver(struct virtio_driver *drv);
128void unregister_virtio_driver(struct virtio_driver *drv); 128void unregister_virtio_driver(struct virtio_driver *drv);
129
130/* module_virtio_driver() - Helper macro for drivers that don't do
131 * anything special in module init/exit. This eliminates a lot of
132 * boilerplate. Each module may only use this macro once, and
133 * calling it replaces module_init() and module_exit()
134 */
135#define module_virtio_driver(__virtio_driver) \
136 module_driver(__virtio_driver, register_virtio_driver, \
137 unregister_virtio_driver)
129#endif /* _LINUX_VIRTIO_H */ 138#endif /* _LINUX_VIRTIO_H */