Lines Matching refs:field
501 #define MODINFO_ATTR(field) \ argument
502 static void setup_modinfo_##field(struct module *mod, const char *s) \
504 mod->field = kstrdup(s, GFP_KERNEL); \
506 static ssize_t show_modinfo_##field(struct module_attribute *mattr, \
509 return scnprintf(buffer, PAGE_SIZE, "%s\n", mk->mod->field); \
511 static int modinfo_##field##_exists(struct module *mod) \
513 return mod->field != NULL; \
515 static void free_modinfo_##field(struct module *mod) \
517 kfree(mod->field); \
518 mod->field = NULL; \
520 static struct module_attribute modinfo_##field = { \
521 .attr = { .name = __stringify(field), .mode = 0444 }, \
522 .show = show_modinfo_##field, \
523 .setup = setup_modinfo_##field, \
524 .test = modinfo_##field##_exists, \
525 .free = free_modinfo_##field, \