Lines 17-32
Link Here
|
17 |
/* Chosen so that structs with an unsigned long line up. */ |
17 |
/* Chosen so that structs with an unsigned long line up. */ |
18 |
#define MAX_PARAM_PREFIX_LEN (64 - sizeof(unsigned long)) |
18 |
#define MAX_PARAM_PREFIX_LEN (64 - sizeof(unsigned long)) |
19 |
|
19 |
|
20 |
#ifdef MODULE |
|
|
21 |
#define __MODULE_INFO(tag, name, info) \ |
20 |
#define __MODULE_INFO(tag, name, info) \ |
22 |
static const char __UNIQUE_ID(name)[] \ |
21 |
static const char __UNIQUE_ID(name)[] \ |
23 |
__used __attribute__((section(".modinfo"), unused, aligned(1))) \ |
22 |
__used __attribute__((section(".modinfo"), unused, aligned(1))) \ |
24 |
= __stringify(tag) "=" info |
23 |
= MODULE_PARAM_PREFIX __stringify(tag) "=" info |
25 |
#else /* !MODULE */ |
24 |
|
26 |
/* This struct is here for syntactic coherency, it is not used */ |
|
|
27 |
#define __MODULE_INFO(tag, name, info) \ |
28 |
struct __UNIQUE_ID(name) {} |
29 |
#endif |
30 |
#define __MODULE_PARM_TYPE(name, _type) \ |
25 |
#define __MODULE_PARM_TYPE(name, _type) \ |
31 |
__MODULE_INFO(parmtype, name##type, #name ":" _type) |
26 |
__MODULE_INFO(parmtype, name##type, #name ":" _type) |
32 |
|
27 |
|