Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6e105e05 authored by Sjur Brændeland's avatar Sjur Brændeland Committed by Rusty Russell
Browse files

virtio: Add module driver macro for virtio drivers.



Add helper macro for drivers that don't do anything
special in module init/exit.

Signed-off-by: default avatarSjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
parent dc18f080
Loading
Loading
Loading
Loading
+9 −0
Original line number Original line Diff line number Diff line
@@ -126,4 +126,13 @@ static inline struct virtio_driver *drv_to_virtio(struct device_driver *drv)


int register_virtio_driver(struct virtio_driver *drv);
int register_virtio_driver(struct virtio_driver *drv);
void unregister_virtio_driver(struct virtio_driver *drv);
void unregister_virtio_driver(struct virtio_driver *drv);

/* module_virtio_driver() - Helper macro for drivers that don't do
 * anything special in module init/exit.  This eliminates a lot of
 * boilerplate.  Each module may only use this macro once, and
 * calling it replaces module_init() and module_exit()
 */
#define module_virtio_driver(__virtio_driver) \
	module_driver(__virtio_driver, register_virtio_driver, \
			unregister_virtio_driver)
#endif /* _LINUX_VIRTIO_H */
#endif /* _LINUX_VIRTIO_H */