git: 9e4e7bcaef3f - main - *DRIVER_MODULE*: Remove the compat shims to accept the devclass argument.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 23 Aug 2022 16:38:39 UTC
The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=9e4e7bcaef3fcaab66cdecd08b1664ac92cc9a6b commit 9e4e7bcaef3fcaab66cdecd08b1664ac92cc9a6b Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2022-08-23 16:36:41 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2022-08-23 16:38:09 +0000 *DRIVER_MODULE*: Remove the compat shims to accept the devclass argument. PR: 264969 (exp-run) Differential Revision: https://reviews.freebsd.org/D35168 --- sys/sys/bus.h | 62 ++++++++++------------------------------------------------- 1 file changed, 10 insertions(+), 52 deletions(-) diff --git a/sys/sys/bus.h b/sys/sys/bus.h index a1d11138a1cc..c363d1ec550e 100644 --- a/sys/sys/bus.h +++ b/sys/sys/bus.h @@ -800,17 +800,14 @@ struct driver_module_data { int dmd_pass; }; -#define _DRIVER_MODULE_MACRO(_1, _2, _3, _4, _5, _6, _7, _8, NAME, ...) \ - NAME - -#define _EARLY_DRIVER_MODULE_ORDERED(name, busname, driver, devclass, \ - evh, arg, order, pass) \ - \ +#define EARLY_DRIVER_MODULE_ORDERED(name, busname, driver, evh, arg, \ + order, pass) \ + \ static struct driver_module_data name##_##busname##_driver_mod = { \ evh, arg, \ #busname, \ (kobj_class_t) &driver, \ - devclass, \ + NULL, \ pass \ }; \ \ @@ -822,57 +819,18 @@ static moduledata_t name##_##busname##_mod = { \ DECLARE_MODULE(name##_##busname, name##_##busname##_mod, \ SI_SUB_DRIVERS, order) -#define EARLY_DRIVER_MODULE_ORDERED7(name, busname, driver, evh, arg, \ - order, pass) \ - _EARLY_DRIVER_MODULE_ORDERED(name, busname, driver, NULL, evh, \ - arg, order, pass) - -#define EARLY_DRIVER_MODULE_ORDERED8(name, busname, driver, devclass, \ - evh, arg, order, pass) \ - _EARLY_DRIVER_MODULE_ORDERED(name, busname, driver, &devclass, \ - evh, arg, order, pass) - -#define EARLY_DRIVER_MODULE_ORDERED(...) \ - _DRIVER_MODULE_MACRO(__VA_ARGS__, EARLY_DRIVER_MODULE_ORDERED8, \ - EARLY_DRIVER_MODULE_ORDERED7)(__VA_ARGS__) - -#define EARLY_DRIVER_MODULE7(name, busname, driver, devclass, evh, arg, pass) \ - EARLY_DRIVER_MODULE_ORDERED8(name, busname, driver, devclass, \ - evh, arg, SI_ORDER_MIDDLE, pass) - -#define EARLY_DRIVER_MODULE6(name, busname, driver, evh, arg, pass) \ - EARLY_DRIVER_MODULE_ORDERED7(name, busname, driver, evh, arg, \ +#define EARLY_DRIVER_MODULE(name, busname, driver, evh, arg, pass) \ + EARLY_DRIVER_MODULE_ORDERED(name, busname, driver, evh, arg, \ SI_ORDER_MIDDLE, pass) -#define EARLY_DRIVER_MODULE(...) \ - _DRIVER_MODULE_MACRO(__VA_ARGS__, INVALID, \ - EARLY_DRIVER_MODULE7, EARLY_DRIVER_MODULE6)(__VA_ARGS__) - -#define DRIVER_MODULE_ORDERED7(name, busname, driver, devclass, evh, arg,\ - order) \ - EARLY_DRIVER_MODULE_ORDERED8(name, busname, driver, devclass, \ - evh, arg, order, BUS_PASS_DEFAULT) - -#define DRIVER_MODULE_ORDERED6(name, busname, driver, evh, arg, order) \ - EARLY_DRIVER_MODULE_ORDERED7(name, busname, driver, evh, arg, \ +#define DRIVER_MODULE_ORDERED(name, busname, driver, evh, arg, order) \ + EARLY_DRIVER_MODULE_ORDERED(name, busname, driver, evh, arg, \ order, BUS_PASS_DEFAULT) -#define DRIVER_MODULE_ORDERED(...) \ - _DRIVER_MODULE_MACRO(__VA_ARGS__, INVALID, \ - DRIVER_MODULE_ORDERED7, DRIVER_MODULE_ORDERED6)(__VA_ARGS__) - -#define DRIVER_MODULE6(name, busname, driver, devclass, evh, arg) \ - EARLY_DRIVER_MODULE7(name, busname, driver, devclass, evh, arg, \ +#define DRIVER_MODULE(name, busname, driver, evh, arg) \ + EARLY_DRIVER_MODULE(name, busname, driver, evh, arg, \ BUS_PASS_DEFAULT) -#define DRIVER_MODULE5(name, busname, driver, evh, arg) \ - EARLY_DRIVER_MODULE6(name, busname, driver, evh, arg, \ - BUS_PASS_DEFAULT) - -#define DRIVER_MODULE(...) \ - _DRIVER_MODULE_MACRO(__VA_ARGS__, INVALID, INVALID, \ - DRIVER_MODULE6, DRIVER_MODULE5)(__VA_ARGS__) - /** * Generic ivar accessor generation macros for bus drivers */