| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-or-later */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * include/linux/mmc/sdio_func.h |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * 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. |
|---|
| 10 | 6 | */ |
|---|
| 11 | 7 | |
|---|
| 12 | 8 | #ifndef LINUX_MMC_SDIO_FUNC_H |
|---|
| .. | .. |
|---|
| 29 | 25 | struct sdio_func_tuple *next; |
|---|
| 30 | 26 | unsigned char code; |
|---|
| 31 | 27 | unsigned char size; |
|---|
| 32 | | - unsigned char data[0]; |
|---|
| 28 | + unsigned char data[]; |
|---|
| 33 | 29 | }; |
|---|
| 34 | 30 | |
|---|
| 35 | 31 | /* |
|---|
| .. | .. |
|---|
| 55 | 51 | |
|---|
| 56 | 52 | u8 *tmpbuf; /* DMA:able scratch buffer */ |
|---|
| 57 | 53 | |
|---|
| 54 | + u8 major_rev; /* major revision number */ |
|---|
| 55 | + u8 minor_rev; /* minor revision number */ |
|---|
| 58 | 56 | unsigned num_info; /* number of info strings */ |
|---|
| 59 | 57 | const char **info; /* info strings */ |
|---|
| 60 | 58 | |
|---|
| 61 | 59 | struct sdio_func_tuple *tuples; |
|---|
| 62 | | - |
|---|
| 63 | | -#ifdef CONFIG_SDIO_KEEPALIVE |
|---|
| 64 | | - u8 card_alive; |
|---|
| 65 | | -#endif |
|---|
| 66 | 60 | }; |
|---|
| 67 | 61 | |
|---|
| 68 | 62 | #define sdio_func_present(f) ((f)->state & SDIO_STATE_PRESENT) |
|---|
| .. | .. |
|---|
| 115 | 109 | extern int sdio_register_driver(struct sdio_driver *); |
|---|
| 116 | 110 | extern void sdio_unregister_driver(struct sdio_driver *); |
|---|
| 117 | 111 | |
|---|
| 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 | + |
|---|
| 118 | 124 | /* |
|---|
| 119 | 125 | * SDIO I/O operations |
|---|
| 120 | 126 | */ |
|---|