hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/include/linux/siox.h
....@@ -1,9 +1,6 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * Copyright (C) 2015 Pengutronix, Uwe Kleine-König <kernel@pengutronix.de>
3
- *
4
- * This program is free software; you can redistribute it and/or modify it under
5
- * the terms of the GNU General Public License version 2 as published by the
6
- * Free Software Foundation.
74 */
85
96 #include <linux/device.h>
....@@ -75,3 +72,13 @@
7572 {
7673 return driver_unregister(&sdriver->driver);
7774 }
75
+
76
+/*
77
+ * module_siox_driver() - Helper macro for drivers that don't do
78
+ * anything special in module init/exit. This eliminates a lot of
79
+ * boilerplate. Each module may only use this macro once, and
80
+ * calling it replaces module_init() and module_exit()
81
+ */
82
+#define module_siox_driver(__siox_driver) \
83
+ module_driver(__siox_driver, siox_driver_register, \
84
+ siox_driver_unregister)