[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-backports
Subject: [PATCH 09/30] header: add module_sdio_driver
From: Hauke Mehrtens <hauke () hauke-m ! de>
Date: 2020-12-01 22:03:54
Message-ID: 20201201220415.30582-10-hauke () hauke-m ! de
[Download RAW message or body]
The module_sdio_driver define is used by the mt76 driver.
This was added in upstream Linux commit db0a39083520 ("mmc: sdio: Add
helper macro for sdio_driver boilerplate").
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
backport/backport-include/linux/mmc/sdio_func.h | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/backport/backport-include/linux/mmc/sdio_func.h \
b/backport/backport-include/linux/mmc/sdio_func.h index 0a67f992..7ff926ae 100644
--- a/backport/backport-include/linux/mmc/sdio_func.h
+++ b/backport/backport-include/linux/mmc/sdio_func.h
@@ -83,4 +83,18 @@ static inline void sdio_retune_crc_enable(struct sdio_func *func)
}
#endif /* < 5.2 */
+#ifndef module_sdio_driver
+/**
+ * module_sdio_driver() - Helper macro for registering a SDIO driver
+ * @__sdio_driver: sdio_driver struct
+ *
+ * Helper macro for SDIO drivers which do not 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_sdio_driver(__sdio_driver) \
+ module_driver(__sdio_driver, sdio_register_driver, \
+ sdio_unregister_driver)
+#endif
+
#endif /* __BACKPORT_MMC_SDIO_FUNC_H */
--
2.20.1
--
To unsubscribe from this list: send the line "unsubscribe backports" in
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic