hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/firmware/google/coreboot_table.h
....@@ -1,3 +1,4 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * coreboot_table.h
34 *
....@@ -6,21 +7,12 @@
67 * Copyright 2014 Gerd Hoffmann <kraxel@redhat.com>
78 * Copyright 2017 Google Inc.
89 * Copyright 2017 Samuel Holland <samuel@sholland.org>
9
- *
10
- * This program is free software; you can redistribute it and/or modify
11
- * it under the terms of the GNU General Public License v2.0 as published by
12
- * the Free Software Foundation.
13
- *
14
- * This program is distributed in the hope that it will be useful,
15
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
- * GNU General Public License for more details.
1810 */
1911
2012 #ifndef __COREBOOT_TABLE_H
2113 #define __COREBOOT_TABLE_H
2214
23
-#include <linux/io.h>
15
+#include <linux/device.h>
2416
2517 /* Coreboot table header structure */
2618 struct coreboot_table_header {
....@@ -91,10 +83,13 @@
9183 /* Unregister a driver that uses the data from a coreboot table. */
9284 void coreboot_driver_unregister(struct coreboot_driver *driver);
9385
94
-/* Initialize coreboot table module given a pointer to iomem */
95
-int coreboot_table_init(struct device *dev, void __iomem *ptr);
96
-
97
-/* Cleanup coreboot table module */
98
-int coreboot_table_exit(void);
86
+/* module_coreboot_driver() - Helper macro for drivers that don't do
87
+ * anything special in module init/exit. This eliminates a lot of
88
+ * boilerplate. Each module may only use this macro once, and
89
+ * calling it replaces module_init() and module_exit()
90
+ */
91
+#define module_coreboot_driver(__coreboot_driver) \
92
+ module_driver(__coreboot_driver, coreboot_driver_register, \
93
+ coreboot_driver_unregister)
9994
10095 #endif /* __COREBOOT_TABLE_H */