Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

params: Replace __modinit with __init_or_module

Remove the custom __modinit macro from kernel/params.c and instead use the
common __init_or_module macro from include/linux/module.h. Both provide the
same functionality.

Signed-off-by: Petr Pavlu <petr.pavlu@suse.com>
Reviewed-by: Aaron Tomlin <atomlin@atomlin.com>
Reviewed-by: Daniel Gomez <da.gomez@samsung.com>
Reviewed-by: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>

authored by

Petr Pavlu and committed by
Sami Tolvanen
3cb0c3bd f13bff1b

+5 -10
+5 -10
kernel/params.c
··· 596 596 } 597 597 #endif 598 598 599 - #ifdef CONFIG_MODULES 600 - #define __modinit 601 - #else 602 - #define __modinit __init 603 - #endif 604 - 605 599 #ifdef CONFIG_SYSFS 606 600 void kernel_param_lock(struct module *mod) 607 601 { ··· 620 626 * create file in sysfs. Returns an error on out of memory. Always cleans up 621 627 * if there's an error. 622 628 */ 623 - static __modinit int add_sysfs_param(struct module_kobject *mk, 624 - const struct kernel_param *kp, 625 - const char *name) 629 + static __init_or_module int add_sysfs_param(struct module_kobject *mk, 630 + const struct kernel_param *kp, 631 + const char *name) 626 632 { 627 633 struct module_param_attrs *new_mp; 628 634 struct attribute **new_attrs; ··· 755 761 params[i].ops->free(params[i].arg); 756 762 } 757 763 758 - struct module_kobject __modinit * lookup_or_create_module_kobject(const char *name) 764 + struct module_kobject * __init_or_module 765 + lookup_or_create_module_kobject(const char *name) 759 766 { 760 767 struct module_kobject *mk; 761 768 struct kobject *kobj;