Skip to content

Commit

Permalink
MOST: cdev: rename 'mod_init' & 'mod_exit' functions to be module-spe…
Browse files Browse the repository at this point in the history
…cific

Rename module_init & module_exit functions that are named
"mod_init" and "mod_exit" so that they are unique in both the
System.map file and in initcall_debug output instead of showing
up as almost anonymous "mod_init".

This is helpful for debugging and in determining how long certain
module_init calls take to execute.

Signed-off-by: Randy Dunlap <[email protected]>
Acked-by: Christian Gromm <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
rddunlap authored and gregkh committed Jul 21, 2021
1 parent 28b6a00 commit ddb1381
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/most/most_cdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ static struct cdev_component comp = {
},
};

static int __init mod_init(void)
static int __init most_cdev_init(void)
{
int err;

Expand Down Expand Up @@ -518,7 +518,7 @@ static int __init mod_init(void)
return err;
}

static void __exit mod_exit(void)
static void __exit most_cdev_exit(void)
{
struct comp_channel *c, *tmp;

Expand All @@ -534,8 +534,8 @@ static void __exit mod_exit(void)
class_destroy(comp.class);
}

module_init(mod_init);
module_exit(mod_exit);
module_init(most_cdev_init);
module_exit(most_cdev_exit);
MODULE_AUTHOR("Christian Gromm <[email protected]>");
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("character device component for mostcore");

0 comments on commit ddb1381

Please sign in to comment.