hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/include/linux/mmc/sdio_func.h
....@@ -1,12 +1,8 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /*
23 * include/linux/mmc/sdio_func.h
34 *
45 * Copyright 2007-2008 Pierre Ossman
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License as published by
8
- * the Free Software Foundation; either version 2 of the License, or (at
9
- * your option) any later version.
106 */
117
128 #ifndef LINUX_MMC_SDIO_FUNC_H
....@@ -29,7 +25,7 @@
2925 struct sdio_func_tuple *next;
3026 unsigned char code;
3127 unsigned char size;
32
- unsigned char data[0];
28
+ unsigned char data[];
3329 };
3430
3531 /*
....@@ -55,14 +51,12 @@
5551
5652 u8 *tmpbuf; /* DMA:able scratch buffer */
5753
54
+ u8 major_rev; /* major revision number */
55
+ u8 minor_rev; /* minor revision number */
5856 unsigned num_info; /* number of info strings */
5957 const char **info; /* info strings */
6058
6159 struct sdio_func_tuple *tuples;
62
-
63
-#ifdef CONFIG_SDIO_KEEPALIVE
64
- u8 card_alive;
65
-#endif
6660 };
6761
6862 #define sdio_func_present(f) ((f)->state & SDIO_STATE_PRESENT)
....@@ -115,6 +109,18 @@
115109 extern int sdio_register_driver(struct sdio_driver *);
116110 extern void sdio_unregister_driver(struct sdio_driver *);
117111
112
+/**
113
+ * module_sdio_driver() - Helper macro for registering a SDIO driver
114
+ * @__sdio_driver: sdio_driver struct
115
+ *
116
+ * Helper macro for SDIO drivers which do not do anything special in module
117
+ * init/exit. This eliminates a lot of boilerplate. Each module may only
118
+ * use this macro once, and calling it replaces module_init() and module_exit()
119
+ */
120
+#define module_sdio_driver(__sdio_driver) \
121
+ module_driver(__sdio_driver, sdio_register_driver, \
122
+ sdio_unregister_driver)
123
+
118124 /*
119125 * SDIO I/O operations
120126 */